Wikia

WoWWiki

Help:Variable

Talk0
102,280pages on
this wiki

Redirected from Help:Variables

HELP CONTENTS · Getting Started · New to WoWWIKI · Editing WoWWIKI · Editing WoWWIKI (advanced)
The WoWWIKI Community · Additional Help · Mists-Logo-Small Updating for Mists of Pandaria
See Wikia Help for general Wikia- and wiki- related help. See Metawiki logo 18x18 Meta-Wiki HelpIntro for basic MediaWiki usage!

This is a list of variables (technically variable magic words) that can be used in the wikitext. The way they are rendered depends on the time, on the project, or on the page in which it occurs.

On the left is the variable, on the right how it is rendered at this time, in this project, on this page.


Constant, only depending on the project and parameters Edit

{{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}} WoWWiki
{{ns:5}} or {{ns:Project_talk}} WoWWiki 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
(depending on custom namespaces)
{{ns:110}} or {{ns:Forum}} Forum
{{ns:111}} or {{ns:Forum talk}} Forum talk rarely used
{{ns:112}} or {{ns:Guild}} Guild
{{ns:113}} or {{ns:Guild talk}} Portal talk
{{ns:114}} or {{ns:Server}} Server
{{ns:115}} or {{ns:Portal talk}} Server talk
{{ns:116}} or {{ns:Portal}} Portal
{{ns:117}} or {{ns:Portal talk}} Portal talk
{{ns:118}} or {{ns:Quest}} Quest
{{ns:119}} or {{ns:Quest talk}} Quest talk
{{ns:800}} or {{ns:Poll}} Poll
{{ns:801}} or {{ns:Poll talk}} Poll talk
{{SITENAME}} WoWWiki
{{SERVER}} http://www.wowwiki.com
{{localurl:pagename}} /Pagename
{{localurl:pagename|query string}} /Pagename?query string
{{int:fromwikipedia}} <fromwikipedia>

"INT:" is used to get text from wfMsg, such as messages in the LanguageXx.php file (see example over). It is short for "internal".

The full list from the API.

Varying with time Edit

{{CURRENTMONTH}} 12
{{CURRENTMONTHNAME}} December
{{CURRENTMONTHNAMEGEN}} December
{{CURRENTDAY}} 27
{{CURRENTDAYNAME}} Saturday
{{CURRENTYEAR}} 2014
{{CURRENTTIME}} 05:00
{{NUMBEROFARTICLES}} 102,280

NUMBEROFARTICLES: number of pages in the main namespace which contain a link and are not a redirect, i.e. number of articles, stubs containing a link, and disambiguation pages.

This depends on system variable $wgUseCommaCount If true, article count will only include those with commas (","). If false, will only count those with links ("[["). The default set in DefaultSettings.php is false, this can be changed in LocalSettings.php.

CURRENTMONTHNAMEGEN: is the genitive grammatical form of the month name (used in Finnish).

Depending on page Edit

{{NAMESPACE}} Help
{{PAGENAME}} Variable
{{PAGENAMEE}} Variable

PAGENAMEE displays the page title in the form that is used in URLs, i.e. with underscores for spaces, and escape codes for special characters, and is therefore used for constructing URLs. For example, on a page called "Another test", PAGENAMEE would produce "Another_test" rather than "Another test". See also Variables {{PAGENAME}} and {{PAGENAMEE}}

When used in a template, these three variables refer to the page in which the template is included, not to the template page.


Examples of combinations Edit

{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAMEE}}|action=edit}} http://www.wowwiki.com/Help:Variable?action=edit
{{SERVER}}{{localurl:Special:Whatlinkshere|target={{NAMESPACE}}:{{PAGENAMEE}}}}http://www.wowwiki.com/Special:Whatlinkshere?target=Help:Variable
[[{{NAMESPACE}}:{{PAGENAMEE}}_1]] Help:Variable_1
{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAMEE}}_1}} http://www.wowwiki.com/Help:Variable_1

In a template, for a link to a page which depends on a template parameter, the external link style is used even for internal links, to avoid that the system links to the edit page even if the page exists. To construct the external link, variables can also be useful.


See also Edit

Around Wikia's network

Random Wiki