Pomoc:Wariable

Pomoc

Wariable słuža w MediaWiki za to, zasunyć definitne hódnosće, kotrež móža so přeměnić, do nastawka, na přik. datum a čisło nastawkow.

This is an organized index of Magic words used in MediaWiki.

A "magic word" is a symbol which is 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 version that first supported the magic word. "XYZ" indicates user input, which is used in the example.

Mjezy dwójnymi delnimi smuhami

Za wobsah

Magic WordsWopisanje
__TOC__wunuća zaměstnjenje wobsaha na tutym městnje w teksće
__NOTOC__wotšaltuje wobsah
__FORCETOC__wunuća wobsah, samo jeli mjeńše hač tři nadpisy eksistuja

Druhe

Magic WordsWopisanje
__NOEDITSECTION__wotšaltuje na cyłej stronje wobdźěłanske wotkazy za wotrězki
__NEWSECTIONLINK__[MW1.7+] zasadźuje „+“ naprawo wot „wobdźěłać“. Tak móže so tež na njediskusijnych stronach nowy wotrězk płodźić
__NOCONTENTCONVERT___

___NOCC__

Don't perform the content language conversion (character and phase) in article display; for example, Chinese zh with zh_cn, zh_tw, zh_sg, zh_hk.
__NOGALLERY__[MW1.7+] pokaza w kategorijach datajowe mjena wot medijow w formje lisćinow. Přehladka bu potłóčowana.
__NOTITLECONVERT__

__NOTC__

Like __NOCC__ but affecting article title only.
__START__bjez efekta.
__END__zmóžnjuje kaž štó chce wjele prózdne rumy (jendź. Whitespace) na kóncu inputa. Bu při składowanja strony wotstronjeny.

XML-stilowe "tags"y

nowiki: <nowiki>...</nowiki>, disables expansion/interpretation of templates, link syntax, formatting syntax, atd.: <nowiki>'''[[{{tc}}]]'''</nowiki> přinjese '''[[{{tc}}]]'''

pre: <pre>...</pre>, ditto, also for multiple lines; it is rendered with a new paragraph at the start and end: a <pre>'''[[{{tc}}]]'''</pre>b gives a

'''[[{{tc}}]]'''

b

math: <math>...</math>, e.g. <math>\sqrt{a^2+b^2}</math> gives ; see Help:Displaying a formula

hiero: <hiero>...</hiero>, e.g. <hiero>A1</hiero> gives:

A1
Magic WordsWopisanje
ISBN NummerErzeugt einen Link auf die Spezialseite ISBN-Suche. Der Parameter Nummer wird als ISBN übergeben und dort für eine weiterführende Büchersuche zur Verfügung gestellt. Innerhalb der Nummer müssen die Leerzeichen durch Bindestriche ersetzt werden, z.B. ISBN 3-609-64810-4.
PMID NummerErzeugt einen Weblink auf das entsprechende PubMed-Dokument über Biotechnologie der nationalen medizinischen Bibliothek der USA.
RFC NummerErzeugt einen Weblink auf das entsprechende RFC-Dokument: http://www.ietf.org/rfc/rfcNummer.txt

Wariable

Čas

Wariabla

UTC/lokal

aktueller Wert

UTC/lokal

Wopisanje
{{CURRENTMONTH}}

{{LOCALMONTH}}

03

03

měsac
{{CURRENTMONTHNAME}}

{{LOCALMONTHNAME}}

měrca

měrca

mjeno měsaca
{{CURRENTMONTHNAMEGEN}}

{{LOCALMONTHNAMEGEN}}

měrca

měrca

mjeno měsaca w genitiwnej formje
{{CURRENTMONTHABBREV}}

{{LOCALMONTHABBREV}}

měr

měr

skrótšene mjeno měsaca
{{CURRENTDAY}}

{{LOCALDAY}}

28

28

dźeń
{{CURRENTDAY2}}

{{LOCALDAY2}}

28

28

dźeń dwuměstnowy (ewentuelnje z wjedźenej nulu)
{{CURRENTDOW}}

{{LOCALDOW}}

4

4

čisło wšědneho dnja (njedźela=0)
{{CURRENTDAYNAME}}

{{LOCALDAYNAME}}

Štwórtk

Štwórtk

mjeno wšědneho dnja
{{CURRENTWEEK}}

{{LOCALWEEK}}

13

13

kalendrowy tydźeń
{{CURRENTYEAR}}

{{LOCALYEAR}}

2024

2024

lěto
{{CURRENTHOUR}}

{{LOCALHOUR}}

12

13

hodźina
{{CURRENTTIME}}

{{LOCALTIME}}

