Help:Magic words (Difference between revisions)
From The Giant: The Definitive Obey Giant Site
(→<nowiki>$1px</nowiki>) |
m |
||
(27 intermediate revisions by one user not shown) | |||
Line 2: | Line 2: | ||
== <nowiki>#redirect</nowiki> == | == <nowiki>#redirect</nowiki> == | ||
− | Indicates a | + | Indicates a redirect |
== <nowiki>__NOTOC__</nowiki> == | == <nowiki>__NOTOC__</nowiki> == | ||
Line 11: | Line 11: | ||
== <nowiki>__TOC__</nowiki> == | == <nowiki>__TOC__</nowiki> == | ||
− | Place the table of contents here. | + | Place the table of contents here. |
== <nowiki>__NOEDITSECTION__</nowiki> == | == <nowiki>__NOEDITSECTION__</nowiki> == | ||
Line 20: | Line 20: | ||
== <nowiki>CURRENTMONTH</nowiki> == | == <nowiki>CURRENTMONTH</nowiki> == | ||
− | A | + | A variable. |
{{CURRENTMONTH}} | {{CURRENTMONTH}} | ||
== <nowiki>CURRENTMONTHNAME</nowiki> == | == <nowiki>CURRENTMONTHNAME</nowiki> == | ||
− | A | + | A variable. |
{{CURRENTMONTHNAME}} | {{CURRENTMONTHNAME}} | ||
== <nowiki>CURRENTDAY</nowiki> == | == <nowiki>CURRENTDAY</nowiki> == | ||
− | A | + | A variable. |
{{CURRENTDAY}} | {{CURRENTDAY}} | ||
== <nowiki>CURRENTDAYNAME</nowiki> == | == <nowiki>CURRENTDAYNAME</nowiki> == | ||
− | A | + | A variable. |
{{CURRENTDAYNAME}} | {{CURRENTDAYNAME}} | ||
== <nowiki>CURRENTYEAR</nowiki> == | == <nowiki>CURRENTYEAR</nowiki> == | ||
− | A | + | A variable. |
{{CURRENTYEAR}} | {{CURRENTYEAR}} | ||
== <nowiki>CURRENTTIME</nowiki> == | == <nowiki>CURRENTTIME</nowiki> == | ||
− | A | + | A variable. |
− | {{CURRENTTIME}} | + | <nowiki>{{CURRENTTIME}}=</nowiki>{{CURRENTTIME}} |
== <nowiki>NUMBEROFARTICLES</nowiki> == | == <nowiki>NUMBEROFARTICLES</nowiki> == | ||
− | A | + | A variable. |
{{NUMBEROFARTICLES}} | {{NUMBEROFARTICLES}} | ||
== <nowiki>CURRENTMONTHNAMEGEN</nowiki> == | == <nowiki>CURRENTMONTHNAMEGEN</nowiki> == | ||
− | A | + | A variable. |
{{CURRENTMONTHNAMEGEN}} | {{CURRENTMONTHNAMEGEN}} | ||
== <nowiki>PAGENAME</nowiki> == | == <nowiki>PAGENAME</nowiki> == | ||
− | A | + | A variable. |
− | {{PAGENAME}} | + | <nowiki>{{PAGENAME}}</nowiki> = {{PAGENAME}} |
== <nowiki>PAGENAMEE</nowiki> == | == <nowiki>PAGENAMEE</nowiki> == | ||
− | A | + | A variable. |
− | {{PAGENAMEE}} | + | '''This Page=''' {{PAGENAMEE}} |
== <nowiki>NAMESPACE</nowiki> == | == <nowiki>NAMESPACE</nowiki> == | ||
− | A | + | A variable. |
− | {{NAMESPACE}} | + | '''This Page =''' {{NAMESPACE}} |
== <nowiki>MSG:</nowiki> == | == <nowiki>MSG:</nowiki> == | ||
− | A | + | A template modifier, i.e. <nowiki>{{msg:stub}}</nowiki> shows |
<nowiki>{{Stub}}</nowiki> | <nowiki>{{Stub}}</nowiki> | ||
Line 102: | Line 102: | ||
== <nowiki>thumbnail</nowiki> == | == <nowiki>thumbnail</nowiki> == | ||
− | An [[ | + | An [[image]] modifier. 'Thumb' has the same effect. |
− | [[Image: | + | <nowiki>[[Image:ImageName.jpg|thumbnail|Mediawiki]]</nowiki> |
== <nowiki>right</nowiki> == | == <nowiki>right</nowiki> == | ||
An image modifier. | An image modifier. | ||
− | [[Image: | + | <nowiki>[[Image:ImageName.jpg|right|Mediawiki]]</nowiki> |
== <nowiki>left</nowiki> == | == <nowiki>left</nowiki> == | ||
An image modifier. | An image modifier. | ||
− | [[Image:Mediawiki.png|left|Mediawiki]] | + | <nowiki>[[Image:Mediawiki.png|left|Mediawiki]]</nowiki> |
== <nowiki>none</nowiki> == | == <nowiki>none</nowiki> == | ||
An image modifier. | An image modifier. | ||
− | [[Image:Mediawiki.png|none|Mediawiki]] | + | <nowiki>[[Image:Mediawiki.png|none|Mediawiki]]</nowiki> |
== <nowiki>1px</nowiki> == | == <nowiki>1px</nowiki> == | ||
An image modifier. | An image modifier. | ||
− | [[Image:Mediawiki.png|142px|Mediawiki]] | + | <nowiki>[[Image:Mediawiki.png|142px|Mediawiki]]</nowiki> |
== <nowiki>center</nowiki> == | == <nowiki>center</nowiki> == | ||
An image modifier. Can also be spelled <nowiki>centre</nowiki>. | An image modifier. Can also be spelled <nowiki>centre</nowiki>. | ||
− | [[Image:Mediawiki.png|center|Mediawiki]] | + | <nowiki>[[Image:Mediawiki.png|center|Mediawiki]]</nowiki> |
== <nowiki>framed</nowiki> == | == <nowiki>framed</nowiki> == | ||
Line 135: | Line 135: | ||
− | [[Image:Mediawiki.png|framed|Mediawiki]] | + | <nowiki>[[Image:Mediawiki.png|framed|Mediawiki]]</nowiki> |
== <nowiki>INT:</nowiki> == | == <nowiki>INT:</nowiki> == | ||
− | A special | + | A special template. Used for UI messages. |
<code>mainpage</code>:<br /> | <code>mainpage</code>:<br /> | ||
Line 144: | Line 144: | ||
== <nowiki>SITENAME</nowiki> == | == <nowiki>SITENAME</nowiki> == | ||
− | A | + | A variable. |
− | {{SITENAME}} | + | <nowiki>{{SITENAME}}</nowiki> = {{SITENAME}} |
== <nowiki>NS:</nowiki> == | == <nowiki>NS:</nowiki> == | ||
− | A special | + | A special template. Gets the name of a given namespace number. |
<code>4</code>:<br /> | <code>4</code>:<br /> | ||
Line 155: | Line 155: | ||
== <nowiki>LOCALURL:</nowiki> == | == <nowiki>LOCALURL:</nowiki> == | ||
− | A special | + | A special template. Gets the local URL of the given page. |
<pre>{{localurl:Help:Magic words|section=0}}</pre> | <pre>{{localurl:Help:Magic words|section=0}}</pre> | ||
Line 162: | Line 162: | ||
== <nowiki>LOCALURLE:</nowiki> == | == <nowiki>LOCALURLE:</nowiki> == | ||
− | A special | + | A special template. Gets the local URL of the given page. |
<pre>{{localurle:Help:Magic words|section=0}}</pre> | <pre>{{localurle:Help:Magic words|section=0}}</pre> | ||
Line 169: | Line 169: | ||
== <nowiki>SERVER</nowiki> == | == <nowiki>SERVER</nowiki> == | ||
− | A | + | A variable. |
<nowiki>{{SERVER}}</nowiki> produces | <nowiki>{{SERVER}}</nowiki> produces | ||
{{SERVER}} | {{SERVER}} | ||
Line 190: | Line 190: | ||
== <nowiki>CURRENTWEEK</nowiki> == | == <nowiki>CURRENTWEEK</nowiki> == | ||
− | A | + | A variable, returning the number of the current week (1-52). |
{{CURRENTWEEK}} | {{CURRENTWEEK}} | ||
== <nowiki>CURRENTDOW</nowiki> == | == <nowiki>CURRENTDOW</nowiki> == | ||
− | A | + | A variable, returning the number of the current day of the week (0=Sunday, 1=Monday). |
{{CURRENTDOW}} | {{CURRENTDOW}} | ||
Line 202: | Line 202: | ||
==CURRENTMONTHABBREV== | ==CURRENTMONTHABBREV== | ||
− | A | + | A variable that returns the abbreviation of the current month. |
{{CURRENTMONTHABBREV}} | {{CURRENTMONTHABBREV}} | ||
==FULLURL:, FULLURLE:== | ==FULLURL:, FULLURLE:== | ||
− | Special [[ | + | Special [[templates]] that give the full URL of the given page. |
− | {{FULLURL:page}} | + | <nowiki>{{FULLURL:page}}</nowiki> |
==REVISIONID== | ==REVISIONID== |
Latest revision as of 23:07, 18 August 2006
This is an index of Magic words used in MediaWiki.
[edit] #redirect
Indicates a redirect
[edit] __NOTOC__
Hides the table of contents.
[edit] __FORCETOC__
Always show the table of contents.
[edit] __TOC__
Place the table of contents here.
[edit] __NOEDITSECTION__
Hide the edit links.
[edit] __START__
__START__ does nothing, and it is considered a magic word only because it has an ID in MagicWord.php (MAG_START
).
[edit] CURRENTMONTH
A variable.
02
[edit] CURRENTMONTHNAME
A variable.
February
[edit] CURRENTDAY
A variable.
12
[edit] CURRENTDAYNAME
A variable.
Wednesday
[edit] CURRENTYEAR
A variable.
2025
[edit] CURRENTTIME
A variable.
{{CURRENTTIME}}=21:55
[edit] NUMBEROFARTICLES
A variable.
2,477
[edit] CURRENTMONTHNAMEGEN
A variable.
February
[edit] PAGENAME
A variable.
{{PAGENAME}} = Magic words
[edit] PAGENAMEE
A variable.
This Page= Magic_words
[edit] NAMESPACE
A variable.
This Page = Help
[edit] MSG:
A template modifier, i.e. {{msg:stub}} shows
{{Stub}}
The use of msg has an effect when a template name clashes with a magic word. For example, if [[Template:CURRENTMONTHNAME]] contained "Test", then {{CURRENTMONTHNAME}} would display "February" but {{msg:CURRENTMONTHNAME}} would display "Test".
[edit] SUBST:
A template modifier. Replaces the reference to the template (e.g. {{subst:template}}) with the content of the template.
e.g. {{subst:stub}} copies the {{stub}} contents below to the article, without using the template.
This article is a stub. You can help Wikimedia by expanding it.
SUSBT: can be helpful to avoid the overuse of meta-templates.
[edit] MSGNW:
A template modifier. Causes the template source to be pasted.
So <pre>{{msgnw:stub}}</pre> outputs:
{{msgnw:stub}}
[edit] __END__
Allows for trailing whitespace to be deliberately included in the page save.
[edit] thumbnail
An image modifier. 'Thumb' has the same effect.
[[Image:ImageName.jpg|thumbnail|Mediawiki]]
[edit] right
An image modifier.
[[Image:ImageName.jpg|right|Mediawiki]]
[edit] left
An image modifier.
[[Image:Mediawiki.png|left|Mediawiki]]
[edit] none
An image modifier.
[[Image:Mediawiki.png|none|Mediawiki]]
[edit] 1px
An image modifier.
[[Image:Mediawiki.png|142px|Mediawiki]]
[edit] center
An image modifier. Can also be spelled centre.
[[Image:Mediawiki.png|center|Mediawiki]]
[edit] framed
An image modifier. Can also be spelled enframed or frame.
[[Image:Mediawiki.png|framed|Mediawiki]]
[edit] INT:
A special template. Used for UI messages.
mainpage
:
Main Page
[edit] SITENAME
A variable.
{{SITENAME}} = The Giant: The Definitive Obey Giant Site
[edit] NS:
A special template. Gets the name of a given namespace number.
4
:
The Giant: The Definitive Obey Giant Site
[edit] LOCALURL:
A special template. Gets the local URL of the given page.
{{localurl:Help:Magic words|section=0}}
yields
/wiki/index.php?title=Help:Magic_words§ion=0
[edit] LOCALURLE:
A special template. Gets the local URL of the given page.
{{localurle:Help:Magic words|section=0}}
yields
/wiki/index.php?title=Help:Magic_words§ion=0
[edit] SERVER
A variable. {{SERVER}} produces http://thegiant.org
[edit] GRAMMAR:
Useful for inflected languages to derive word forms. Usage: {{grammar:case|word}}, cases in which this could be used depend on the specific language.
E. g. in Czech language, {{grammar:1sg|Wikipedie}} outputs Wikipedie, while {{grammar:7sg|Wikipedie}} outputs Wikipedií.
[edit] __NOTITLECONVERT__
? Can also be spelled __NOTC__.
Same as below but Article Title only.
[edit] __NOCONTENTCONVERT__
? Can also be spelled __NOCC__.
Don't perform the content language(character & phase) conversion in article display.(eg, Chinese zh with zh_cn, zh_tw, zh_sg, zh_hk)
[edit] CURRENTWEEK
A variable, returning the number of the current week (1-52).
7
[edit] CURRENTDOW
A variable, returning the number of the current day of the week (0=Sunday, 1=Monday).
3
[edit] Since v1.5
[edit] CURRENTMONTHABBREV
A variable that returns the abbreviation of the current month.
Feb
[edit] FULLURL:, FULLURLE:
Special templates that give the full URL of the given page.
{{FULLURL:page}}
[edit] REVISIONID
Gives you the article or diff database
7703
[edit] SCRIPTPATH
Returns $wgScriptPath
/wiki
[edit] SERVERNAME
Returns $wgServerName
thegiant.org
[edit] NUMBEROFFILES
Returns the number of uploaded files (rows in the image table).
3,941