Aiuto:Parole magiche: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
IPork (discussione | contributi)
m Lavori in corso sulla pagina
(Nessuna differenza)

Versione delle 21:05, 1 gen 2008





A "magic word" is a symbol recognized by the MediaWiki software and which when seen in the non-commented text of the page, 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.

A magic word can be:

  • an upper case word, preceded and followed by two underscores, e.g. __NOTOC__
  • an XML object, coded similar to HTML, preceded by "<" (and for the end tag "/") and followed by ">", as in <nowiki>...</nowiki>
  • a parser function: similar to a template, a word preceded by the symbols "{{" and followed by "}}", and optionally parameter definitions between pipe characters, except that the part before the first pipe (or without pipes, the text between the braces) contains a colon (":"), e.g. {{ns:3}} and {{#ifexpr:{{{1}}}>3|large|small}}
  • a variable: similar to a template without parameters, a word preceded by the symbols "{{" and followed by "}}", except the word used is in all upper case, e.g. {{CURRENTDAY}}
  • a template modifier
  • an image modifier

If a page in the template namespace has the same name as a magic word, the magic word will be invoked instead. If you discover you absolutely have to define a template with the same name as a magic word, prefix the name of the template with "msg:" or the name of the template namespace ("Template:"). See below for further details if you need this feature.

Tags which are used on this page such as "[MW1.5+]" indicate the MediaWiki version that first supported the magic word. "XYZ" indicates user input, which is used in the example.



Domande?

Se hai domande, dubbi, proposte o necessiti di chiarimenti sulle "parole magiche" premi qui e lascia un messaggio nella pagina di discussione.