Çekuyê Sihirıni (Magic words), yazıldığında MediaWiki tarafından tarih, saat, site bilgileri veya sayfa adları gibi bazı işlev ve değerlerle ilişkilendirilen dizgelerdir. Bu sayfa standart sihirli kelimelerin kullanımı hakkındadır. Teknik bilgi edinmek istiyorsanız Manual:Magic words sayfasına bakmanız önerilir.
Genel olarak üç çeşit değişken mevcuttur:
Behavior switches: these are uppercase words surrounded by double underscores, e.g.__FOO__.
Variables: these are uppercase words surrounded by double braces, e.g.{{FOO}}. As such, they look a lot like templates.
Sayfalara bağımlı sihirli kelimelerin dönüş değeri, sihirli kelime şablon veya sistem arayüz sayfası aracılığıyla eklense bile kullanıldığı sayfaya göre değişir (varsayılan olarak).
Davranış değiştiriciler
Bir davranış değiştirici sayfanın düzeni veya davranışı kontrol eder ve sıklıkla sayfa içeriğine istenilen ekleme veya gizlemelerin yapılmasında kullanılır.
Konu başlıkları tablosunu varsayılan konumu olan birinci başlığın üstünde görünmeye zorlar.
__TOC__
Bu davranış değiştirici, konu başlıkları tablosunu kendisinin bulunduğu konuma yerleştirir (__NOTOC__'u yok sayar). Eğer birden fazla kullanılırsa, ilk kullanıldığı yer kabul edilir.
Düzenleme
__NOEDITSECTION__
Hides the section edit links beside headings. This is especially useful, where a heading is created from within a template: the normal wiki section-edit would in this case edit the template code, which is normally counterintuitive to the user. If a template contains multiple headings, it may be necessary to add "__NOEDITSECTION__" after each heading.
Kategori sayfalarında, kategoride bulunan resimlerin küçük resim şeklinde değil de bağlantı şeklinde gösterilmesini sağlar.
≥ 1.7
__HIDDENCAT__
Kullanıldığı kategoriyi, barındırdığı sayfa ve kategorilerden ve içinde bulunduğu kategoriden gizler (gizli kategorileri göstermek için bir kullanıcı tercihi mevcuttur).
≥ 1.13
Dil dönüşümü
__NOCONTENTCONVERT__ __NOCC__
Dil varyantları bulunan vikilerde, içeriğin dilini herhangi bir şekilde dönüştürmeyi engeller; örneğin zh_cn, zh_tw, zh_sg veya zh_hk gibi varyantlar yerine içeriği sadece Çince (zh) gösterir.
__NOTITLECONVERT__ __NOTC__
Dil varyantları bulunan vikilerde, başlıkta dil dönüştürme işlemi yapılmaz (kalan içerik dönüştürülür).
Diğer
__START__
Etkisiz.
__END__
Sayfaın sonunu işaretlemek için kullanılır, böylece MediaWiki'nin takip eden boşluk karakterlerini silmesi önlenir. 19213 numaralı revizyonla bu özellik kaldırıldı.
1.1 – 1.8
__INDEX__
Arama motorlarının sayfayı dizinlemesini sağlar ($wgArticleRobotPolicies'i yok sayar ama robots.txt'yi yok sayamaz).
On redirect pages, don't allow MediaWiki to automatically update the link when someone moves a page and checks "Update any redirects that point to the original title" (which requires $wgFixDoubleRedirects).
Değişkenler tarih, viki veya kullanıldığı sayfayla ilgili bilgi verirler. Kullanımları şablonların kullanımına benzemektedir. "[Masraflı]" olarak etiketlnmiş değişkenler sistem tarafından izlenmektedir, bu değişkenler bir sayfada sınırlı sayıda kullanılırlar.
Eğer bir şablonun adı bir değişkenle çakışıyorsa, değişken kullanılacaktır (eğer Template:PAGENAME şablonunu kullanmak istiyorsanız {{Template:PAGENAME}} yazmanız gerekecektir). Bazı durumlarda, parametreler eklemek ayrıştırıcının yazılan kodu şablon olarak algılamasını sağlar; örneğin,{{CURRENTDAYNAME|x}}Template:CURRENTDAYNAME şablonunu gösterir.
Tarix & seate
Aşağıdaki değişkenler şu anki tarih ve saati UTC zaman diliminde gösterir.
MediaWiki ve tarayıcı önbelleği nedeniyle, bu değişkenler sıklıkla mevcut saati göstermek yerine sayfanın önbelleğe alındığı zamanki saati göstermektedir.
The date and time magic words are formatted in the wiki content language. Since 1.19, they depend on the page content language.
Viki dilinin yazı yönüne bağlı olarak (soldan sağa vikiler için ‎ ve sağdan sola vikiler için ‏ şeklinde) unicode ok işareti gösterir. Çok yönlü metinler için kullanışllıdır.
Verilen eylem ('move' (taşıma) veya 'edit' (değişiklik)) için kullanıldığı sayfanın koruma durumunu ('autoconfirm' veya 'sysop' gibi) gösterir. Eğer koruma yoksa hiçbir şey gösterilmez.
[Expensive] Returns the sources of any cascading protection acting on the current page. Pages will not return their own title unless they transclude themselves.
Format the current page's title header. The value must be equivalent to the default title: only capitalization changes and replacing spaces with underscores are allowed (this can be changed with $wgRestrictDisplayTitle). It can be disabled or enabled by $wgAllowDisplayTitle; disabled by default before 1.10+, enabled by default thereafter.
It can take a second argument of noerror or noreplace to suppress error messages when multiple displaytitles are used on one page or to make this displaytitle do nothing if a displaytitle was already specified earlier in the page.
Varsayılan kategori sıralama anahtarını belirterek sayfaları kategorize etmek için kullanılır. Örneğin eğer John Smith isimli bir sayfanın sonuna {{DEFAULTSORT:Smith, John}} yazarsanız, sayfa mensup olduuğu kategori(ler)de S harfi altında listelenecektir.
Bu değişkenler tarafından gösterilen değerler genelde ayraçlar içerir (viki diline bağlı olarak virgül veya boşluk); ancak ":R" ekiyle ham sayıların gösterilmesi sağlanabilir (örneğin {{NUMBEROFPAGES}} → 216,626 ve {{NUMBEROFPAGES:R}} → 216626).
PAGESINCATEGORY gibi bazı paramtere gerektiren sihirli kelimelerde kullanılacağı zaman "|R" şeklinde kullanın (örneğin {{PAGESINCATEGORY:Help}} ve {{PAGESINCATEGORY:Help|R}}).
The number magic words are formatted in the wiki content language. Since 1.19, it depends on the page content language.
Vurnayen
Metne teberi
Şınasiye
versiyoni
{{NUMBEROFPAGES}}
216,626
Viki sayfalarının sayısı.
≥ 1.7
{{NUMBEROFARTICLES}}
16,184
İçerik ad boşlukları olarak belirtilmiş ad boşluklarında bulunan sayfaların sayısı.
[masraflı] Belirtilen ad boşluğundaki sayfa sayısı (dizin kelimesini ilgili ad boşluğu dizin numarasıyla değiştirin). Örneğin, {{PAGESINNAMESPACE:14}} yazıldığında kategori sayfalarının sayısı gösterilecektir. {{PAGESINNS:0}}, {{NUMBEROFARTICLES}}'dan farklıdır. Birincisi yönlendirmeler ve anlam ayrım sayfalarını da içerir. Varsayılan olarak devre dışıdır, etkinleştirmek için $wgAllowSlowParserFunctions özelliğini kullanın.
≥ 1.7
Sayfa adı
Vurnayen
Metne teberi
Şınasiye
versiyoni
{{FULLPAGENAME}}
Help:Magic words/diq
Ad boşluğuyla birlikte sayfa adı.
≥ 1.6
{{PAGENAME}}
Magic words/diq
Sayfa başlığı.
{{BASEPAGENAME}}
Magic words
Kullanıldığı sayfa alt sayfaysa, o sayfanın bir üst sayfası (ad boşluğu dahil edilmeden) gösterilir (sayfa adı "Başlık/alt/deneme" ise "Başlık/alt" gösterilir). Daha karmaşık parçalamalar için ParserFunctions eklentisinden {{#titleparts: }} işlevini kullanın
Alt sayfa adı("Başlık/deneme" sayfasında "deneme" gösterilir).
≥ 1.6
{{SUBJECTPAGENAME}} {{ARTICLEPAGENAME}}
Help:Magic words/diq
Help:Magic words/diq
Kullanıldığı sayfanın içerik sayfasının adını gösterir (ad boşluğu ile birlikte).
≥ 1.7
{{TALKPAGENAME}}
Help talk:Magic words/diq
Kullanıldığı sayfanın içerik sayfasının adını gösterir (ad boşluğu ile birlikte).
≥ 1.7
{{BASEPAGENAME}} ve {{SUBPAGENAME}} sihirli kelimeleri sadece alt sayfa özelliğinin etkin olduğu ad boşluklarında çalışır. Alt sayfaları etkinleştirmek için $wgNamespacesWithSubpages sayfasına bakın.
1.15+ itibariyle bu sihirli kelimeler kullanıldığı sayfa dışında başka sayfalar için de çalışabilmesi için parametre kabul etmektedirler
Warning:
Page titles containing certain characters, such as apostrophes ' or asterisks *, may produce unexpected results when handled with these magic words, e.g. {{PAGESINCATEGORY:{{PAGENAME}}}}. See bugs 14779, 16474, 35628, and 35746. One simple way to fix this is wrapping the pagename in #titleparts (parser function).
For example, if page name is "L'Aquila", the following code will produce the string "Numeric char encoding":
{{#switch:{{PAGENAME}}
| L'Aquila = No translation
| L = Not OK
| L'Aquila = Entity escaping
| L'Aquila = Numeric char encoding
}}
URL encoded page names
Aşağıdakiler, yukarıdaki sihirli kelimelerin MediaWiki URL bağlantılarında kullanılabilen alternatifleridir (yani boşluklar alt çizgiyle (_) değiştirilir ve bazı karakter yüzdelik gösterim ile gösterilir):
{{FULLPAGENAMEE}}
{{PAGENAMEE}}
{{BASEPAGENAMEE}}
{{SUBPAGENAMEE}}
{{SUBJECTPAGENAMEE}}
{{ARTICLEPAGENAMEE}}
{{TALKPAGENAMEE}}
Note that {{PAGENAME:...}}, {{PAGENAMEE:...}} and {{urlencode:...}} have distinct implementations. See Manual:PAGENAMEE encoding for details.
Aşağıdakiler, yukarıdaki sihirli kelimelerin MediaWiki URL bağlantılarında kullanılabilen alternatifleridir (yani boşluklar alt çizgiyle (_) değiştirilir ve bazı karakter yüzdelik gösterim ile gösterilir):
{{NAMESPACEE}}
{{SUBJECTSPACEE}}
{{TALKSPACEE}}
1.15+ itibariyle bu sihirli kelimeler kullanıldığı sayfa dışında başka sayfalar için de çalışabilmesi için bir sayfa adı parametre kabul etmektedirler:
{{NAMESPACE:Template:Main Page}} → Template
{{SUBJECTSPACE:Template:Main Page}} → Template
{{TALKSPACE:Template:Main Page}} → Template talk
Parameter must not be a namespace name:
{{SUBJECTSPACE:Help talk}} → (Empty)
Other
Variable
Output
Description
Versions
{{!}}
|
Used to include a pipe character as part of a template argument. Before this was added as a magic word, many wikis implemented this by creating Template:! with | as the content.
Ayrıştırıcı işlevler değişkenlere oldukça benzerdir; ancak bir veya daha fazla parametre almaktadırlar (teknik olarak parametre alan herhangi bir sihirli kelime ayrıştırıcı işlevdir) ve bazen şablonlardan ayırmak için adının önüne kare işareti (#) gelmektedir.
This page only describes parser functions that are integral to the MediaWiki software. Other parser functions may be added by MediaWiki extensions such as the Extension:ParserFunctions. For those see Help:Extension:ParserFunctions.
[Expensive] Outputs the protection level (e.g. "autoconfirmed", "sysop") for a given action (e.g. "edit", "move") on the specified page. Returns an empty string if not protected.
[Expensive] Returns the sources of any cascading protection acting on the specified page. Pages will not return their own title unless they transclude themselves.
*When the given param is equal to the current title of the parser, the parser function will yield the previous versions on preview and on substitution, that includes empty strings when used on page creation, but using the values from the current version for page view, including viewing old revisions. In this case it is a non-expensive parser function.
{{urlencode:x:y/z á é}} (or {{urlencode:x:y/z á é|QUERY}}) → x%3Ay%2Fz+%C3%A1+%C3%A9 {{urlencode:x:y/z á é|WIKI}} → x:y/z_%C3%A1_%C3%A9 {{urlencode:x:y/z á é|PATH}} → x%3Ay%2Fz%20%C3%A1%20%C3%A9
Note that the default changed from |WIKI to |QUERY in 1.17; this may break templates that rely on this function.
The input encoded for use in URLs. Note that there is no urldecode function like there is in the obsolete Extension:StringFunctions.
{{ns:}} returns the current localized name for the namespace with that index, canonical name, or local alias. Thus {{ns:6}}, {{ns:File}}, and {{ns:Image}} (an old name for the File namespace) all return "File". On a wiki where the content language is French, {{ns:Fichier}} is also valid, but {{ns:Datei}} (the localisation of "File" in German) is not.
{{nse:}} is the equivalent encoded for MediaWiki URLs. It does the same, but it replaces spaces with underscores, making it usable in external links.
Unsupported: {{formatnum:{{formatnum:987.654.321}}}}
→ 987 654 321 (e.g. with Italian locale)
Examples of wrong input (unreliable output), with or without |R: {{formatnum:987,654.321|R}} (the least broken) {{formatnum:987.654,321|R}} {{formatnum:987 654,321|R}} {{formatnum:987 654,321|R}}
Takes an unformatted number (arab, no group separators and . as decimal separator) and outputs it in the localized digit script and formatted with decimal and decimal group separators, according to the wiki's default locale.
The |R parameter can be used to reverse the behavior, for use in mathematical situations: it's reliable and should be used only to deformat numbers who are known to be formatted exactly as formatnum formats them with the wiki's locale. İkaz: Leading zeroes are not removed, you can use {{#expr:00001}} instead if you have Extension:ParserFunctions installed.
İkaz: If you don't input numbers in the exact format required, don't expect any reliable output, especially on non-English wikis.
İkaz: The NOSEP ("no separators") parameter means that no group / decimal separators are changed; formatnum will only transform the digits themselves in languages which don't use the Hindu–Arabic numeral system. NOSEP can also prevent non-standard digit groupings you wouldn't expect.
If you really need to format (according the wiki's locale) a number in unknown input format, you could try and use formatnum two times (but not if it can have a decimal group, or its separator will be eaten or the number won't be formatted).
{{#dateformat:25 deC 2009|ymd}}
→ 25 deC 2009 (your pref), 2009 DeC 25 (default) {{#formatdate:dec 25,2009|dmy}}
→ dec 25,2009 (your pref), 25 Dec 2009 (default) {{#dateformat:2009-12-25|mdy}}
→ Kanun 25, 2009 (your pref), December 25, 2009 (default) {{#formatdate:2009 dec 25|ISO 8601}}
→ 2009 dec 25 (your pref), 2009-12-25 (default) {{#dateformat:25 decEmber|mdy}}
→ 25 decEmber (your pref), DecEmber 25 (default) Note: In the example hereinbefore, "your pref" refers to your date preference on the current MediaWiki wiki only.
Formats an unlinked date based on user "date format" preference, and adds metadata tagging it as a formatted date. For logged-out users and those who have not set a date format in their preferences, dates can be given a default: mdy, dmy, ymd, ISO 8601 (all case sensitive). If only the month and day are given, only mdy and dmy are valid. If a format is not specified or is invalid, the input format is used as a default. If the supplied date is not recognized as a valid date (specifically, if it contains any metadata such as from a nested use of these or similar templates), it is rendered unchanged, and no (additional) metadata is generated.
İkaz: ISO 8601 standardının, tarihlerin Gregoryan takvimiyle belirlenmesini gerektirmesine rağmen, bu işlevde bulunan ISO parametresi olağan Gregoryan aralığının dışında kalan tarihleri de (yani 1583 yılından önceki tarihleri) kabul etmektedir. Ayrıca, bu sihirli kelime (ISO 8601 ile kullanılan) negatif yıllar arasında ve (yazımda kullanılan) MÖ. yıllar arasında düzgün şekilde dönüştürme yapamamaktadır.
{{padleft:xyz|5}} → 00xyz {{padleft:xyz|5|_}} → __xyz {{padleft:xyz|5|abc}} → abxyz {{padleft:xyz|2}} → xyz {{padleft:|1|xyz}} → x (first character of the string)
(Birinci parametreyle) seçilen ana karakter veya değişkenin soluna, (ikinci parametreyle) belirtilen karakter uzunluğuna erişinceye kadar, geçici doldurma karakterleri (üçüncü parametreyle belirtilir, varsayılan olarak '0') ekler. Ana girdideki son karakter veya haneler doldurma karakterlerinin sonuncularıyla değiştirilir; yani {{padleft:44|3|0}} 044 şeklinde görünür. Eğer doldurucu dizgenin uzunluğu gerekli sayıda karakteri eşit olarak bölemiyorsa son kısmı atılabilir.
Only the first character of the third parameter is used in versions up to 1.12, but by version 1.15 all the characters are used.
sorun (r45734 ile düzeltildi): çok baytlı karakterler iki karakter olarak algılanır, bu da genişliği çarpıtabilir. Bu karakterler doldurucu karakter olarak kullanılamaz.
Here are the magic words which are used as main localisation tools. Other magic words will often depend on the wiki's locale and configuration or on the chosen language: see in particular #Date and time, #Formatting, #Miscellaneous. More magic words are added by the Extension:Translate.
The usage of these magic words can be very complex, and the documentation is currently incomplete; there's some more info on PLURAL, GRAMMAR, GENDER.
Usage
Input → Output
Description
Version
{{plural:2|is|are}}
{{plural:0|is|are}} → are {{plural:1*1|is|are}} → is {{plural:21 mod 10|is|are}} → are {{plural:{{#expr:21 mod 10}}|is|are}} → is {{plural:1|is|are}} → is {{plural:2|is|are}} → are
(For Russian) {{PLURAL:5|1=Категория|Категории}} → Категории
Outputs the singular form (second parameter) if the first parameter is an expression equalling one; the plural form (third parameter) otherwise. Its functioning is language-dependent.
Some language codes (ab, av, ba, bxr, ce, crh_cyrl, cv, inh, koi, krc, kv, lbe, lez, mhr, mrj, myv, ru, tt_cyrl, tyv, udm, xal) used 3 plural forms (updated 01.2014):
Outputs the correct inflected form of the given word described by the inflection code after the colon (language-dependent). Grammar transformations are used for inflected languages like Polish. See also $wgGrammarForms.
≥ 1.7
{{gender:username|text for every gender}}
{{gender:Username|male text|female text|text for unspecified}} {{gender:|male text|female text|text for unspecified}} {{gender:.|male text|female text|text for unspecified}}
Note: The first example is basically a no-op Note: If 3rd parameter is omitted and user hasn't defined his/her gender, then text if user is male is returned.
A blank username field ({{gender:|) means the current user.
A dot username (.) means the default user gender on this wiki.
{{int:edit}} → Edit (Depends on user language; try: fr • ja)
Internationalizes (translates) the given interface (MediaWiki namespace) message into the user language. For msgnw and other transclusion magic words, see Help:Magic words#Template modifiers.
Note that this can damage / confuse cache consistency in MediaWiki 1.17 and earlier, see bug 14404.
You may also use parameters with translations.
Parameters are designated in messages with: $1, $2, $3, etc.
For example, here is the message for editsectionhint: Edit section: $1
In this example, MediaWiki replaces $1.
Diğer
Kullanım
Çıkış metni
Açıklama
Sürüm
{{#language:language code}} {{#language:ar}} {{#language:language code| target language code}} {{#language:ar|en}}
language code
العربية
language code
Arabic
The full name of the language for the given language code: native name (language autonym) by default, name translated in target language if a target language code is specified. Extension:CLDR must be installed for the translation to work.
Alias for XML-style MediaWiki parser tags or extension tags. It allows execution of wiki code and Extension:ParserFunctions within tags before the tag is processed. It also prevents parsing of tags in conditional paths that aren't executed (like in #if statements). Content between tags is passed as the first parameter, and any attributes for the tags can be passed as subsequent parameters. This example:
{{#tag:ref|Citation text goes here, and you can include parser functions like {{#expr: ... }} and magic words like {{PAGENAME}}.|name="multiple"}}
İkaz: You must write {{#tag:tagname||attribute1=value1|attribute2=value2}} to pass an empty content. No space is permitted in the area reserved for content between the pipe characters || before attribute1.