Open main menu

lensowiki β

Changes

Help:MediaWiki namespace/old

2,762 bytes added, 07:54, 13 June 2006
cruft removed from main page
:''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 [[en:Wikipedia:Articles for deletion|AFD]] notices and [[w:Wikipedia:stub|stub]] warnings. Instead of pasting in the stub warning from [[en:Wikipedia:Boilerplate text]], you could just type <nowiki>{{SUBST:stub}}</nowiki>.

A new custom message can be created by making a link in the MediaWiki namespace, such as <nowiki>[[MediaWiki:Example]]</nowiki> 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 <nowiki>{{NUMBEROFARTICLES}}</nowiki>

:Example: <nowiki>{{msg:rcnote}}</nowiki> &rarr; Below are the last '''$1''' changes in last '''$2''' days.


===MSGNW===

:Same as MSG, except the message is enclosed in <nowiki><nowiki></nowiki> tags.

:Example: <nowiki>{{msgnw:rcnote}}</nowiki>

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 [[Help:Filling the page|wikitext]], they will just see the message itself. This is similar to the "pipe trick" and signing on Talk pages, see [[Help:Editing]].

:Example: <nowiki>{{subst:rcnote}}</nowiki>

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 <nowiki>{{msg:something}}</nowiki> contains a <nowiki>[[wikilink]]</nowiki> 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 <nowiki>{{msg:something}}</nowiki> you have to use ''"What links here"'' of '''MediaWiki:something'''.

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

[[Category:English documentation|{{PAGENAME}}]]
Anonymous user