Archive for May, 2007

Become a Contributor Part 5 - Custom Editing Features of WikiKnitting

I have installed and created several add-ons to the standard Mediawiki software to better suit the needs of a wiki about knitting. Today’s post will focus on how to use these features.

Making Color Charts

As I began working with wiki markup I found a gaping hole in its ability to easily make knitting charts. While not impossible or hard using standard tables, the markup is extremely cumbersome and almost impossible to read. So my husband and I sat down and came up with an easier way to create color charts. This is the result. Since we wrote the code for this, let me know if you want additional features or if something isn’t working correctly.

The table must be enclosed in the wiki tags.
<colorchart> </colorchart>

The first row creates the association between the desired HTML color and a single character designator. Both HTML color names and hexadecimal codes can be used. The list must be comma separated and must end in a colon “:” There is no limit to the number of colors that can be defined in the list.

w=white,l=lightblue:

The remaining rows are used to create the color table using the single letter color designators assigned in the first row. The table will be drawn based on these letters. Each letter will create a new cell in the table. Ex: aaaa; gives a 4 column table. Every row of letters will add a row to the table. Each row must end in a semi-colon “;” There is no limit on the number of rows or columns that can be used in the table.


lwlwlwl;

A complete simple table looks like this:

<colorchart>
w=white,l=lightblue:
wlwlwlw;
lwlwlwl;
wwwwwww;
lllllll;
wwwwwww;
lwlwlwl;
wlwlwlw;
</colorchart>

Result:

Options

There are a number of options that can be added inside the <colorcode> tag to customize the table. All, some, or no options can be used. If multiple options are used they should be separated by a single space.

Syntax: <colorcode {option} {option}>

Title – Adds a title to the top of the table

<colorcode title="Color Chart">

Color Chart

Cell Width and Height – Specifies the width and height of the cells in the table.

<colorcode width=50 height=50>

Include Cell Text – Displays the single character designator inside the cell. This is useful for cable or lace charts, where you don’t care about color.

<colorcode text=true>

w l w
l w l

Row and Column Numbers - Both row and column numbers can be added to the chart by including the grid option.

Note: If the grid argument is true, the minimum cell height and width that can be displayed is 20×20.

<colorcode grid=true>

3
2
1
3 2 1

Adding a Color Legend

Now that you have a color chart you should define for the reader what yarn is used for each color. This method can be used on any page to describe the yarn you are using for a project. You can do that using the Color Legend Template. Templates will be covered in more detail in the next post, but I thought that this fit better here.

Color Yarn No. of Skeins
Color A Sandnes Mandarin Petit 1
Color B Sandnes Mandarin Petit

Place this text in the edit box of a post to call the template.

{{Color Legend
|color a=lightblue
|color a yarn=Sandnes Mandarin Petit
|color a skeins=1
|color b=white
|color b yarn=[[Sandnes Mandarin Petit]]
|color b skeins=
}}

The template supports up to 10 colors (Letters a-j). Any letters not used will not be displayed.

  • color a= This is the html color name or color code for a color. This should match the color chart if one is used.
  • color a yarn= Enter the brand name and type of yarn used.
  • color a skeins=The number of skeins or balls of yarn required for the project

Adding Videos

Videos often provide a much better medium than text or photos for explaining an unfamiliar concept. WikiKnitting has 2 ways of displaying videos.

YouTube

You can reference video uploaded to YouTube with the YouTube tag. This is useful when you want to add a link to something that already exists on YouTube. Place the YouTube ID for a video between the opening and closing tags.

Tag :
<youtube>ID</youtube>

Ex :

from url http://www.youtube.com/watch?v=M6ZjMWLqJvM
<youtube>
M6ZjMWLqJvM</youtube>

Quicktime

WikiKnitting will also play Quicktime videos that have been directly uploaded to the wiki. Since this wiki is run by me as a hobby, I have limited the upload ability to myself for now. (I don’t want people posting non-knitting videos and me unexpectedly footing the hosting bill.) If you’ve created a knitting video that you want to share, just send me (E.B.) an email and I’ll upload it.