12:20

13:20

čas
{{CURRENTTIMESTAMP}}

{{LOCALTIMESTAMP}}

20240328122047

20240328132047

časowy kołk

Statistiki

WariablaPřikładna hódnosćFunkcija
{{CURRENTVERSION}}1.42.0-wmf.23 (768fd92)Wersijowe čisło aktualneje MediaWikineje Wersije wužiwana za wikimedia.org-Projekty
{{NUMBEROFEDITS}}

{{NUMBEROFEDITS:R}}

{{NUMBEROFPAGES}}35.621ličba wšěch stronow
{{NUMBEROFARTICLES}}13.933ličba nastawkow (inkl. zapřiječowe wujasnjenja, ekskl. dale posrědkowanja)
{{NUMBEROFFILES}}129ličba datajow (wobrazy atd.)
{{NUMBEROFUSERS}}25.212ličba registrowanych wužiwarjow
{{NUMBEROFADMINS}}4ličba administratorow

Stronowe mjena a so poćahowace informacije

WariablaPřikładna hódnosćFunkcija
{{PAGENAME}}WariableTitul strony
{{PAGENAMEE}}WariableTitul strony z delnimi smuhami město prózdnotow
{{SUBPAGENAME}}

{{SUBPAGENAMEE}}

Wariable
Wariable
[MW 1.6+] Name of the current page, excluding parent pages ("Subtitle" on "Title/Other/Subtitle") in namespaces supporting subpages, see Help:Link.
{{BASEPAGENAME}}WariableMjeno bazoweje strony k podstronje bjez mjenoweho rumoweho prefiksa

(Přik.: FAQ je bazowa strona k Wikipedia:FAQ/Pflege / Artikel/Archiv je mjeno bazowa strona k Diskussion:Artikel/Archiv/Januar)

{{BASEPAGENAMEE}}WariableBazowa strona k podstrona z delnimi smuhami

