Help:MediaWiki namespace/old

From SacredWiki
Revision as of 22:01, 10 October 2013 by Schot (talk | contribs) (1 revision: Updating our Help Pages)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The following text affects MediaWiki versions before 1.3

MediaWiki version 1.2.6

For versions before 1.3, another important function of the MediaWiki namespace is to provide customised, often used messages to use in articles.

Besides use by the PHP script, messages can be accessed from inside articles. There are three special tags for this purpose, listed below. This makes it possible to create messages for boilerplate text, such as AFD notices and stub warnings. Instead of pasting in the stub warning from en:Wikipedia:Boilerplate text, you could just type {{SUBST:stub}}.

A new custom message can be created by making a link in the MediaWiki namespace, such as [[MediaWiki:Example]] and editing the page with the text you wish it to contain. You may want to consider protecting the messages you create. Also list any new pages in the MediaWiki namespace in the appropriate page that tracks them.

MSG

Displays a message as the page is rendered, similar to {{NUMBEROFARTICLES}}
Example: {{msg:rcnote}} → Below are the last $1 changes in last $2 days.

MSGNW

Same as MSG, except the message is enclosed in <nowiki> tags.
Example: {{msgnw:rcnote}}

See also Help:Template#msgnw.

SUBST

Same as MSG, except that the message is substituted as the page is saved, not as it is viewed. So if someone edits the page later on, they will not see the tag in the wikitext, they will just see the message itself. This is similar to the "pipe trick" and signing on Talk pages, see Help:Editing.
Example: {{subst:rcnote}}

If you want to use a modified version of the standard message, you have to save the standard version first, then edit it, because when applying preview the subst code is not yet replaced by the standard message in the edit box. In the edit summary of the temporary edit you can put "tmp" to indicate that you have not made an error but are still working on the page.

See also Help:Template#subst.

Backlinks

It is very important to realise that if {{msg:something}} contains a [[wikilink]] then "What links here" on wikilink page will not show the article containing the msg, but MediaWiki:something instead. This behaviour was requested by editor consensus.

To see the backlinks to pages using {{msg:something}} you have to use "What links here" of MediaWiki:something.

(This problem doesn't exist when using subst.)