Once a video has been uploaded you can call it using the flowing tag.

<qt>
file=MovieName.mov|width=320|height=256|autoplay=false|controller=true</qt>

Next: Become a Contributor Part 6: Templates

Quick Links
Part 1: Become a Contributor to WikiKnitting
Part 2: Wiki Editing Basics
Part 3: Adding Images
Part 4: Using Tables

Become a Contributor Part 4 - Using Tables

Tables are a very powerful way to organize information on a wiki page. As is often the case with power comes complexity and confusion. So this is where the advanced editing techniques part of the tutorial begins. I hope you will continue reading, because I think simple tables will benefit you greatly. Even if you never create a table, it will help you gain the confidence to edit pages that have tables on them.

Basic Table construction

Table are made up of columns and rows that intersect to create individual cells. There are four basic symbols used to make up a table.

{| The beginning of a table
|- A New row
|| A new column
|} The end of a table

A simple table looks like this:
{|
|-
| a || b
|-
| c || d
|}

The result:

a b
c d

The table can also be built like this with the same result.
{|
|-
| a
| b
|-
| c
| d
|}

Options

Wiki tables support the same options as XHTML tables and CSS styles. The most common options you will see are:

XHTML – separated by a single space
border = “1” Adds a border to the table. Larger numbers equal a thicker border
cellspacing = “1” Controls the distance between the edges of cells. Larger numbers equal greater distance
cellpadding =”1” Controls the amount of whitespace around text in a cell. Larger numbers equal more whitespace

CSS Styles - separated by a semi-colon “;”
style = “border-collapse:collapse” Collapses the raised border into a line
style = “background:#fff” Controls the background color of the table, row, or cell. Uses both HTML color codes and names
style = “color:#fff” Controls the color of the text in the table, row or cell. Uses both HTML color codes and names

These codes can be used one at a time or combined. I’m going to combine a few.

{| border=”1″ style=”border-collapse:collapse;background:lightblue ”
|-
| a || b
|-
| c || d
|}

Result:

a b
c d

Apply an option to a Table, Row, or Cell

