Help:Magic Words

From The Urban Dead Wiki
Revision as of 00:54, 30 March 2009 by A Helpful Little Gnome (talk | contribs) (→‎Time: {{CURRENTHOUR}})
Jump to navigationJump to search

This is an organised index of all Magic words that are known to work on this wiki. "XYZ" indicates user input, which is used in the example.

Table of contents

Word Explanation
__NOTOC__ Hides the Table of Contents on the current page.
__FORCETOC__ Forces the table of contents to appear.
__TOC__ Places a Table of Contents here. Also forces it to appear.


The Table of contents can also be forced onto a floating table on the right hand of the screen with the code below:

  {| align="right"
  | __TOC__
  |}

More magic

Word Explanation
__NOEDITSECTION__ Hides the edit links beside headings.
__NOTITLECONVERT__
__NOTC__
Like __NOCC__ but affecting article title only.
__END__ Allows for trailing whitespace to be included in the page save.


Template modifiers

Word Usage Explanation
{{subst:}} {{subst:XYZ}} Substitutes the template call with the content of the template.
{{msg:}} {{msg:XYZ}} If a template clashes with a magic word, use of the msg: modifier will use the template instead of the magic word. Otherwise, the magic word is used.
{{msgnw:}} {{msgnw:XYZ}} The template message is pasted as unevaluated <nowiki> text.
{{INT:}} {{INT:XYZ}} If a template clashes with a MediaWiki:message, use of the INT: modifier will use the message instead of the template. Otherwise, the template is used.

Time

Word Example Explanation
{{CURRENTDAY}} 2 Displays the current day in numeric form.
{{CURRENTDAYNAME}} Thursday Displays the current day in named form.
{{CURRENTDOW}} 4 Displays the current day as a number of the week (0=Sunday, 1=Monday...).
{{CURRENTMONTH}} 05 Displays the current month in numeric form.
{{CURRENTMONTHABBREV}} May Displays the abbreviation of the current month.
{{CURRENTMONTHNAME}} May Displays the current month in named form.
{{CURRENTMONTHNAMEGEN}} May Displays the name of the current month in genitive form. Wikis that don't support this will default to {{CURRENTMONTHNAME}}.
{{CURRENTTIME}} 12:48 Displays the current time of day (hours:minutes).
{{CURRENTHOUR}} 12 Displays the current hour in numeric form.
{{CURRENTWEEK}} 18 Displays the number of the current week (1-52).
{{CURRENTYEAR}} 2024 Returns the current year.


Page names, locations, and URLs

Word Example Explanation
{{PAGENAME}} Magic Words Returns the name of the current page, including all levels (Title/Subtitle/Sub-subtitle).
{{PAGENAMEE}} Magic_Words More URL-friendly percent encoded special characters (rarely necessary).
{{SUBPAGENAME}}
{{SUBPAGENAMEE}}
Magic Words
Magic_Words
Name of the current page, excluding parent pages ("Subtitle" on "Title/Other/Subtitle") in namespaces supporting subpages.
{{BASEPAGENAME}}
{{BASEPAGENAMEE}}
Magic Words
Magic_Words
The basename of a subpage ("Title/Other" on "Title/Other/Subtitle").
{{NAMESPACE}} Help Returns the name of the namespace the current page resides in.
{{FULLPAGENAME}}
{{FULLPAGENAMEE}}
Help:Magic Words
Help:Magic_Words
Shorthands for NAMESPACE+PAGENAME
{{TALKSPACE}}
{{TALKSPACEE}}
Help talk
Help_talk
Name of next odd namespace (e.g. 4 => 5)
{{SUBJECTSPACE}}
{{SUBJECTSPACEE}}
Help
Help
Name of last even namespace (e.g. 5 => 4)
{{ARTICLESPACE}}
{{ARTICLESPACEE}}
Help
Help
An alias for SUBJECTSPACE(E)
{{TALKPAGENAME}}
{{TALKPAGENAMEE}}
Help talk:Magic Words
Help_talk:Magic_Words
FULLPAGENAME in its TALKSPACE
{{SUBJECTPAGENAME}}
{{SUBJECTPAGENAMEE}}
Help:Magic Words
Help:Magic_Words
FULLPAGENAME in its SUBJECTSPACE
{{ARTICLEPAGENAME}}
{{ARTICLEPAGENAMEE}}
Help:Magic Words
Help:Magic_Words
An alias for SUBJECTPAGENAME(E)
{{REVISIONID}} 1423976 Gives you the unique identifying number of the article or diff database.
{{REVISIONDAY}} 30 The day on which the page was last modified.
{{REVISIONDAY2}} 30 The day on which the page was last modified, but with a leading zero (01 .. 31).
{{REVISIONMONTH}} 03 The month in which the page was last modified.
{{REVISIONYEAR}} 2009 The year in which the page was last modified.
{{REVISIONTIMESTAMP}} 20090330005403 ISO 8601 time stamp, indicating when the page was last modified.
{{SITENAME}} The Urban Dead Wiki Returns the name of the wiki (set in LocalSettings.php).
{{NS:}} {{NS:4}} = UDWiki
{{NS:PROJECT}} = UDWiki
Returns the name of a given namespace number.
{{LOCALURL:x y}}
{{LOCALURLE:%}}
/index.php/X_y
/index.php/%25
Returns the local URL of a given page. The page might not exist.
{{SERVER}} //wiki.urbandead.com Returns the domain and subdomain URL of the wiki.
{{SCRIPTPATH}} Returns the value of $wgScriptPath in LocalSettings.php.
{{SERVERNAME}} wiki.urbandead.com Returns the value of $wgServerName in LocalSettings.php.

Miscellaneous

Word Usage Explanation
{{NUMBEROFARTICLES}} 19,389 A variable which returns the total number of articles on the Wiki.
{{NUMBEROFFILES}} 22,056 Returns the number of uploaded files (rows in the image table).
#redirect #REDIRECT [[target]]
at top of source page
Creates a redirect to another page.


Editing Help
Basic Editing

Advanced Editing

Advanced Timesavers

Page Tricks

Communicating your Edits

Miscellaneous

Policies and Guidelines
Guidelines

Policy Documents