Creating and editing documents in the wiki

edit

A wiki is a special kind of webpage that is designed to be very simple for the users themselves to edit. Wikipedia is a well-known public wiki, and some teams here at Virgin Mobile USA (including IT Unix) use private wikis for documentation. The word "wiki" comes from Hawaiian and means "fast" or "quick".


Working in a wiki is a lot like working in email: you can just type if you want. You can skip lines to start new paragraphs and otherwise ignore formatting. Formatting is possible (things like bolded text, or bullet lists), but it's not necessary. The wiki code that lets you format text is pretty simple, but you can still safely ignore it and get everything you need done.

Editing existing documents

edit

Every page in the wiki has a tab at the top that says "edit". If you click on that link, you'll be taken to the page of raw text, and you'll see that mostly, it just looks like plain typing. You can do a lot in the wiki just by typing. When you're finished, scroll to the bottom of the page and click the button that says "Show preview". If you like how it all looks, scroll back to the bottom and click the button that says "Save page".


Long documents are usually broken up into sections for ease of reading, and this also makes editing easier. You will see an "edit" link on the right-hand side of each section. You can click that link to edit just the section you're interested in – you will still be able to "preview" before you save your changes.

Wiki toolbar for Firefox

edit

There is a Wikipedia toolbar for Mozilla Firefox. It has buttons for the most common editing tasks and also adds the same functionality to the right-click menu. You can download the latest stable version here: http://wikipedia.mozdev.org/

edit

In this wiki, any word that has double square brackets around it is automatically a link. If you put [[brackets]] around a word, wiki will treat it as a link. When you click on the link, you'll be taken to the document if one exists, or to a blank page so you can create a document for that link.

Creating new documents

edit

In the wiki, you start a new document by creating a link to it. When you follow that link, you’ll be taken to a page that is mostly a giant edit box. Start typing: you'll be creating your page. Before you created the page, your link was red, but you'll see that it's blue or purple after you save your work.


If you have no other place to create the link, you can use the practice area called the "Sandbox", found here: http://vwcwiki01/mediawiki/index.php/Sandbox

Wiki formatting codes

edit
[[ text ]]          Creates a link (internal)
'' text ''          Makes the text italic
''' text '''        Makes the text bold
''''' text ''''     Makes the text italic & bold
== heading==        Creates a level-2 heading
=== heading===      Creates a level-3 heading (6 levels total)
: text              Indents text
:: text             Indents text further (many levels)
 text               A blank space at the beginning of the line sets
                       the text off in a shaded box, in a monospaced font
* text              Creates a bulleted list
# text              Creates a numbered list
----                Creates a horizontal line across the page

Wiki & html

edit

The whole point of wiki is to be fast and easy to use. It does this by limiting your options to keep the wiki codes simple. You don't need to know html to edit the wiki, but you can use html code in your wiki page if there are effects you can't achieve any other way:

<u> text </u>                        Underlines the text
<s> text </s>                        Strikes out the text
<br>                                 Forces a new line
<blockquote> text </blockquote>      Indents the text on left & right.
<center> text </center>              Centers the text horizontally
<code>  text  </code>                Creates a monospaced font, useful for 
                                        representing computer code
<!--  text  -->                      To comment-out text
<nowiki><pre>text

</nowiki> Sets the text off in a shaded box, in monospaced font. Good for multiple lines.

Templates ("Boilerplate text")

edit

MediaWiki software uses the word "template" to mean any kind of standard text that you want to insert automatically. (Do not be confused – many other softwares use the word "template" to mean a standard format for new documents. Wiki is using the word to mean "boilerplate text".) The "team phone list" is an example of a template that we're using in many places.


To use a template, type {{template name}} where ever you want it to appear. (Include the double curly-brackets.)


Editing a template is a little trickier than editing an article, because you can’t edit it in the article that calls the template; instead, you have to edit the template directly. (Try it: when you click on "edit", you won't see the contents of the template; all you'll see is the {{template name}}.) Instead, you'll have to find the template you want to edit in the "List of Templates" in the "Team Member Info" section on the wiki's front page. This is where you can edit them.

Re-naming a page

edit

Give your articles obvious titles so that the search function can find them easily. MediaWiki does not have a strong search function; that is one of its few shortcomings.


Since the pages can be edited by anybody, it's easy for a page to get changed so much that the original title is no longer the best choice. When that happens, you should (1) rename the page (which will automatically create a redirect); and (2) edit the links that refer to the page so that they use the new name. (Otherwise they will be dead links.) Before renaming the page, click the "What links here" link on the left side of the page; it will bring up a list that shows you where you need to edit link names.


You must have an account and be logged in to rename a page. (This is also called "moving" a page.) When you're logged in, you'll see additional tabs at the top of the article – click on the one that says "move" and fill in the new article name in the dialog box that opens.

Wikipedia cheat sheet

edit

We are using MediaWiki for our wiki engine. Wikipedia uses the same software, and they have created a cheatsheet that you should print out for future reference: http://meta.wikimedia.org/wiki/Cheatsheet#Wikipedia_Cheatsheet

Wiki tables

edit

Html tables are complex. Wiki tables are less complex, although still not as simple as bolding or italicizing text. But sometimes the best way to present informtion is in table form. The basic table format:

{|                   Opens the table
|-                   Starts a new row
! header             Header cells are centered & bolded
! header
! header             Every header starts with an exclamation point (!). 
                        Headers can be on new lines or the same line.
! header !! header   When headers are on the same line, an extra ! divides them
| cell               Regular cells are plain text unless you add formatting
| cell1
| cell2              Every cell starts with a pipe ( | ). 
                        Cells can be on new lines or the same line.
| cell1 || cell2     When cells are on the same line, an extra pipe divides them
|}                   Closes the table

Here is an example table. It has 6 rows (including the header row) and 3 columns.

Food Name Fruit/Vegetable Special Traits
Carrots Vegetable Bugs Bunny loves them
Spinach Vegetable Popeye eats it
Apples Fruit Keeps the doctor away
Eggs Neither Came before chicken?
Tomato Fruit Eaten as vegetable


Below are two different ways to create this table. They have identical results, but they have different strengths. The horizontal version can be easier to read in code form. (You can add blank spaces to make the columns line up, but it will not affect the final view.) The vertical version allows you to use advanced table formatting, such as setting background colors or column widths (not covered in this tutorial).

{| border="1" cellpadding="1"
|-
! Food Name !! Fruit/Vegetable !! Special Traits
|-
| Carrots || Vegetable || Bugs Bunny loves them
|-
| Spinach || Vegetable || Popeye eats it
|-
| Apples || Fruit  || Keeps the doctor away
|-
| Eggs || Neither || Came before chicken?
|-
| Tomato || Fruit || Eaten as vegetable
|}
{| border="1" cellpadding="1"
|-
! Food Name
! Fruit/Vegetable
! Special Traits
|-
| Carrots
| Vegetable
| Bugs Bunny loves them
|-
| Spinach
| Vegetable
| Popeye eats it
|-
| Apples
| Fruit 
| Keeps the doctor away
|-
| Eggs
| Neither
| Came before chicken?
|-
| Tomato
| Fruit
| Eaten as vegetable
|}