No categories assigned

MagicWords

Revision as of 12:49, 19 December 2018 by Fbaeckmann (talk | contribs) (Further Information)


What are Magic Words?

A "magic word" is a symbol recognized by the MediaWiki software. It triggers the software to do something other than display that symbol, or transclude a page with that name, but instead to use the symbol directly.


How to use Magic Words

  1. Klick on edit on designated page
  2. You can insert MagicWords with a special tool named InsertMagic.
    You can choose between WYSIWYG editor InsertMagic.png and wiki code InsertMagic-code.png to insert MagicWords with InsertMagic. But it is also possible to type MagicWords into the wiki code.
  3. Write magic word on designated place

There can be distinguished three major kinds of magic words (behavior switches and variables) which will be defined in the following.

Behavior switch

A behavior switch is a directive. It includes or omits certain elements of the page interface or constitutes a call to various parts of the pages standard layout. It is characterised by using an upper case word, preceded and followed by two underscores.

Behavior switches can be put anywhere in the WikiCode of the designated page (usually written at the end of a page). One Exception is __TOC__ as it defines the place for the table of contents by being on the designated spot in the WikiCode.

Behavior switch Explanation
__NOEDITOR___ Prevents the use of WYSYWIG on current page
__NOTOC__ Hides the table of contents (ToC) on current page
__TOC__ Places ToC here (overriding any __NOTOC__). But: Multiple ToCs on one page are not supportet. If __TOC__ is used several times, only the first occurence causes a ToC to appear.
__NOEDITSECTION__ Hides the edit links beside headings.
__NEWSECTIONLINK__ Gives a "+"-link next to the edit-tab to make a new section on a non-talk page.

Variable

Built-in variables

Variable Output Description
{{SITENAME}} BlueSpice Wiki Name of the wiki
{{CURRENTTIME}} 08:53 Time (24-hour HH:mm format)
{{CURRENTDAY}} 22 Day of the month (unpadded number)
{{CURRENTMONTH}} 11 Month (zero-padded number)
{{NUMBEROFARTICLES}} 651 shows how many articles exist in wiki
{{NAMESPACE}} Manual tells namespace of the page
{{PAGENAME}} MagicWords Name of actual page

Variables taylored by HalloWelt

Variable Output Description
{{#hwinfobox:}} shows five latest changes and date when they occured
{{{#userslink:(who?)}} names all users who are online

Variables are words which are preceded by the symbols "{{" and followed by "}}" and followed by " }}" and followed by " }}". The word used is in all upper case.

Variables can be written into the WikiCode at designated place.


Further Information

Help on wikimedia.org

Attachments

Discussions