(Přik.: Fragen_zur_Wikipedia je bazowa strona k Wikipedia:Fragen do Wikipedia/Archiv

{{BASEPAGENAME}}

{{BASEPAGENAMEE}}

Wariable
Wariable
[MW1.7+] The basename of a subpage ("Title/Other" on "Title/Other/Subtitle"), see Help:Link.
{{NAMESPACE}}PomocMjenowy rum
{{NAMESPACEE}}PomocMjenowy rum z delnimi smuhami město prózdnotow
{{FULLPAGENAME}}Pomoc:WariableMjenowy rum a titul
{{FULLPAGENAMEE}}Pomoc:WariableMjenowy rum a titul z Plusowy znamješkom (!) město prózdnotow
{{TALKSPACE}}Pomoc diskusijaDiskusijny mjenowy rum k mjenowemu rumej
{{TALKSPACEE}}Pomoc_diskusijaDiskusijny mjenowy rum z delnimi smuhami k mjenowemu rumej
{{SUBJECTSPACE}}Pomoc„hłowny“ mjenowy rum k Diskusijnam a podstronam
{{SUBJECTSPACEE}}Pomoc„hłowny“ mjenowy rum z delnimi smuhami k Diskusijnam a podstronam
{{ARTICLESPACE}}

{{ARTICLESPACEE}}

[MW1.7+] An alias for SUBJECTSPACE(E)
{{TALKPAGENAME}}Pomoc diskusija:WariableMjeno diskusijneje strony
{{TALKPAGENAMEE}}Pomoc_diskusija:WariableMjeno diskusijneje strony z delnimi smuhami
{{SUBJECTPAGENAME}}Pomoc:WariableStronowe mjeno
{{SUBJECTPAGENAMEE}}Pomoc:WariableStronowe mjeno z delnimi smuhami
{{ARTICLEPAGENAME}}

{{ARTICLEPAGENAMEE}}

[MW1.7+] An alias for SUBJECTPAGENAME(E)
{{REVISIONID}}-Čisło specifiskeje stronowersiji, wird z.B. in der Zitierhilfe und beim Permalink verwendet
{{REVISIONDAY}}7Dźeń poslednehe změny strony
{{REVISIONDAY2}}07Dźeń posledneje změny strony (dwučisła, gegebenenfalls mit führender Null)
{{REVISIONMONTH}}06Měsac posledneje změny strony
{{REVISIONYEAR}}2014Lěto posledneje změny strony
{{REVISIONTIMESTAMP}}20140607073311Časowy kołk posledneje změny strony
{{SITENAME}}Wikipedijamjeno websydła, Value of $wgSitename.
{{SERVER}}//hsb.wikipedia.orgValue of $wgServer
{{SCRIPTPATH}}[MW1.5+] $wgScriptPath
{{SERVERNAME}}hsb.wikipedia.org

Funkcije "parser"a

Mjenowe rumy a URLy

WariablaPřikładyFunkcija
{{ns:}}
{{ns:4}} Wikipedija

{{ns:project}} Wikipedija

wróćo mjeno dateho čisła mjenoweho ruma.
{{localurl:x y @}}

{{localurle:x y @}}
{{localurl:a|b=c}}
{{localurl:Wikipedia:Category}}

/wiki/X_y_@

/wiki/X_y_@
/w/index.php?title=A&b=c
/wiki/Wikipedija:Category

Returns the local URL of a page (might not exist). Optional query parameter, see Help:Variable.
{{urlencode:x y @}}x+y+%40[MW1.7+] Encodes variable values for use in external links. [1]
{{anchorencode:x #y @}}x_#y_@[MW1.8+] Encodes variable values for use in section anchors. [2]
{{fullurl:x y @}}

{{fullurle:x y @}}
{{fullurl:m:a|b=c}}

//hsb.wikipedia.org/wiki/X_y_@

//hsb.wikipedia.org/wiki/X_y_@
https://meta.wikimedia.org/wiki/a?b=c

[MW1.5+] Returns the full URL of a given page. Optional query parameter as for localurl:.

Formatowanje

nadawkwužiwanske přikład
{{#language:rěčne kode}}wuda jasne mjeno (něm. Klarnamen) za rěčne koda wužiwane w Wikimedia-Projektach po ISO 639.

Přikład: {{#language:de}} pokaza „Deutsch“, {{#language:tr}} pokaza „Türkçe“ a {{#language:ja}} pokaza „日本語“

{{lc:Tekst}} {{uc:Tekst}}přetwori tekst dospołnje do małopisanja (lower case) abo wulkopisanja (upper case).
{{lcfirst:Tekst}} {{ucfirst:Tekst}}přetwori spočatkowe pismiki teksta do małopisanja abo wulkopisanja.
{{uc:}}{{uc:aBc DeF}}= ABC DEF[MW1.5+] UpperCase
{{ucfirst:}}{{ucfirst:aB cD}}= AB cD[MW1.5+] UC first char.
{{formatnum:}}{{formatnum:1234.56}}=1.234,56[MW1.7+] Formatuje lubowólnu ličbu w lokalnje zwučenej formje, w hornjoserbskej Wikipediji tuž z dźělenskim znamješkom za tysacowku a komu.
{{padleft:Teskt|dołhosć|pjelnace znamjesko}}dopjelnjuje „Tekst“ na lewu kromu přez „pjelnacym znamjeskom“ do mjenowaneje dołhosće. Přikład: {{padleft:1234|6|0}} pokaza „001234“
{{padright:Text|dołhosć|pjelnace znamjesko}}dopjelnjuje „Tekst“ na prawu kromu přez „pjelnacym znamjeskom“ o mjenowaneje dołhosće. Přikład: {{padright:ABCD|7|x}} pokaza „ABCDxxx“


Modificeradła předłohow

WužiwanjeInformacije
{{:xyz}}A bare colon is not a template modifier, it's the prefix for the main namespace. Test e.g. article {{:UTC}} vs. template {{UTC}}.

Using this syntax you include the text of the main namespace article xyz in another article.

{{int:xyz}}Shorthand for {{MediaWiki:xyz}}, rendered as <xyz> if MediaWiki:xyz doesn't exist. See also Help:System message.
{{INT:fromwikipedia}}⧼fromwikipedia⧽podtitul w někotrych "skins"ach
{{msg:xyz}}Even if there is a magic word named "xyz", use template:xyz unless the template doesn't exist (equivalent to Předłoha:Xyz). Normally, magic words have priority when there is a conflict.
{{msgnw:xyz}}The unevaluated wikitext is rendered. See msgnw.
{{raw:xyz}}[MW1.6+] Equivalent to {{msg:xyz}} above.
{{subst:xyz}}In the wikitext, the tag is substituted by the content (single-level evaluation only), see Pomoc:Substitution.

Modificeradła wobrazow

These are image modifiers used in [[Image:title.ext|modifier|...|modifier]] links. Some are mutually exclusive, and then the last specified wins.

Wulkosć

SłowoWužiwanjeInformacije
framed

frame

[[Image:Mediawiki.png|framed]]Places an image in a frame with a description. Uses original size and stubbornly ignores width parameter if given.

In general, far better to use thumb, as is only suitable for small images.

thumbnail

thumb

[[Image:Mediawiki.png|thumbnail]]Modifies image size, sets it to dependant on user's favourite thumbnail size in their preferences, or on the given width parameter (see below).
thumb=xyz[[Image:Mediawiki.png|thumb=Wiki.png]]Manualthumb: instead of displaying an automatically-sized thumbnail for Mediawiki.png, display the image Wiki.png.
width px

100x200px

[[Image:Mediawiki.png|40px]]

[[Image:Mediawiki.png|100x200px]]

Scales image to given width in pixels

Scales image to no more than 100 pixels wide and no more than 200 high, but image scaled to retain it's true aspect ratio within the boundary specified.

Połoženje

SłowoWužiwanjeInformacije
right[[Image:Mediawiki.png|right]]Modifies position, floats the image to the right.
left[[Image:Mediawiki.png|left]]Modifies position, floats the image to the left.
none[[Image:Mediawiki.png|none]]Explicitly states that the image should not float.
center

centre

[[Image:Mediawiki.png|center]]Modifies position, like none but centered.

Měšenka

SłowoPřikładInformacija
{{DISPLAYTITLE:xyz}}[MW 1.7+] Set the page's title [3], see $wgAllowDisplayTitle.
{{DIRMARK}}

{{DIRECTIONMARK}}

[MW1.7+] u+200E left to right or u+200D right to left mark
{{CONTENTLANGUAGE}}hsbStandardowe rěčne kode Wikimedianeho projekta
{{DEFAULTSORT:sortěrowanske zapřijeće}}Wšě kategorije w nastawku bjez swojeho sortěrowanskeho parametra bu po standardu po sortěrowanskim zapřijeću z DEFAULTSORT nutř sortěrowane. Přikład: {{DEFAULTSORT:swójbne mjeno, předmjeno}} nalutuje při wosobnych nastawkow wjacerazowy zasunjenje mjena do kóždeje jednotliweje kategorije.
#REDIRECT#REDIRECT [[cil]] do spočatka stronyErzeugt eine Weiterleitung auf eine andere Seite. Für die richtige Verwendung siehe Wikipedia:Weiterleitung.

Rěčowotwisne słowne přetworjenje

SłowoPřikładInformacija
{{ CURRENTMONTHNAMEGEN }}měrcaGenitive form of month name used for Czech, Polish, Ukrainian [4]
{{grammar:case | word }}{{grammar:7sg|Wikipedie}} na hsb je: WikipedijaDerived word forms in inflected languages like Czech [5]
{{plural:count |form1 |form2 }}

{{plural:count |1st | 2nd | 3rd }}

{{plural: 2 | is | are }} přinjese are

{{plural: 0 | this | these }} přinjese these

count 1 yields form1 (singular), plural transformations are used for languages like Russian [6] based on "count mod 10".
{{PLURAL:Parameter|Singular|Plural}}Zmóžni gramatisce korektny prawopis po singularu resp. pluralu

Jeli parameter numersku hódnosć „1“ dodawa, so přewjedźe wudaće singulara, hewak plurala.Přikład z MediaWiki-mjenoweho ruma (MediaWiki:categoryarticlecount):

  {{PLURAL:$1|Bu  $1|Buchu $1}} nastawki z tuteje kategorije pokazane.

Jako parameter funguja tež wuličenja z {{ #expr: <wuraz> }} (hlej Pomoc:Předłohowe programowanje).

"Grammar" and "Plural" are language-dependent functions, defined in [7], [8] , etc. (note that in PHP, the modulo operator is the percent sign). "Grammar" can either be applied to predefined words only, or to arbitrary words, depending on whether the definition is just a 2D array, or involves string manipulations. See alsocs:Šablona:Wikivar/GRAMMAR.

"Plural" is a site-language-dependent switch function, controlled by function convertPlural in Language.php (which distinguishes between 1 and "not 1"), for some languages overridden in Languagexx.php, e.g. for French (which distinguishes between <=1 and >1) and Russian (oddly, first option is 1, 21, 31,.., 91, 101, 121, .., second is 2, 3, 4, 22, 23, 24, 31, 32, 33, 41,.., 94, 102, 103, 104,.., 122, 123,.., and else the third).

As opposed to ParserFunctions, "plural" accepts points and commas in numbers and interprets them in a site-language-specific way (depending on $separatorTransformTable in Messagesxx.php); on this site:

  • {{plural:1.000|a|b|c}} přinjese c
  • {{plural:1,000|a|b|c}} přinjese a

(on e.g. the German and the Dutch sites reversed w.r.t. the result on English sites).

"Plural" is used in various system messages, e.g. Template:Msg, where it uses interface language instead of site language.

Hlej tež

Websydła

Z Wikipedije, swobodneje encyklopedije