In the previous example I applied the options to the whole table by place them on the first line right after {|. You can also apply these options to a single cell or a row. There’s no easy way to apply them to an entire column. The best method is to nest tables. That’s a bit too advanced for this tutorial. Instructions on how to do that can be found in the wiki Help Section here.

To apply an option to a specific row place the option after the row delimiter |-.

|- style=”background:lightblue”

To apply an option to a specific cell add the option a | after the cell delimiter.

|- style=”background:pink” | c || style=”background:red” | d

Different colors applied to a row and to a cell.

{| border=”1″ style=”border-collapse:collapse;background:#fff”
|- style=”background:lightblue”
| a || b
|-
| style=”background:pink” | c || d
|}

Result:

a b
c d

Merging Cells

Merging cells across multiple rows and columns can be useful. Use the rowspan and colspan options to do this.

Rowspan will cause a cell to span 2 rows. See Cell C below.

Colspan will cause a cell to span multiple columns. See Cell f below.

{|border=1 style=”border-collapse:collapse;background:#fff”
|-
| a || b || rowspan=”2″ | c
|-
| d || e
|-
| colspan=”2″ | f || g
|}

Result:

a b c
d e
f g

Controlling Width

By default the table will adjust its width based on the length of the text, which is not always desirable. The width of a table or columns can be controlled using the width option. On the first line the option controls the overall width of the table relative to the width of the webpage. By applying the option to each cell the width of the individual columns can be controlled. You can specify the width with either pixels or percentages. If you use percentages, the sum of the widths for the columns must equal 100%.

{| border=1 style=”border-collapse:collapse;background:#fff” width=”75%”
|-
| width=”25%” | a || width=”75%” | b
|-
| c || d
|}

Result:

a b
c d

This is a basic overview of how tables can be constructed and customized with wiki mark-up. There are many more options available for custmizing tables. For more options and examples visit the Help Page.

Next: Become a Contributor Part 5: Custom Editing Features of WikiKnitting

Quick Links
Part 1: Become a Contributor to WikiKnitting
Part 2: Wiki Editing Basics
Part 3: Adding Images

Become a Contributor Part 3: Adding Images

Pictures are an important part of any wiki article. This is especially true when you are explaining something or showing off your pattern. Today I will show you how to add images to your articles.

Upload Your Image

Before you can add an image to a wiki article you need to first upload it to the wiki. In order to help keep page load times fast, images should be smaller than 150 KB.

  1. Login to your wiki user account. You can create an account for free if you don’t already have one. (See Part 1 for instructions)
  2. Click the “Upload File” link in the toolbox on the left hand side of the wiki.
  3. The source file name is the path on your computer to the file you wish to upload. You can use the Browse button to navigate and select the file.
  4. Select a Destination Filename. The default name is the same name as the source file. However, you can change the filename if you wish. It is important to note that you should use a very descriptive filename such as “Mary’s Blue Baby Booties.jpg” and not a generic filename like “Picture1.jpg”
  5. Select “Upload File”
  6. After the file has been uploaded you will be taken its new page.
  7. Edit this page and add information about the source of the image (such as a photo that you took), the author of the image, and any copyright information associated with the image.

A note on copyright: Know the copyright status of an image before you upload it if you didn’t take/create the image. I will remove images that violate their copyright license if asked to by the owner of the image.
You are now ready to add the image to a wiki article.

Linking to Your Images

A basic internal link is used to display the image. The basic syntax is

[[Image:{image name}|{options}]]

The most basic syntax will show a full size version of the image.

[[Image:Example.jpg]]

It’s a good idea to add alternate text to be shown for text only browsers. You can do this by using the pipe “|” symbol (found above \ on most keyboards) to separate the image name from the alternate text.

[[Image:Example.jpg|Yarn]]

Sometimes you might prefer to show a smaller version of the image. To do that you can use can use the thumb option and specify what size you want the image to be in pixels.

[[Image:Example.jpg|thumb|100px]]

If you add alternate text to a thumbnail it will be shown as a description underneath the image.

[[Image:Example.jpg|thumb|100px|Yarn]]

To adjust where on the page an image is aligned, add right, left, or center as an option to the image link. This works the same for both a full size image or a thumbnail.

[[Image:Example.jpg|center|Yarn]]

[[Image:Example.jpg|thumb|center|Yarn]]

The wiki has a built in gallery feature to easily organize multiple pictures. To create a gallery of thumbnail images, use the gallery tag. This will size all of the images the same and place them in a table automatically. However, using the gallery tag you can’t control the size of the thumbnails. A more flexible, but slightly more complicated option is to use a table to create a gallery. This will be covered in the next tutorial.

<gallery>
Image:Example.jpg|Item 1
Image:Example.jpg|[[Item 2]]
Image:Example.jpg|Item 3
Image:Example.jpg|Item 4

</gallery>

More information about adding images can be found at http://wikiknitting.com/wiki/Help:Images

Stay tuned for Part 4: How to use Tables

Quick Links
Part 1: Become a Contributor to WikiKnitting
Part 2: Wiki Editing Basics

Felted Project vs. The Front Loader

cimg2146.JPGI enjoy felting my hand knit items. I also care about the planet and hate paying a high water bill. A reduction in family hygiene is not an option. So we got a front loader. As I looked at this new high-efficiency machine I felt really proud. We were taking one additional step in using less..not always easy to do. I also felt a very selfish pang of sadness…well there goes felting. Sure, I may not felt often, but I still want the option to felt and I’m not inclined to do it in my kitchen sink. I wondered if it would be wrong to have a little machine just for felting. They have wee little machines that fit on your counter. I knew that my husband would not support a $300 water guzzling mini-machine just for the occasional project. I thought my felting days were over. Then came Max.

The Toddler and I went to the animal shelter last Monday and picked out a little 9-week old orange tabby. We left him there to be “altered.” When I got home Monday I went in to examine my stash for options…Max would need a bed, and maybe some socks, a sweater, a little stocking cap with holes for his ears. I quickly came to my senses and settled on just a bed. I picked out 3 balls of Noro Kureyon and got to work on the Kitty Pi bed from WendyKnits.net. I had seen the gallery of photos from her site and thought it a very sweet thing to make for a kitty. I declared the bed finished on Tuesday afternoon when I ran out of Noro ( held doubled), so I did an i-cord bind-off using 3 strands of cascade 220 and stood before my machine doubtful and desperate.

I selected the shortest setting that allowed for a hot water wash on my machine -quick wash- about 20 minutes with no spin. Agitation was still going to be an issue so I took a pair of The Toddler’s old leather tennis shoes, removed the laces, and tied them into a length of stocking. It took 2 quick wash cycles and now I have a beautifully felted bed for little Max. A sopping wet bed, I was picking up Max Thursday morning in my experience the drying of wet wool is not a quick endeavor. I pressed as much water as I could from his bed with towels. Then into the dryer Max’s bed went. 45 minutes later it was dry and ready for Max. He loves it.

cimg2044.JPGFelted Project 1 Front Loader 0

Become a Contributor Part 2 - Wiki Editing Basics

In this post I will be focusing on the basics of how to edit pages and what basic wiki syntax looks like. To begin we need to get to an edit screen. Click on the edit tab at the top of the webpage.

main-tabs.png

This will bring up an edit box. If there is already text on the page the text will be in the edit box. If there is no text on the page, then the box will be blank.

edit-box-small.png

Text can be typed into the editing box or you can type up your article in a word processor and then cut and paste it into the edit box. I recommend the later for long articles, since the wiki doesn’t have a spell checker. However, do not spend any time formatting the text in an external word processor. All formatting, except for line breaks, will be lost when you paste the text into the wiki editor.

Wiki syntax appears daunting at first. Most of us use WSIWYG (what you see is what you get) editors like MS Word to do our word processing, so the formatting is hidden from us. Sadly, the world of wiki editors is not very advanced so we need to use special wiki syntax to modify text on wiki pages. There is a toolbar at the top of the edit box that will help you with some basic wiki formatting.

edit-toolbar.png

From left to right the buttons on the tool bar are:
Bold – Italic – Internal Link – External Link – Level 2 Header – Embed Image - Media File Link – Mathematical Formula (LaTeX) – Ignore Wiki formatting – Your Signature – Horizontal Line

To use the toolbar highlight a word and then click on the button you want use. The appropriate wiki syntax will be added to the text.

The basic syntax you are most likely to use:
Bold: ”’text”’
Italic: ”text”

Line Breaks

In order to have your text appear on different lines, you need to place a line between the lines of text you want separated. If you don’t then the text will show up on the same line.

Example:
This is line 1.
This is line 2.

Will appear as:
This is line 2. This is line 2.

While this:
This is line 1.
This is line 2.

Will appear as:
This is line 1.
This is line 2.

This does not apply to special formatting like ordered lists and headers.

You can also use the HTML command
at the end of a line to create a line break.
Example:
This is line 1.<br />
This is line 2.

Will appear as:
This is line 1.
This is line 2.

Headers

Headers are useful to separate content within an article. These headers are also used to automatically generate the table of contents at the top of a page. The header syntax is a series of “=” on both sides of the text to be included in the header.

Header 2: ==Header 2==
Header 3: ===Header 3===
Header 4: ====Header 4====

Lists

Adding a * at the beginning of a line will create a bulleted list. Add additional * to create sub bullets.
*Item 1
*Item 2
**Sub-Item 2

Adding a # at the beginning of a line will create a bulleted list. Add additional # to create sub items.
#Item 1
#Item 2
##Sub-Item 2

Links

Links are one of the best things about wiki. It allows you to easily reference other information in the wiki. Making an internal link to another wiki article is as simple as enclosing the title of the article inside double brackets.

Internal Link to another wiki article: [[Name of article]]

However you can change the name shown on the link by adding a pipe “| “ symbol after the name of the article and the alternate text you want to display. (This can be found above the backslash (“\”) on most keyboards.)

Internal Link to another wiki article: [[Name of article |A different Name]]

External links can be showed different ways.

Typing the full URL including http:// will make the URL a link,
External Link to another site: http://google.com

Adding single brackets will hide the URL and show the link as a number
External Link as a footnote: [http://google.com]

Adding a space and alternate text after the URL inside single brackets will show the alternate text as a link.

External link with alternate text: [http://google.com Google]

HTML

WikiKnitting supports HTML code formatting, but we strongly recommend using the wiki formatting for consistency. There are cases where HTML formatting is necessary, but if you don’t know what they are then stick with the wiki syntax.

Saving

Once your text is entered, click show preview at the bottom of the page to see what your editing page looks like.

save-buttons.png

This is an important step and should not be skipped. It’s very easy to add an extra apostrophe or not enough to one side of a word and have the formatting be incorrect.

In preview mode the edit box will remain at the bottom of the page. You can easily correct any mistakes and then select preview again.

When you are happy with your text then click save changes. The wiki article is now live.

More information can be found at http:wikiknitting.com/wiki/Help:Contents Stay tuned for Part 3: Adding Images

Together at last.

I became increasingly aware of my fevered state, pulse quickening, heart racing. Could it possibly be after all this time that we were here, together, ready to bind off, this wrap and I? Sure our romance had its lows. But the highs..wow they have made it all worth it. So what if I have some mohair wrapped around one of my tonsils that no amount of throat clearing seems able to dislodge.

This was a large project for me. I am pleased to have completed it. I wanted to shout from the rooftops when I cast off. I am not sure my neighbors share my enthusiasm about knitting so I held my tongue. I believe part of the anxiety I was having about this project was the size. I had lost site of its size. No wonder is seemed to take forever to knit. It dwarfs my Tom Waits CD as you can see in the picture. It just did not seem so big when it was wadded up in my bag. It’s the oversights that get ya.

Hmmmm………. what shall Icimg2040.JPG cast on next?

Maker Faire Starts Tomorrow!

Just a quick reminder that the 2nd annual Maker Faire starts tomorrow at the San Mateo County Fair Grounds in San Mateo, CA.  This is a family friendly events that’s all about people who love to build things themselves.  There will be a large craft section this year and seminars about knitting, sewing, and other crafts.  See you there!

Become a Contributor to WikiKnitting

Over the next week or so I will be doing a series on how to edit wiki pages. I hope that this will give you the tools and courage to jump in and edit or add your first wiki article. If you’re not sure where to start or think the wiki syntax looks intimidating, then this series is for you. I will be covering the following topics.

  1. WikiKnitting overview
  2. Editing Basics - Formatting
  3. Adding Images
  4. How to use Tables
  5. Custom Editing Features of WikiKnitting
  6. The Benefits of Templates

WikiKnitting is powered by Mediawiki. This is the same open source software used by Wikipedia. If you have contributed content to Wikipedia then the editing process is identical. Much of what I will cover in this series can be used on any site that uses Mediawiki software.

I will begin with an overview of the layout of WikiKnitting as it relates to editing. At the top of each page in the wiki there are a series of tabs that allow the user to do different things.

main-tabs.png

The first is the Article tab, which is the main article. To modify this page click the Edit tab (see the third tab) while you are on the Article Page.

The second is the Discussion tab. This is also called the Talk page. This is where discussions should take place or a question about an article should be posted. To modify this page click the Edit tab while you are on the Discussion Page.

The third tab is the Edit tab – Select this tab when you want to edit an Article of Discussion Page. The rest of the series will be devoted to what you can do here.

The fourth tab is the History Tab – Mediawiki keeps a record of every version of an article. This tab shows the revision history of an article. This is also where you can rollback an article to a previous version. However, you must have a registered account to do this.

While almost all articles on wikiknitting.com are open for editing, some articles are protected. Protected articles can only be edited by users with higher level permissions. Protected articles have a View Source tab instead of an Edit tab. Usually an article is protected if it is on the front page of the site or is a main navigation page. An article may also be temporarily locked for editing if it becomes the target of spam or malicious editing.

While you can contribute to the wiki and edit pages without becoming a registered user, there are perks to being a registered user.

  1. Take credit for your contributions.
  2. The ability to add new pages. Pages cannot be created by anonymous users
  3. The ability to watch pages. This means that you can easily check to see if pages that you care about have recently had changes made to them.
  4. The ability rollback content to previous versions.

To create an account click the log in/create account link in the upper right hand corner on any wiki page.

Now that you have an account, let’s get on to editing you’re first page. Stay tuned for Part 2: WikiKnitting Editing Basics.

The Best Part of Breaking Up is Making Up!

The wrap and I had really hit an all time relationship low. In fact I blame my turning to the Darkside entirely upon the wrap. Had it not let me down I would never have cast on those socks, and the scarf, and the sweater for the toddler (turned out super cute I must say) and the other pair of socks.

I took some time this last week to try and inventory what was going on between this wrap and I. Last Wednesday I swore at it during knit night! I was really losing it about the wrap. This is what I realized:

I mistakenly thought I would remain intrigued by the wrap because of its interesting shaping.

In fact the boring K5, P5 had more influence upon my mind than the “interesting shaping”.

I was immediately able to envision myself living in said wrap.

The weather is warming; I may not be able to wear it during the daylight for many months.

I was going to require only 3 balls of yarn to complete.

It is taking 6.

I have forgiven the wrap for not fulfilling all my expectations. I have forgiven myself.

It is no longer The wrap, it is My wrap.

I am knitting like I just cast on.

Freakonomics on Why We Knit

The NY Times Sunday Magazine had an article yesterday by the guys who wrote Freakonomics about the rise of what they called laid-back labor. Things our parents or grandparents did as chores we do for fun such as cooking, gardening and yes, knitting. I like Levitt and Dubner a lot. I read their blog and loved their book, but it seems pretty obvious to me why we continue to knit. Knitting, sewing, and crocheting were never strictly chores.  The items made, while functional, always had an element of beauty and creativity to them.

How many of you have a closet full of items that members of your family made? I know I do. I have a gorgeous crazy quilt made by my great aunt. Pillow cases with crocheted edgings made by my grandmother and more handmade lace doilies then I care to count. That doesn’t even count my mother’s or her sister’s collections of handmade goods. These things have been kept because they are beautiful and functional. Well, except maybe the doilies.

I don’t know why most of you knit, but it’s probably close to why I picked up knitting. It gives me a chance to continue to learn and expand my knowledge. To experiment and see what happens on a small scale. I can be as boring or creative as I want. Design a pattern, follow a pattern, use plain wool, use novelty yarn, all of these decisions are mine.  After a few hours or months you have an item that can be used and enjoyed.  Not to mention that once you get going, something about knitting itself is very relaxing.

I do agree with them that if someone asks me to knit them a sweater for money I don’t think I would do it. Knitting an item is personal for me. While I love sharing my items with others, I think knitting an item for someone who paid me to knit it would turn knitting into a chore.


Welcome

The WikiKnitting Blog is updated regularly and the easiest way to get your regular dose is to subscribe to our news feed. Stay on top of all our updates and subscribe now via RSS.
secret_pal_11_button.jpg

Bad Behavior has blocked 51 access attempts in the last 7 days.