Detailed MediaWiki Help
From WickedSim
When you're editing a page, it's a good idea to log in first. If you don't yet have a name and password, make one after clicking on `Log in' at the top right hand corner of any web-page in the wiki. It's best to click `Preview' at the bottom of a page to see the changes before you save them, as once you've saved your changes, the whole world can see them. If you don't save alterations and then go away for a very long time, then MediaWiki will log you out.
Very basic stuffMediaWiki is enormously powerful, but has been tuned to permit you to easily edit each page on the wiki, and even selectively edit components of each page! Simply click on the edit tab at the top of the page, or the edit tag to the right of the section you wish to edit, and you're away ... well, almost. There are a few basic conventions you need to stick to:
More fancy thingsAs a basic user, you can get by with just the above, but you probably want to know how to make links (and indeed, new pages), how to insert images into a wiki, and perhaps even how to link in multimedia, PDF documents, and so forth. Links and new pagesHere we'll learn three things: how to make external and internal links, and as a trivial extension how to create a new page: External linksInserting an external link (that is, to a page outside the wiki) is easy. Simply put in the URL (uniform resource locator), usually something along the lines of [http://www.anaesthetist.com/index.htm] within square brackets, as I have just done. MediaWiki will magically create the link. If you try this, you will see that MediaWiki also associates the link with a little `external link' icon. You can replace this icon with relevant text thus: [http://www.anaesthetist.com/index.htm Link to anaesthetist.com] See how we leave a space between the end of the URL and the text we wish to use for the link. You can link in one other form of URL, ftp://... but don't use "file://..." as it probably won't work. URLs must stick to the rules. It's also possible to insert a 'bare' link into text (for example, http://www.anaesthetist.com) and MediaWiki will turn this into a proper link thus: http://www.anaesthetist.com
|
|
Links to internal pages
For a link to an internal page, simply specify the name of that page, within double square brackets, thus:
[[Main Page]]
The page name you specify must be identical to the actual page name, with the exception that you can interchange spaces with the underscore (_) character; "Main Page" and "Main_Page" refer to the same page.
Okay, it's possible to display a different name on screen, when linking to a particular page. If we wish to link to, say, the Main_Page but want (for some obscure reason) to display this as "Go to the main page", then we might say:
[[Main Page|Go to the main page]]
(It's even possible to use page redirection to link to a page, but we don't encourage this sort of fiddling as it has nasty side-effects).
Making a new page
Creating a new page is simplicity itself. While editing some text on a page, specify the name of the page you wish to create --- for example,
[[Sensible_Title]]
and save the changes. Then click on the link which appears on the saved page and --- Voila --- you have your page, ready to edit.
It's best to name your pages so that the name is easy to remember and will make sense , i.e. you should usually use real English words. Avoid fancy characters, and it's best to assume that page names are case sensitive, for example "Main Page" is NOT the same as "Main page". Do not use the following characters within the page name:
# < > [ ] | { } + \ /
The first character of a page name cannot be a colon, space or underscore, and using a percentage sign (%) is definitely unwise.
Do not use ridiculously long page names. Page names over 255 characters will fail anyway, but don't push the limits of silliness!
Inserting images
Inserting an image is similar to inserting an internal link --- both are encased in double square brackets. The trick here is to start with the word Image, followed immediately by a colon:
[[Image:SmallPicture.jpg]]
Once you've written the text, it's time to upload the image. On many wikis, there are constraints on whether/what you can upload. On our wiki at present, we've disabled uploads so if you wish to upload something make the link, contact us, and we'll upload the image for you, after we've arranged things.
Specifying image details
To link to an uploaded image (rather than displaying it) use the Media: prefix. It is also possible to alter the way an image is displayed. For example, the following should resize the image:
[[Image:pdflogo.png|120px|Modified logo]]
In the above we used pipes to specify the size of the logo, and also specify a tooltip text to be displayed when the mouse hovers over the image.
|
| |
See how the default is for an image to be clickable, and that clicking takes you to the relevant details of the image. To create the thumbnail on the right, use:
[[Image:pdflogo.png|thumb|Thumbnail pdf logo]]
You may encounter problems with larger images and e.g. the thumb option. Here's a detailed MediaWiki page on images. This also discusses the Gallery tag.
It's even possible to make Client side image maps.
Using an image as a link
There are several ways to make an image a clickable link, but most have untoward side effects. The best 'standard way' (if available on your wiki) is to use the Clickpic template which is described in detail by the author. The code used to implement this can be found in the template section below.
Inserting multimedia &c
You can directly link to sound and video media using the following syntax:
[[media:Granny.ogg|Sound file]]
Please contact the Webmaster at our site if you wish to perform such uploads. We would rather concentrate on getting good text content on WickedSim; multimedia files often consume vast bandwidth without adding vast learning (at least, in our opinion)!
Mathematical formulae
LaTeX markup can be used to insert formulae on certain Wikis (but not on ours, yet)! Read the details here. Actually installing LaTeX markup can be something of a pain, especially if you've chosen your host quickly but not wisely. Check out this link which describes the travail you will go through if you don't have the ability to run Make on your site, something you need to do to compile the texvc executable needed in the wiki/math subdirectory. In addition, you may have problems with permissions on the uploads /temp subdirectory, as with some hosts it has to be world-writeable due to their PHP implementation, but they won't allow chmod 777, or will allow it but will suspend you for using it :-( Find a different and more friendly host. Note that ocaml, teTex (LaTeX + dvips), ImageMagick, ghostscript and of course GNU make (gmake) are required. LaTeX, dvips and convert must be in the Apache path for texvc to shell out to them. teTeX, ImageMagick and ghostscript come with most Linuxes these days.
Signing a page
Sign a page with three tildes in a row: ~~~. Four tildes adds the date and time, and five tildes gives the date+time alone.
Pretty formatting
How do I make sections? How do I make a table within a wiki? Is there some way of changing the text size and/or font? What about colours? Lists? Are there any other fancy features I need to know about?
Sections
For major sections, start the heading with two equals signs, and end it with the same:
== This is a major section ==
For smaller sections, use three or (for smaller still) four equals signs. Do not skip sections, from say two to four without an intervening "three" section!
Lists
There are three types of list:
- unordered lists
- ordered lists
- definition lists
Unordered lists
Unordered (bulleted) lists are easy:
- start each line with a star.
- For a deeper level, use two (or more) stars.
To continue a previous item, simply place a colon after the star (or stars).
- This is a list item
- this is a deeper level
- this too is deep
- this continues the previous item
- the next item on the same level
* This is a list item ** this is a deeper level ** this too is deep *: this continues the previous item * the next item on the same level
End off a list with a new (blank) line.
Ordered lists
Numbered (ordered) lists are as simple!
- Just use a hash (#) character instead of a star.
- To start an ordered list at a particular value, I'm afraid you have to use HTML syntax (See link for details).
Definition lists
These are slightly more tricky.
- each list item
- starts with a semicolon.
- The actual definition
- is on the next line, and must start with a colon (:) thus:
;first item : definition of the first item ;second item : definition of the second item ... and so on!
Creating a table
MediaWiki supports creation of fairly complex tables, but the syntax is simple.
- Start a table with a left curly bracket (brace) followed by a pipe, and end with the obvious conclusion:
{| <br> table goes here <br> |} - Create a title on the next line using:
|+ Title goes here
- Create header columns using the following syntax:
! column A !! column B !! column C
- Start a new row with:
|-
... putting nothing else on that line! - Separate cells in the same row with double pipes:
| cell a || cell b || cell c
- Note the following:
- Do NOT try to separate cells on the same line with single pipes, as this will stuff things up!
- You also do not end the last cell with another pair of pipes!
- If a cell is empty, use the html to fill in and ensure that the cell is displayed. It's also possible to put one cell per line, with a single pipe at the start of the line).
- Specify a table border by starting the table with:
| border="1"
- Specify other table properties thus:
| style="width:75%; height:120px"
... or perhaps even colour:| style="background:black; color:white"
- It's also possible to specify a column width:
!width="100"|Column name
We can apply the same trick to rows to specify their behaviour, for example:!align="right"|cell contents
We can even say things like:!- valign="top"
... to specify vertical alignment in a row (the default is "middle", which can look odd). - Syntax for colspan and rowspan is as you might expect:
! colspan="2"
or even:| rowspan="3" colspan="2"
... and so forth. - Nesting of tables is possible --- the nested table must start on a new line.
Here's the detailed table help, and here's a simple (sample) table:
| Column 1 | Column 2 | Column 3 |
|---|---|---|
| row 1 | cell 1a | cell 1b |
| row 2 | cell 2a | cell 2b |
| cell b | cell c |
The code for the above table follows:
{| style="width:75%; height:120px; background:#203040; color:white" border="2"
! width="20%" | Column 1 !! Column 2
! width="10%" | Column 3
|-
! row 1
| cell 1a
| align="right" | cell 1b
|-
! row 2
| cell 2a
| align="right" | cell 2b
|-
|
| cell b
| align="right" | cell c
|}
Fonts & Colours
The best way to change colours, fonts and so on is to use cascading style sheets.
Other fancy features
There are several other tricks which you might wish to use sparingly:
- Four hyphens ---- are used to create a horizontal line;
- A colon at the start of a line indents the paragraph!
Footnotes
Provided your wiki supports the Cite method, (ours now does) citations can be included (and footnotes created) as follows:
- The first time you cite something,[1] say:
<ref name="Bloggs">Full citation goes over here, author, title, date etc</ref>
- For the following citation,[1] use:
<ref name="Bloggs"/>
Note the slash between the end of the name and the closing > --- this means that
no closing </ref> is required.
You still need to include a References section in the following code, along the lines of:
<references/>
There are other frills you might wish to use on occasion.
References
Yet more fancy things
In this section we explore interwiki links, use of HTML, and certain characters which have special functions within WikiMedia.
a. Renaming a page
If you are logged in, there should be a move tab at the head of each page. Click on this and you can rename the page. Only use this option if you really know what you are doing; preferably discuss the change with others before you make such a change, or it's very likely an irritable superuser will change the name back again.
b. Using HTML in a wiki
Avoid this unless you absolutely have to use HTML. Some options are:
<br> and <p> .. </p> can be used to force paragraphs within a list (for example). <tt>typewriter font</tt> <u>underline</u> <strike>strike-out</strike> <sup>superscript</sup> and <sub>subscript</sub> <center>centering (American spelling)</center> <blockquote>block quote</blockquote> <!-- invisible comments --> <pre> preformatted text here </pre>
Here's a Detailed exploration of HTML in MediaWiki
c. Interwiki links
Perhaps the smartest feature we haven't yet covered is the interwiki link! Provided the wikimaster (grin) has set up an interwiki map to another wiki (for example, Wikipedia) it's possible to link from your wiki to that wiki thus:
[[wikipedia:Main Page]]
It's not wise to use interwiki links from within your wiki to itself. For several reasons we don't at present support interwiki links on this site.
d. What {{braces}} are used for
See the Templates section.
e. Special Wiki <tags>
These can be extraordinarily useful, for example:
- <nowiki> --- Allows you to completely suppress Wiki markup, so you can type (odd) literal text into the page.
- <span> which is not really a Wiki tag, but a CSS tag.
f. Pipes
These have a lot of uses, mainly within internal links. For example, specifying a pipe immediately before the closing bracket of a [[W:internal_link|internal_link]] will suppress the "W:" prefix in the display of that link. Note how pipes are also used in refining the display of images. We've already used pipes to specify an alternate name for an internal link. For further details see the WikiMedia help page</a>.
g. The # hash character
This is used to reference a particular part of a wiki page. For example [[#fred]] links to an anchor called "fred". Well, how do we name an anchor? This is a little cumbersome:
<span id="fred"> </span>
h. Forward slash and backslash
MediaWiki permits subpages on some projects. You might wish to avoid this tricky 'feature'. Pages have parents (and perhaps, children) and these can be referred to as a tree structure, using the slash character.
i. The percentage sign
This is used to render the hexadecimal character specified after the sign. For example [[%41]] is rendered as [[A]].
j. Language codes
You can get further information from the MediaWiki User's Guide. Here's the page for Special characters.
Namespaces
In a wiki it's important to distinguish between the contents of the wiki, and 'meta-information', for example talk about the contents, information about a user who generated the contents, and so forth. Distinguishing between content and 'meta-content' is a problem.
The logical way to fix this problem is to have different namespaces. The namespace which wiki information occupies has no name, but each other namespace has its own name, referred to by saying:
Namespace:pagename
Common namespaces (and their prefixes) include:
- Help
- A help page associated with a primary wiki page
- Image
- A particular image for example, a PNG graphic
- Media
- Multimedia files, for example sound and video
- Template
- See the template section below.
- User
- A particular user of the wiki
- Special
- 'meta-data' about the site and its pages
- Talk
- A discussion namespace associated with another namespace! For example, we have Talk:, User talk:, Image talk: (but no 'Media talk' or 'Special talk').
Other options are the Category namespace for building hierarchies of categories (an idea which has pros and significant cons) and the eponymous Project namespace.
System operators will use other namespaces (for example MediaWiki). For details on categories click here.
Templates
The magic word here is `transclude'. What this odd word means is `stuff is directly copied into a page'! For example, you can include within a page text from another page, by simply typing in the name of the template, within double curly braces:
{{template name goes here}}
The following section provides details about the useful Clickpic template. For a really good tutorial on templates (specifically on document links) try here.
Template parameters
It's even possible to submit 'parameters' to a template for use within that template! For more detail look here. Here's an example of usage of the Clickpic template:
{{clickpic|TITLE OF TARGET PAGE|PATH OF IMAGE FILE}}
The two parameters are submitted with pipes used to separate them and the title 'clickpic'. This example is an unfortunate one, as your Wiki has to support embedding of external images and many have disabled this option owing to bandwidth stealing (At present we still allow such links). Now here is the code for the actual template:
<span class="plainlinks">[{{SERVER}}{{localurl:{{{1}}}}} {{{2}}}]</span>
The idea is that when MediaWiki encounters the double left curly brackets (braces), then it will look up the template clickpic. Not only will it do this, it will also fill in the relevant parameter values where it encounters {{1}} and {{2}}! Here's an example which will work on a site only if the MediaWiki PHP variable $wgAllowExternalImages is set to true and the clickpic template actually exists. I use an image from the site at Anaesthetist.com but have arbitrarily linked the image to the WickedSim main page:
You should see a clickable image above! If the template doesn't exist, a link will be created to it (Now isn't MediaWiki friendly?); if external images are disabled, then only the URL will be present. Even more cute is that MediaWiki will display all templates used on the page during an edit: edit this section and look near the very bottom of the edit page for the template list!
The source code for the above image is:
{{clickpic|Main Page|http://www.anaesthetist.com/images/scopes4.png}}
Reverting
To revert is to go back to a previous edition of a page. There are two ways of doing this, but neither should be undertaken lightly. Think before you revert. You might wish to:
- Not revert;
- Edit the current page to remove added text;
- Edit an older version of the current page (to recover deleted text).
Don't revert if you simply disagree. Rather discuss things, agonise over the decision, and then don't revert. Respect the opinions of others, and only revert in the clear case of vandalism.
If you're sure you wish to revert, read This page first.
Cascading Style Sheets (CSS)
An important (but often ignored) idea underpinning HTML is that the format of the page should be separated from the content of the page. Taking this approach allows us to have a standard format for a whole lot of pages (a style sheet) but also to modify a particular page or set of pages with a subsidiary sheet, if needed. (This ability to have subsidiary styles is the 'cascading' part of CSS). We avoid having bitty little formatting quirks in particular pages.
Needless to say, MediaWiki employs CSS rather extensively. MediaWiki has various skins which you can apply, and also uses style sheets which transcend mere skins. For a detailed view of CSS, see my page on stylesheets at anaesthetist.com. The executive summary is as follows:
- You need to know what you're doing if you create a style sheet, but using one is relatively simple! Simply say things along the lines of:
class="wikitable"
at the appropriate place (in this example, within a table). The catch is that you have to know which class to refer to, or slavishly copy others' text! To specify the style itself, say something along the lines of:style="font-style:italic; font-size:120%; border:3px dashed red;"
In order to know what to do here, you have to know a fair bit about CSS. Try this page! - Specify particular stylesheet attributes by saying class='something' within an HTML tag;
- Use a <span> tag to apply a style to a section of text;
- Use a <div> tag to apply a particular style to several elements, for example:
<div class="fred"> Stuff goes here </div>
... will apply the CSS class formatting for "fred" to the section you've marked out. But first you must have decided what "fred" is within a style sheet, and this will require a lot of skill at CSS.
For more details check out this link.
Hi-tech wiki stuff (experts only)
These topics are/will be covered on a separate page. They will include page protection, wiki design and installation, and more.


