Difference between revisions of "Help:Magic words"
From WikiTemp, the GBAtemp wiki
m |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | MediaWiki | + | Magic words are strings of text that MediaWiki associates with a return value or function, such as time, site details, or page names. This page is about usage of standard magic words; for a complete list, see {{mw|Help:Magic_words}}. |
− | + | ==Behavior Switches== | |
− | {| | + | {| class="wikitable" style="width:75%" |
+ | !style="background:#A7C1F2;"|Input | ||
+ | !style="width:50%;background:#A7C1F2;"|Description | ||
|- | |- | ||
− | + | |<nowiki>__NOTOC__</nowiki> | |
− | + | |Hides the table of contents (TOC). | |
− | + | ||
|- | |- | ||
− | + | |<nowiki>__FORCETOC__</nowiki> | |
+ | |Forces TOC to appear. | ||
+ | |- | ||
+ | |<nowiki>__TOC__</nowiki> | ||
+ | |Forces TOC to appear on the place you typed this. | ||
+ | |- | ||
+ | |<nowiki>__NOEDITSECTION__</nowiki> | ||
+ | |Hides the [Edit] links on headers. | ||
+ | |- | ||
+ | |<nowiki>__NEWSECTIONLINK__</nowiki> | ||
+ | |Adds a "+" on the top to add a new section. | ||
+ | |- | ||
+ | |<nowiki>__NOGALLERY__</nowiki> | ||
+ | |Place this on a category to turn all Images in Links. | ||
+ | |} | ||
+ | |||
+ | ==Date & Page Variables== | ||
+ | {| class="wikitable" style="width:75%" | ||
+ | !style="background:#A7C1F2;"|Input | ||
+ | !style="width:33%;background:#A7C1F2;"|Result | ||
+ | !style="width:33%;background:#A7C1F2;"|Description | ||
|- | |- | ||
− | |||
|<nowiki>{{CURRENTMONTH}}</nowiki> | |<nowiki>{{CURRENTMONTH}}</nowiki> | ||
|{{CURRENTMONTH}} | |{{CURRENTMONTH}} | ||
+ | |The current month. | ||
|- | |- | ||
− | |||
|<nowiki>{{CURRENTMONTHNAME}}</nowiki> | |<nowiki>{{CURRENTMONTHNAME}}</nowiki> | ||
|{{CURRENTMONTHNAME}} | |{{CURRENTMONTHNAME}} | ||
+ | |Name of the current month. | ||
|- | |- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
|<nowiki>{{CURRENTMONTHABBREV}}</nowiki> | |<nowiki>{{CURRENTMONTHABBREV}}</nowiki> | ||
|{{CURRENTMONTHABBREV}} | |{{CURRENTMONTHABBREV}} | ||
+ | |Abbreviated month name. | ||
|- | |- | ||
− | |||
|<nowiki>{{CURRENTDAY}}</nowiki> | |<nowiki>{{CURRENTDAY}}</nowiki> | ||
|{{CURRENTDAY}} | |{{CURRENTDAY}} | ||
+ | |Day of the month. | ||
|- | |- | ||
− | |||
|<nowiki>{{CURRENTDOW}}</nowiki> | |<nowiki>{{CURRENTDOW}}</nowiki> | ||
|{{CURRENTDOW}} | |{{CURRENTDOW}} | ||
+ | |Day of the week. | ||
|- | |- | ||
− | |||
|<nowiki>{{CURRENTDAYNAME}}</nowiki> | |<nowiki>{{CURRENTDAYNAME}}</nowiki> | ||
|{{CURRENTDAYNAME}} | |{{CURRENTDAYNAME}} | ||
+ | |Name of the current day. | ||
|- | |- | ||
− | |||
|<nowiki>{{CURRENTWEEK}}</nowiki> | |<nowiki>{{CURRENTWEEK}}</nowiki> | ||
|{{CURRENTWEEK}} | |{{CURRENTWEEK}} | ||
+ | |The current week. | ||
|- | |- | ||
− | |||
|<nowiki>{{CURRENTYEAR}}</nowiki> | |<nowiki>{{CURRENTYEAR}}</nowiki> | ||
|{{CURRENTYEAR}} | |{{CURRENTYEAR}} | ||
+ | |The current year. | ||
|- | |- | ||
− | |||
|<nowiki>{{CURRENTTIME}}</nowiki> | |<nowiki>{{CURRENTTIME}}</nowiki> | ||
|{{CURRENTTIME}} | |{{CURRENTTIME}} | ||
+ | |The current time in HH:mm format. | ||
|- | |- | ||
− | |||
|<nowiki>{{NUMBEROFARTICLES}}</nowiki> | |<nowiki>{{NUMBEROFARTICLES}}</nowiki> | ||
|{{NUMBEROFARTICLES}} | |{{NUMBEROFARTICLES}} | ||
+ | |The number of articles in this Wiki. | ||
|- | |- | ||
− | |||
|<nowiki>{{NUMBEROFFILES}}</nowiki> | |<nowiki>{{NUMBEROFFILES}}</nowiki> | ||
|{{NUMBEROFFILES}} | |{{NUMBEROFFILES}} | ||
+ | |The number of uploaded files. | ||
+ | |} | ||
+ | |||
+ | ==Namespaces== | ||
+ | {|class="wikitable" style="width:75%" | ||
+ | !style="background:#A7C1F2;"|Input | ||
+ | !style="width:50%; background:#A7C1F2;"|Result | ||
|- | |- | ||
− | |||
− | |||
− | |||
|<nowiki>{{ns:-2}} or {{ns:Media}}</nowiki> | |<nowiki>{{ns:-2}} or {{ns:Media}}</nowiki> | ||
|{{ns:-2}} | |{{ns:-2}} | ||
|- | |- | ||
− | |||
|<nowiki>{{ns:-1}} or {{ns:Special}}</nowiki> | |<nowiki>{{ns:-1}} or {{ns:Special}}</nowiki> | ||
|{{ns:-1}} | |{{ns:-1}} | ||
|- | |- | ||
− | |||
|<nowiki>{{ns:1}} or {{ns:Talk}}</nowiki> | |<nowiki>{{ns:1}} or {{ns:Talk}}</nowiki> | ||
| {{ns:1}} | | {{ns:1}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:2}} or {{ns:User}}</nowiki> | | <nowiki>{{ns:2}} or {{ns:User}}</nowiki> | ||
| {{ns:2}} | | {{ns:2}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:3}} or {{ns:User_talk}}</nowiki> | | <nowiki>{{ns:3}} or {{ns:User_talk}}</nowiki> | ||
| {{ns:3}} | | {{ns:3}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:4}} or {{ns:Project}}</nowiki> | | <nowiki>{{ns:4}} or {{ns:Project}}</nowiki> | ||
| {{ns:4}} | | {{ns:4}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:5}} or {{ns:Project_talk}}</nowiki> | | <nowiki>{{ns:5}} or {{ns:Project_talk}}</nowiki> | ||
| {{ns:5}} | | {{ns:5}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:6}} or {{ns:Image}}</nowiki> | | <nowiki>{{ns:6}} or {{ns:Image}}</nowiki> | ||
| {{ns:6}} | | {{ns:6}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:7}} or {{ns:Image_talk}}</nowiki> | | <nowiki>{{ns:7}} or {{ns:Image_talk}}</nowiki> | ||
| {{ns:7}} | | {{ns:7}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:8}} or {{ns:MediaWiki}}</nowiki> | | <nowiki>{{ns:8}} or {{ns:MediaWiki}}</nowiki> | ||
| {{ns:8}} | | {{ns:8}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:9}} or {{ns:MediaWiki_talk}}</nowiki> | | <nowiki>{{ns:9}} or {{ns:MediaWiki_talk}}</nowiki> | ||
| {{ns:9}} | | {{ns:9}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:10}} or {{ns:Template}}</nowiki> | | <nowiki>{{ns:10}} or {{ns:Template}}</nowiki> | ||
| {{ns:10}} | | {{ns:10}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:11}} or {{ns:Template_talk}}</nowiki> | | <nowiki>{{ns:11}} or {{ns:Template_talk}}</nowiki> | ||
| {{ns:11}} | | {{ns:11}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:12}} or {{ns:Help}}</nowiki> | | <nowiki>{{ns:12}} or {{ns:Help}}</nowiki> | ||
| {{ns:12}} | | {{ns:12}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:13}} or {{ns:Help_talk}}</nowiki> | | <nowiki>{{ns:13}} or {{ns:Help_talk}}</nowiki> | ||
| {{ns:13}} | | {{ns:13}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:14}} or {{ns:Category}}</nowiki> | | <nowiki>{{ns:14}} or {{ns:Category}}</nowiki> | ||
| {{ns:14}} | | {{ns:14}} | ||
|- | |- | ||
− | |||
| <nowiki>{{ns:15}} or {{ns:Category_talk}}</nowiki> | | <nowiki>{{ns:15}} or {{ns:Category_talk}}</nowiki> | ||
| {{ns:15}} | | {{ns:15}} | ||
+ | |} | ||
+ | |||
+ | ==Server specific== | ||
+ | {|class="wikitable" style="width:75%" | ||
+ | !style="background:#A7C1F2;"|Input | ||
+ | !style="width:33%;background:#A7C1F2;"|Result | ||
+ | !style="width:33%;background:#A7C1F2;"|Description | ||
|- | |- | ||
− | |||
− | |||
− | |||
| <nowiki>{{SITENAME}}</nowiki> | | <nowiki>{{SITENAME}}</nowiki> | ||
| {{SITENAME}} | | {{SITENAME}} | ||
+ | |Name of the site. | ||
|- | |- | ||
− | |||
| <nowiki>{{SERVERNAME}}</nowiki> | | <nowiki>{{SERVERNAME}}</nowiki> | ||
| {{SERVERNAME}} | | {{SERVERNAME}} | ||
+ | |Name of the server. | ||
|- | |- | ||
− | |||
| <nowiki>{{SERVER}}</nowiki> | | <nowiki>{{SERVER}}</nowiki> | ||
| {{SERVER}} | | {{SERVER}} | ||
+ | |Link to the server. | ||
|- | |- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| <nowiki>{{localurl:pagename}}</nowiki> | | <nowiki>{{localurl:pagename}}</nowiki> | ||
| {{localurl:pagename}} | | {{localurl:pagename}} | ||
− | |||
| | | | ||
+ | |- | ||
| <nowiki>{{localurl:pagename|</nowiki>''query string''<nowiki>}}</nowiki> | | <nowiki>{{localurl:pagename|</nowiki>''query string''<nowiki>}}</nowiki> | ||
| {{localurl:pagename|''query string''}} | | {{localurl:pagename|''query string''}} | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | ==Page related== | ||
+ | {| class="wikitable" style="width:75%" | ||
|- | |- | ||
− | ! | + | !style="background:#A7C1F2;"|Input |
+ | !style="width:33%;background:#A7C1F2;"|Result | ||
+ | !style="width:33%;background:#A7C1F2;"|Description | ||
|- | |- | ||
− | |||
| <nowiki>{{PAGENAME}}</nowiki> | | <nowiki>{{PAGENAME}}</nowiki> | ||
| {{PAGENAME}} | | {{PAGENAME}} | ||
+ | |Pagename without Namespace. | ||
|- | |- | ||
− | |||
| <nowiki>{{PAGENAMEE}}</nowiki> | | <nowiki>{{PAGENAMEE}}</nowiki> | ||
| {{PAGENAMEE}} | | {{PAGENAMEE}} | ||
+ | |URL encoded pagename. | ||
|- | |- | ||
− | |||
| <nowiki>{{NAMESPACE}}</nowiki> | | <nowiki>{{NAMESPACE}}</nowiki> | ||
| {{NAMESPACE}} | | {{NAMESPACE}} | ||
+ | |Current Namespace. | ||
+ | |- | ||
+ | | <nowiki>{{SUBJECTSPACE}}</nowiki> | ||
+ | | {{SUBJECTSPACE}} | ||
+ | |Associated Subjectspace. | ||
+ | |- | ||
+ | | <nowiki>{{TALKSPACE}}</nowiki> | ||
+ | | {{TALKSPACE}} | ||
+ | |Associated Talkspace. | ||
+ | |- | ||
+ | | <nowiki>{{FULLPAGENAME}}</nowiki> | ||
+ | | {{FULLPAGENAME}} | ||
+ | |Pagename with Namespace. | ||
|- | |- | ||
− | |||
| <nowiki>{{REVISIONID}}</nowiki> | | <nowiki>{{REVISIONID}}</nowiki> | ||
| {{REVISIONID}} | | {{REVISIONID}} | ||
+ | |The unique revision ID. | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | [[Category:Help| | + | [[Category:Help|Magic words]] |
Latest revision as of 11:53, 19 September 2010
Magic words are strings of text that MediaWiki associates with a return value or function, such as time, site details, or page names. This page is about usage of standard magic words; for a complete list, see Help:Magic_words .
Behavior Switches
Input | Description |
---|---|
__NOTOC__ | Hides the table of contents (TOC). |
__FORCETOC__ | Forces TOC to appear. |
__TOC__ | Forces TOC to appear on the place you typed this. |
__NOEDITSECTION__ | Hides the [Edit] links on headers. |
__NEWSECTIONLINK__ | Adds a "+" on the top to add a new section. |
__NOGALLERY__ | Place this on a category to turn all Images in Links. |
Date & Page Variables
Input | Result | Description |
---|---|---|
{{CURRENTMONTH}} | 11 | The current month. |
{{CURRENTMONTHNAME}} | November | Name of the current month. |
{{CURRENTMONTHABBREV}} | Nov | Abbreviated month name. |
{{CURRENTDAY}} | 22 | Day of the month. |
{{CURRENTDOW}} | 5 | Day of the week. |
{{CURRENTDAYNAME}} | Friday | Name of the current day. |
{{CURRENTWEEK}} | 47 | The current week. |
{{CURRENTYEAR}} | 2024 | The current year. |
{{CURRENTTIME}} | 19:21 | The current time in HH:mm format. |
{{NUMBEROFARTICLES}} | 994 | The number of articles in this Wiki. |
{{NUMBEROFFILES}} | 1,072 | The number of uploaded files. |
Namespaces
Input | Result |
---|---|
{{ns:-2}} or {{ns:Media}} | Media |
{{ns:-1}} or {{ns:Special}} | Special |
{{ns:1}} or {{ns:Talk}} | Talk |
{{ns:2}} or {{ns:User}} | User |
{{ns:3}} or {{ns:User_talk}} | User talk |
{{ns:4}} or {{ns:Project}} | WikiTemp |
{{ns:5}} or {{ns:Project_talk}} | WikiTemp talk |
{{ns:6}} or {{ns:Image}} | File |
{{ns:7}} or {{ns:Image_talk}} | File talk |
{{ns:8}} or {{ns:MediaWiki}} | MediaWiki |
{{ns:9}} or {{ns:MediaWiki_talk}} | MediaWiki talk |
{{ns:10}} or {{ns:Template}} | Template |
{{ns:11}} or {{ns:Template_talk}} | Template talk |
{{ns:12}} or {{ns:Help}} | Help |
{{ns:13}} or {{ns:Help_talk}} | Help talk |
{{ns:14}} or {{ns:Category}} | Category |
{{ns:15}} or {{ns:Category_talk}} | Category talk |
Server specific
Input | Result | Description |
---|---|---|
{{SITENAME}} | WikiTemp | Name of the site. |
{{SERVERNAME}} | wiki.gbatemp.net | Name of the server. |
{{SERVER}} | //wiki.gbatemp.net | Link to the server. |
{{localurl:pagename}} | /wiki/Pagename | |
{{localurl:pagename|query string}} | /wiki/Pagename?query string |
Input | Result | Description |
---|---|---|
{{PAGENAME}} | Magic words | Pagename without Namespace. |
{{PAGENAMEE}} | Magic_words | URL encoded pagename. |
{{NAMESPACE}} | Help | Current Namespace. |
{{SUBJECTSPACE}} | Help | Associated Subjectspace. |
{{TALKSPACE}} | Help talk | Associated Talkspace. |
{{FULLPAGENAME}} | Help:Magic words | Pagename with Namespace. |
{{REVISIONID}} | 36162 | The unique revision ID. |