Scratchpad:Magic words

This is an organised index of Magic words used in MediaWiki. Tags such as "[MW1.5+]" indicate the version that first supported the magic word. "XYZ" indicates user input, which is used in the example.

Table of contents

 * For details see Help:Section

Variables

 * For details see Help:Variable

Time
The time in UTC.

Local time
The time depending on the local timezone of the wiki. (All words [MW1.8+] )


 * See also the ParserFunction #time:

Colon functions

 * For details see Help:Colon function.

Image modifiers

 * For details see w:en:Wikipedia:Extended image syntax.

These are image modifiers used in  links. Some are mutually exclusive, and then the last specified wins.

Size
The last unrecognized modifier is used as caption for framed images or together with thumbnails. It's also used as description alt=text.

Position

 * For details see Help:Images_and_other_uploaded_files

The positions are mutually exclusive, the last specified wins. Template:- can stop floating. For inline images only modifier px (see above) is supported.

Language-dependent word conversions
"Grammar" and "Plural" are language-dependent functions, defined in, , etc. (note that in PHP, the modulo operator is the percent sign).

"Grammar" can either be applied to predefined words only, or to arbitrary words, depending on whether the definition is just a 2D array, or involves string manipulations. See also cs:Šablona:Wikivar/GRAMMAR.

"Plural" is a project-dependent switch function, e.g. giving the first text if count = 1, the second if count = 2,3, or 4, and else the third. See also 5805 for the use of "plural" in system messages.