K wobsahej skočić

Pomoc:Wariable

Z Wikipedije, swobodneje encyklopedije
(ze strony „Pomoc:Wariabla” sposrědkowane)
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

[wobdźěłać | žórłowy tekst wobdźěłać]
Magic Words Wopisanje
__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
Magic Words Wopisanje
__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.

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 Words Wopisanje
ISBN Nummer Erzeugt 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 Nummer Erzeugt einen Weblink auf das entsprechende PubMed-Dokument über Biotechnologie der nationalen medizinischen Bibliothek der USA.
RFC Nummer Erzeugt einen Weblink auf das entsprechende RFC-Dokument: http://www.ietf.org/rfc/rfcNummer.txt
Wariabla

UTC/lokal

aktueller Wert

UTC/lokal

Wopisanje
{{CURRENTMONTH}}

{{LOCALMONTH}}

11

11

měsac
{{CURRENTMONTHNAME}}

{{LOCALMONTHNAME}}

nowembra

nowembra

mjeno měsaca
{{CURRENTMONTHNAMEGEN}}

{{LOCALMONTHNAMEGEN}}

nowembra

nowembra

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

{{LOCALMONTHABBREV}}

now

now

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

{{LOCALDAY}}

26

26

dźeń
{{CURRENTDAY2}}

{{LOCALDAY2}}

26

26

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

{{LOCALDOW}}

2

2

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

{{LOCALDAYNAME}}

Wutora

Wutora

mjeno wšědneho dnja
{{CURRENTWEEK}}

{{LOCALWEEK}}

48

48

kalendrowy tydźeń
{{CURRENTYEAR}}

{{LOCALYEAR}}

2024

2024

lěto
{{CURRENTHOUR}}

{{LOCALHOUR}}

03

04

hodźina
{{CURRENTTIME}}

{{LOCALTIME}}

03:45

04:45

čas
{{CURRENTTIMESTAMP}}

{{LOCALTIMESTAMP}}

20241126034506

20241126044506

časowy kołk
Wariabla Přikładna hódnosć Funkcija
{{CURRENTVERSION}} 1.44.0-wmf.4 (a8dd895) Wersijowe čisło aktualneje MediaWikineje Wersije wužiwana za wikimedia.org-Projekty
{{NUMBEROFEDITS}}

{{NUMBEROFEDITS:R}}

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

Stronowe mjena a so poćahowace informacije

[wobdźěłać | žórłowy tekst wobdźěłać]
Wariabla Přikładna hódnosć Funkcija
{{PAGENAME}} Wariable Titul strony
{{PAGENAMEE}} Wariable Titul 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}} Wariable Mjeno 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}} Wariable Bazowa 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}} Pomoc Mjenowy rum
{{NAMESPACEE}} Pomoc Mjenowy rum z delnimi smuhami město prózdnotow
{{FULLPAGENAME}} Pomoc:Wariable Mjenowy rum a titul
{{FULLPAGENAMEE}} Pomoc:Wariable Mjenowy rum a titul z Plusowy znamješkom (!) město prózdnotow
{{TALKSPACE}} Pomoc diskusija Diskusijny mjenowy rum k mjenowemu rumej
{{TALKSPACEE}} Pomoc_diskusija Diskusijny 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:Wariable Mjeno diskusijneje strony
{{TALKPAGENAMEE}} Pomoc_diskusija:Wariable Mjeno diskusijneje strony z delnimi smuhami
{{SUBJECTPAGENAME}} Pomoc:Wariable Stronowe mjeno
{{SUBJECTPAGENAMEE}} Pomoc:Wariable Stronowe 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}} 7 Dźeń poslednehe změny strony
{{REVISIONDAY2}} 07 Dźeń posledneje změny strony (dwučisła, gegebenenfalls mit führender Null)
{{REVISIONMONTH}} 06 Měsac posledneje změny strony
{{REVISIONYEAR}} 2014 Lěto posledneje změny strony
{{REVISIONTIMESTAMP}} 20140607073311 Časowy kołk posledneje změny strony
{{SITENAME}} Wikipedija mjeno websydła, Value of $wgSitename.
{{SERVER}} //hsb.wikipedia.org Value of $wgServer
{{SCRIPTPATH}} [MW1.5+] $wgScriptPath
{{SERVERNAME}} hsb.wikipedia.org
Wariabla Přikłady Funkcija
{{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:.
nadawk wuž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

[wobdźěłać | žórłowy tekst wobdźěłać]
Wužiwanje Informacije
{{: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.

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

Słowo Wužiwanje Informacije
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.

Słowo Wužiwanje Informacije
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.
Słowo Přikład Informacija
{{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}} hsb Standardowe 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 strony Erzeugt eine Weiterleitung auf eine andere Seite. Für die richtige Verwendung siehe Wikipedia:Weiterleitung.

Rěčowotwisne słowne přetworjenje

[wobdźěłać | žórłowy tekst wobdźěłać]
Słowo Přikład Informacija
{{ CURRENTMONTHNAMEGEN }} nowembra Genitive form of month name used for Czech, Polish, Ukrainian [4]
{{grammar:case | word }} {{grammar:7sg|Wikipedie}} na hsb je: Wikipedija Derived 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 also cs:Š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.

Z Wikipedije, swobodneje encyklopedije