「ヘルプ:Magic words/ja」を編集中
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
4行目: | 4行目: | ||
* '''[[#Behavior switches|Behavior switches]]''': these are uppercase words surrounded by double underscores, ''e.g.'' '''__FOO__'''. | * '''[[#Behavior switches|Behavior switches]]''': these are uppercase words surrounded by double underscores, ''e.g.'' '''__FOO__'''. | ||
* '''[[#Variables|Variables]]''': these are uppercase words surrounded by double braces, ''e.g.'' '''<code><nowiki>{{FOO}}</nowiki></code>'''. As such, they look a lot like [[Help:Templates|templates]]. | * '''[[#Variables|Variables]]''': these are uppercase words surrounded by double braces, ''e.g.'' '''<code><nowiki>{{FOO}}</nowiki></code>'''. As such, they look a lot like [[Help:Templates|templates]]. | ||
− | * '''[[#Parser functions|Parser functions]]''': these take parameters and are either of the form '''<code><nowiki>{{foo:...}}</nowiki></code>''' or '''<code><nowiki>{{#foo:...}}</nowiki></code>'''. See also {{mediawiki|Help:Extension:ParserFunctions | + | * '''[[#Parser functions|Parser functions]]''': these take parameters and are either of the form '''<code><nowiki>{{foo:...}}</nowiki></code>''' or '''<code><nowiki>{{#foo:...}}</nowiki></code>'''. See also {{mediawiki|Help:Extension:ParserFunctions}}. |
− | + | Page-dependent magic words will affect or return data about the ''current'' page (by default), even if the word is added through a transcluded template or included system message. | |
== Behavior switches == | == Behavior switches == | ||
39行目: | 39行目: | ||
|- | |- | ||
| <code><nowiki>__NEWSECTIONLINK__</nowiki></code> | | <code><nowiki>__NEWSECTIONLINK__</nowiki></code> | ||
− | | Adds a link beside the "edit" tab for adding a new section on a non-talk page (see {{mediawiki|m:Help:Section#Adding a section at the end|Adding a section to the end}}). | + | | Adds a link ([[MediaWiki:Addsection|"+" by default]]) beside the "edit" tab for adding a new section on a non-talk page (see {{mediawiki|m:Help:Section#Adding a section at the end|Adding a section to the end}}). |
| 1.7 以降 | | 1.7 以降 | ||
|- | |- | ||
64行目: | 64行目: | ||
| <code><nowiki>__NOTITLECONVERT__</nowiki></code> <br /> <code><nowiki>__NOTC__</nowiki></code> | | <code><nowiki>__NOTITLECONVERT__</nowiki></code> <br /> <code><nowiki>__NOTC__</nowiki></code> | ||
| On wikis with language variants, don't perform language conversion on the title (all other content is converted). | | On wikis with language variants, don't perform language conversion on the title (all other content is converted). | ||
− | | | + | | |
|- | |- | ||
! colspan="3" style="background-color: #DDDDDD;"| Other | ! colspan="3" style="background-color: #DDDDDD;"| Other | ||
79行目: | 79行目: | ||
| Tell search engines to index the page (overrides {{mediawiki|Manual:$wgArticleRobotPolicies|$wgArticleRobotPolicies}}, but not robots.txt). It obeys [[Manual:$wgExemptFromUserRobotsControl|$wgExemptFromUserRobotsControl]] variable. | | Tell search engines to index the page (overrides {{mediawiki|Manual:$wgArticleRobotPolicies|$wgArticleRobotPolicies}}, but not robots.txt). It obeys [[Manual:$wgExemptFromUserRobotsControl|$wgExemptFromUserRobotsControl]] variable. | ||
| 1.14 以降 | | 1.14 以降 | ||
− | |- | + | |- |
| <code><nowiki>__NOINDEX__</nowiki></code> | | <code><nowiki>__NOINDEX__</nowiki></code> | ||
| Tell search engines not to index the page (i.e. do not list in search engines' results). It obeys [[Manual:$wgExemptFromUserRobotsControl|$wgExemptFromUserRobotsControl]] variable. | | Tell search engines not to index the page (i.e. do not list in search engines' results). It obeys [[Manual:$wgExemptFromUserRobotsControl|$wgExemptFromUserRobotsControl]] variable. | ||
87行目: | 87行目: | ||
| 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". | | 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". | ||
| {{mediawiki|rev:37928|1.13 以降}} | | {{mediawiki|rev:37928|1.13 以降}} | ||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
114行目: | 110行目: | ||
! バージョン | ! バージョン | ||
|- | |- | ||
− | ! colspan="4" style="background-color: #DDDDDD;"| 年 | + | ! colspan="4" style="background-color: #DDDDDD;"| 年 |
|- | |- | ||
| <code><nowiki>{{CURRENTYEAR}}</nowiki></code> | | <code><nowiki>{{CURRENTYEAR}}</nowiki></code> | ||
121行目: | 117行目: | ||
| | | | ||
|- | |- | ||
− | ! colspan="4" style="background-color: #DDDDDD;"| 月 | + | ! colspan="4" style="background-color: #DDDDDD;"| 月 |
|- | |- | ||
− | | <code><nowiki>{{CURRENTMONTH}}</nowiki></code> | + | | <code><nowiki>{{CURRENTMONTH}}</nowiki></code> |
| {{CURRENTMONTH}} | | {{CURRENTMONTH}} | ||
| 月 (0 補完あり: 01~12) | | 月 (0 補完あり: 01~12) | ||
143行目: | 139行目: | ||
| 1.5 以降 | | 1.5 以降 | ||
|- | |- | ||
− | ! colspan="4" style="background-color: #DDDDDD;"| 日 | + | ! colspan="4" style="background-color: #DDDDDD;"| 日 |
|- | |- | ||
| <code><nowiki>{{CURRENTDAY}}</nowiki></code> | | <code><nowiki>{{CURRENTDAY}}</nowiki></code> | ||
165行目: | 161行目: | ||
| | | | ||
|- | |- | ||
− | ! colspan="4" style="background-color: #DDDDDD;"| 時刻 | + | ! colspan="4" style="background-color: #DDDDDD;"| 時刻 |
|- | |- | ||
| <code><nowiki>{{CURRENTTIME}}</nowiki></code> | | <code><nowiki>{{CURRENTTIME}}</nowiki></code> | ||
177行目: | 173行目: | ||
| | | | ||
|- | |- | ||
− | ! colspan="4" style="background-color: #DDDDDD;"| その他 | + | ! colspan="4" style="background-color: #DDDDDD;"| その他 |
|- | |- | ||
| <code><nowiki>{{CURRENTWEEK}}</nowiki></code> | | <code><nowiki>{{CURRENTWEEK}}</nowiki></code> | ||
205行目: | 201行目: | ||
* <nowiki>{{LOCALTIMESTAMP}}</nowiki></code> | * <nowiki>{{LOCALTIMESTAMP}}</nowiki></code> | ||
− | ''For more thorough time formatting, you may want to install [[Extension:ParserFunctions]] to use the [[Help:Extension:ParserFunctions | + | ''For more thorough time formatting, you may want to install [[Extension:ParserFunctions]] to use the [[Help:Extension:ParserFunctions#.23time|#time parser function]]''. |
=== 技術的なメタデータ === | === 技術的なメタデータ === | ||
218行目: | 214行目: | ||
! バージョン | ! バージョン | ||
|- | |- | ||
− | ! colspan="4" style="background-color: #DDDDDD;"| | + | ! colspan="4" style="background-color: #DDDDDD;"| サイト |
|- | |- | ||
| <code><nowiki>{{SITENAME}}</nowiki></code> | | <code><nowiki>{{SITENAME}}</nowiki></code> | ||
228行目: | 224行目: | ||
| {{SERVER}} | | {{SERVER}} | ||
| ドメイン [http://en.wikipedia.org/wiki/URL URL] ({{mediawiki|Manual:$wgServer|$wgServer}}). | | ドメイン [http://en.wikipedia.org/wiki/URL URL] ({{mediawiki|Manual:$wgServer|$wgServer}}). | ||
− | |||
|- | |- | ||
| <code><nowiki>{{SERVERNAME}}</nowiki></code> | | <code><nowiki>{{SERVERNAME}}</nowiki></code> | ||
| {{SERVERNAME}} | | {{SERVERNAME}} | ||
− | | | + | | ドメイン名 (バージョン 1.17 以降、{{mediawiki|Manual:$wgServerName|$wgServerName}} に依存しなくなりました) |
| | | | ||
|- | |- | ||
260行目: | 255行目: | ||
| {{r|14661|1.7 以降}} | | {{r|14661|1.7 以降}} | ||
|- | |- | ||
− | ! colspan="4" style="background-color: #DDDDDD;"| | + | ! colspan="4" style="background-color: #DDDDDD;"| ページ |
|- | |- | ||
| <code><nowiki>{{PAGEID}}</nowiki></code> | | <code><nowiki>{{PAGEID}}</nowiki></code> | ||
266行目: | 261行目: | ||
| ページの識別子を返す。 | | ページの識別子を返す。 | ||
| {{mediawiki|gerrit:9858|1.20 以降}} | | {{mediawiki|gerrit:9858|1.20 以降}} | ||
+ | |-style="background: #FED;" | ||
+ | | <code><nowiki>{{PAGESIZE:</nowiki>''page name''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{PAGESIZE:</nowiki>''page name''<nowiki>|R}}</nowiki> | ||
+ | | {{PAGESIZE:Help:Magic_words}} <br />{{PAGESIZE:Help:Magic_words|R}} | ||
+ | | '''[高負荷]''' Returns the byte size of the specified page. Use "<code><nowiki>|R</nowiki></code>" to get raw (unformatted) numbers. | ||
+ | | {{mediawiki|rev:33551|1.13 以降}} | ||
|- | |- | ||
− | | <code><nowiki>{{</nowiki> | + | | <code><nowiki>{{PROTECTIONLEVEL:</nowiki>''action''<nowiki>}}</nowiki></code> |
| <!-- Leave this empty. --> | | <!-- Leave this empty. --> | ||
− | | 現在のページについて指定した操作 (例: "edit"、"move") に対する保護レベル (例: "autoconfirmed"、"sysop") | + | | 現在のページについて指定した操作 (例: "edit"、"move") に対する保護レベル (例: "autoconfirmed"、"sysop") を出力する。保護されていない場合は空の文字列。 |
| {{mediawiki|rev:45587|1.15 以降}} | | {{mediawiki|rev:45587|1.15 以降}} | ||
|- | |- | ||
− | ! colspan="4" style="background-color: #DDDDDD;"| | + | ! colspan="4" style="background-color: #DDDDDD;"| 現在のページへの最新の版 |
|- | |- | ||
| <code><nowiki>{{REVISIONID}}</nowiki></code> | | <code><nowiki>{{REVISIONID}}</nowiki></code> | ||
309行目: | 309行目: | ||
| 1.8 以降 | | 1.8 以降 | ||
|- | |- | ||
− | | <code><nowiki>{{REVISIONUSER | + | | <code><nowiki>{{REVISIONUSER}}</nowiki></code> |
− | | {{REVISIONUSER | + | | {{REVISIONUSER}} |
| The username of the user who made the most recent edit to the page, or the current user when previewing an edit. | | The username of the user who made the most recent edit to the page, or the current user when previewing an edit. | ||
| {{mediawiki|rev:48149|1.15 以降}} | | {{mediawiki|rev:48149|1.15 以降}} | ||
|- | |- | ||
− | + | ! colspan="4" style="background-color: #DDDDDD;"| ページ本文に影響 | |
− | |||
− | |||
− | |||
− | |||
− | ! colspan="4" style="background-color: #DDDDDD;"| | ||
|- | |- | ||
| {{anchor|Displaytitle}} <code><nowiki>{{DISPLAYTITLE:</nowiki>''title''<nowiki>}}</nowiki></code> | | {{anchor|Displaytitle}} <code><nowiki>{{DISPLAYTITLE:</nowiki>''title''<nowiki>}}</nowiki></code> | ||
328行目: | 323行目: | ||
| {{anchor|Defaultsort}} <code><nowiki>{{DEFAULTSORT:</nowiki>''sortkey''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{DEFAULTSORTKEY:</nowiki>''sortkey''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{DEFAULTCATEGORYSORT:</nowiki>''sortkey''<nowiki>}}</nowiki></code> <br/><code><nowiki>{{DEFAULTSORT:</nowiki>''sortkey''<nowiki>|noerror}}</nowiki></code> <br/><code><nowiki>{{DEFAULTSORT:</nowiki>''sortkey''<nowiki>|noreplace}}</nowiki></code> | | {{anchor|Defaultsort}} <code><nowiki>{{DEFAULTSORT:</nowiki>''sortkey''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{DEFAULTSORTKEY:</nowiki>''sortkey''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{DEFAULTCATEGORYSORT:</nowiki>''sortkey''<nowiki>}}</nowiki></code> <br/><code><nowiki>{{DEFAULTSORT:</nowiki>''sortkey''<nowiki>|noerror}}</nowiki></code> <br/><code><nowiki>{{DEFAULTSORT:</nowiki>''sortkey''<nowiki>|noreplace}}</nowiki></code> | ||
| | | | ||
− | | Used for categorizing pages, sets a default [[Help:Categories|category sort key]]. For example if you put <code><nowiki>{{DEFAULTSORT:Smith, John}}</nowiki></code> at the end of [[John Smith]], the page would be sorted under "S" by default in categories. It can take a second argument of ''noerror'' or ''noreplace'' to suppress error messages when multiple defaultsortkeys are used on one page or to make | + | | Used for categorizing pages, sets a default [[Help:Categories|category sort key]]. For example if you put <code><nowiki>{{DEFAULTSORT:Smith, John}}</nowiki></code> at the end of [[John Smith]], the page would be sorted under "S" by default in categories. It can take a second argument of ''noerror'' or ''noreplace'' to suppress error messages when multiple defaultsortkeys are used on one page or to make it do nothing if multiple defaultsortkeys are used. |
| 1.10 以降 <br/>{{mediawiki|rev:96767|1.19 以降}} (for noerror and noreplace) | | 1.10 以降 <br/>{{mediawiki|rev:96767|1.19 以降}} (for noerror and noreplace) | ||
|} | |} | ||
334行目: | 329行目: | ||
=== 統計 === | === 統計 === | ||
− | Numbers returned by these variables normally contain separators (commas or spaces, depending on the local language), but can return raw numbers with the ":R" flag (for example, <code><nowiki>{{NUMBEROFPAGES}}</nowiki></code> → {{NUMBEROFPAGES}} and <code><nowiki>{{NUMBEROFPAGES:R}}</nowiki></code> → {{NUMBEROFPAGES:R}}). Use "|R" for magic words that require a parameter like PAGESINCATEGORY (for example <code><nowiki>{{PAGESINCATEGORY:Help}}</nowiki></code> and <code><nowiki>{{PAGESINCATEGORY:Help|R}}</nowiki></code>, or <code><nowiki>{{PAGESINCATEGORY:Help|subcats}}</nowiki></code> and <code><nowiki>{{PAGESINCATEGORY:Help|subcats|R}}</nowiki></code>). Also applicable to <code><nowiki>{{PAGESIZE:</nowiki>'' | + | Numbers returned by these variables normally contain separators (commas or spaces, depending on the local language), but can return raw numbers with the ":R" flag (for example, <code><nowiki>{{NUMBEROFPAGES}}</nowiki></code> → {{NUMBEROFPAGES}} and <code><nowiki>{{NUMBEROFPAGES:R}}</nowiki></code> → {{NUMBEROFPAGES:R}}). Use "|R" for magic words that require a parameter like PAGESINCATEGORY (for example <code><nowiki>{{PAGESINCATEGORY:Help}}</nowiki></code> and <code><nowiki>{{PAGESINCATEGORY:Help|R}}</nowiki></code>, or <code><nowiki>{{PAGESINCATEGORY:Help|subcats}}</nowiki></code> and <code><nowiki>{{PAGESINCATEGORY:Help|subcats|R}}</nowiki></code>). Also applicable to <code><nowiki>{{PAGESIZE:</nowiki>''page name''<nowiki>}}</nowiki></code> hereinbefore. |
The number magic words are formatted in the wiki content language. Since {{r|94680|1.19}}, it depends on the [[page content language]]. | The number magic words are formatted in the wiki content language. Since {{r|94680|1.19}}, it depends on the [[page content language]]. | ||
352行目: | 347行目: | ||
| <code><nowiki>{{NUMBEROFARTICLES}}</nowiki></code> | | <code><nowiki>{{NUMBEROFARTICLES}}</nowiki></code> | ||
| {{NUMBEROFARTICLES}} | | {{NUMBEROFARTICLES}} | ||
− | | {{mediawiki|Manual:Using custom namespaces | + | | {{mediawiki|Manual:Using custom namespaces#Content namespaces|標準名前空間}}内のページ数。 |
| | | | ||
|- | |- | ||
404行目: | 399行目: | ||
| Number of users in a specific {{mediawiki|Manual:User rights|group}}. | | Number of users in a specific {{mediawiki|Manual:User rights|group}}. | ||
| {{mediawiki|rev:40116|1.14 以降}} | | {{mediawiki|rev:40116|1.14 以降}} | ||
− | |- | + | |- |
| <code><nowiki>{{PAGESINNS:</nowiki>''index''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{PAGESINNAMESPACE:</nowiki>''index''<nowiki>}}</nowiki></code> | | <code><nowiki>{{PAGESINNS:</nowiki>''index''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{PAGESINNAMESPACE:</nowiki>''index''<nowiki>}}</nowiki></code> | ||
| ''Not enabled'' | | ''Not enabled'' | ||
− | | | + | | Number of pages in the given [[Help:Namespaces|namespace]] (replace ''index'' with the relevant [[Manual:Namespace|namespace index]]). For instance, <code><nowiki>{{PAGESINNAMESPACE:</nowiki>''14''<nowiki>}}</nowiki></code> will output the number of category pages. <code><nowiki>{{PAGESINNS:0}}</nowiki></code> differs from <code><nowiki>{{NUMBEROFARTICLES}}</nowiki></code> in that the former includes redirects and disambiguation pages. Disabled by default, enable with {{mediawiki|Manual:$wgAllowSlowParserFunctions|$wgAllowSlowParserFunctions}}. |
| 1.7 以降 | | 1.7 以降 | ||
|} | |} | ||
420行目: | 415行目: | ||
! バージョン | ! バージョン | ||
|- | |- | ||
− | | | + | | <code><nowiki>{{FULLPAGENAME}}</nowiki></code> |
| {{FULLPAGENAME}} | | {{FULLPAGENAME}} | ||
| 名前空間を含めたページ名 (すべての下位レベルを含む)。 | | 名前空間を含めたページ名 (すべての下位レベルを含む)。 | ||
| 1.6 以降 | | 1.6 以降 | ||
|- | |- | ||
− | | | + | | <code><nowiki>{{PAGENAME}}</nowiki></code> |
| {{PAGENAME}} | | {{PAGENAME}} | ||
| 名前空間を除外したページ名 (すべての下位レベルを含む)。 | | 名前空間を除外したページ名 (すべての下位レベルを含む)。 | ||
432行目: | 427行目: | ||
| <code><nowiki>{{BASEPAGENAME}}</nowiki></code> | | <code><nowiki>{{BASEPAGENAME}}</nowiki></code> | ||
| {{BASEPAGENAME}} | | {{BASEPAGENAME}} | ||
− | | | + | | 名前空間と末尾の[[Help:subpages/ja|下位ページ]]レベルを除外したページ名 ("Help:Title/foo/bar" の場合 "Title/foo")。 |
− | For more complex splitting, use <code><nowiki>{{</nowiki>[[Help:Extension:ParserFunctions | + | For more complex splitting, use <code><nowiki>{{</nowiki>[[Help:Extension:ParserFunctions#.23titleparts|#titleparts:]]<nowiki>}}</nowiki></code> from the [[Help:Extension:ParserFunctions|ParserFunctions extension]]. |
| 1.7 以降 | | 1.7 以降 | ||
|- | |- | ||
− | | | + | | <code><nowiki>{{SUBPAGENAME}}</nowiki></code> |
| {{SUBPAGENAME}} | | {{SUBPAGENAME}} | ||
| [[Help:subpages/ja|下位ページ]] 名 ("Help:Title/foo/bar" の場合 "bar") | | [[Help:subpages/ja|下位ページ]] 名 ("Help:Title/foo/bar" の場合 "bar") | ||
| 1.6 以降 | | 1.6 以降 | ||
|- | |- | ||
− | | | + | | <code><nowiki>{{SUBJECTPAGENAME}}</nowiki></code> <br/><code><nowiki>{{ARTICLEPAGENAME}}</nowiki></code> |
| {{SUBJECTPAGENAME}}<br/>{{ARTICLEPAGENAME}} | | {{SUBJECTPAGENAME}}<br/>{{ARTICLEPAGENAME}} | ||
− | | | + | | 関連付けられた本文ページのページ名。 |
| 1.7 以降 | | 1.7 以降 | ||
|- | |- | ||
− | | | + | | <code><nowiki>{{TALKPAGENAME}}</nowiki></code> |
| {{TALKPAGENAME}} | | {{TALKPAGENAME}} | ||
| 関連付けられたトークページのページ名。 | | 関連付けられたトークページのページ名。 | ||
457行目: | 452行目: | ||
* <code><nowiki>{{PAGENAME:Template:Main Page}}</nowiki></code> → '''{{PAGENAME:Template:Main Page}}''' | * <code><nowiki>{{PAGENAME:Template:Main Page}}</nowiki></code> → '''{{PAGENAME:Template:Main Page}}''' | ||
− | {{Warning/ja|Page titles containing certain characters, such as apostrophes <code>'</code> or asterisks <code>*</code>, may produce unexpected results when handled with these magic words, e.g. <code><nowiki>{{PAGESINCATEGORY:{{PAGENAME}}}}</nowiki></code>. See bugs {{mediawiki|bugzilla:14779|14779}}, {{mediawiki|bugzilla:16474|16474}} and {{mediawiki|bugzilla:35628|35628}}. One simple way to fix this is wrapping the pagename in #titleparts | + | {{Warning/ja|Page titles containing certain characters, such as apostrophes <code>'</code> or asterisks <code>*</code>, may produce unexpected results when handled with these magic words, e.g. <code><nowiki>{{PAGESINCATEGORY:{{PAGENAME}}}}</nowiki></code>. See bugs {{mediawiki|bugzilla:14779|14779}}, {{mediawiki|bugzilla:16474|16474}} and {{mediawiki|bugzilla:35628|35628}}. One simple way to fix this is wrapping the pagename in #titleparts.}} |
For example, if page name is "L'Aquila", the following code will produce the string "Numeric char encoding": | For example, if page name is "L'Aquila", the following code will produce the string "Numeric char encoding": | ||
497行目: | 492行目: | ||
| <code><nowiki>{{NAMESPACENUMBER}}</nowiki></code> | | <code><nowiki>{{NAMESPACENUMBER}}</nowiki></code> | ||
| {{NAMESPACENUMBER}} | | {{NAMESPACENUMBER}} | ||
− | + | | ID of the page's namespace | |
| [[gerrit:4056|1.20 以降]] | | [[gerrit:4056|1.20 以降]] | ||
|- | |- | ||
527行目: | 522行目: | ||
Parser functions are very similar to variables, but take one or more parameters (technically, any magic word that takes a parameter is a parser function), and the name is sometimes prefixed with a hash to distinguish them from templates. | Parser functions are very similar to variables, but take one or more parameters (technically, any magic word that takes a parameter is a parser function), and the name is sometimes prefixed with a hash to distinguish them from templates. | ||
− | 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 {{mediawiki|Extension:ParserFunctions|ParserFunctions extension}}. For those see [[Help:Extension:ParserFunctions | + | 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 {{mediawiki|Extension:ParserFunctions|ParserFunctions extension}}. For those see [[Help:Extension:ParserFunctions]]. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== URL データ === | === URL データ === | ||
604行目: | 533行目: | ||
! バージョン | ! バージョン | ||
|- | |- | ||
− | + | | <code><nowiki>{{localurl:</nowiki>''page name''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{localurl:</nowiki>''page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code> | |
− | |||
− | | <code><nowiki>{{localurl:</nowiki>'' | ||
| <code><nowiki>{{localurl:MediaWiki}}</nowiki></code> → {{localurl:MediaWiki}} <br /><code><nowiki>{{localurl:MediaWiki|printable=yes}}</nowiki></code> → {{localurl:MediaWiki|printable=yes}} | | <code><nowiki>{{localurl:MediaWiki}}</nowiki></code> → {{localurl:MediaWiki}} <br /><code><nowiki>{{localurl:MediaWiki|printable=yes}}</nowiki></code> → {{localurl:MediaWiki|printable=yes}} | ||
| The relative path to the title. | | The relative path to the title. | ||
| | | | ||
|- | |- | ||
− | + | | <code><nowiki>{{fullurl:</nowiki>''page name''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{fullurl:</nowiki>''page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{fullurl:</nowiki>''interwiki:remote page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code> | |
− | |||
− | | <code><nowiki>{{fullurl:</nowiki>'' | ||
| <code><nowiki>{{fullurl:Category:Top level}}</nowiki></code> → {{fullurl:Category:Top level}} <br /> | | <code><nowiki>{{fullurl:Category:Top level}}</nowiki></code> → {{fullurl:Category:Top level}} <br /> | ||
<code><nowiki>{{fullurl:Category:Top level|action=edit}}</nowiki></code> → {{fullurl:Category:Top level|action=edit}} | <code><nowiki>{{fullurl:Category:Top level|action=edit}}</nowiki></code> → {{fullurl:Category:Top level|action=edit}} | ||
619行目: | 544行目: | ||
| 1.5 以降 | | 1.5 以降 | ||
|- | |- | ||
− | + | | <code><nowiki>{{canonicalurl:</nowiki>''page name''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{canonicalurl:</nowiki>''page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{canonicalurl:</nowiki>''interwiki:remote page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code> | |
− | |||
− | | <code><nowiki>{{canonicalurl:</nowiki>'' | ||
| <code><nowiki>{{canonicalurl:Category:Top level}}</nowiki></code> → {{canonicalurl:Category:Top level}} <br /> | | <code><nowiki>{{canonicalurl:Category:Top level}}</nowiki></code> → {{canonicalurl:Category:Top level}} <br /> | ||
<code><nowiki>{{canonicalurl:Category:Top level|action=edit}}</nowiki></code> → {{canonicalurl:Category:Top level|action=edit}} | <code><nowiki>{{canonicalurl:Category:Top level|action=edit}}</nowiki></code> → {{canonicalurl:Category:Top level|action=edit}} | ||
| The absolute path to the title, using the canonical URL. This will also resolve [[Manual:Interwiki|interwiki]] prefixes. | | The absolute path to the title, using the canonical URL. This will also resolve [[Manual:Interwiki|interwiki]] prefixes. | ||
| 1.18 以降 | | 1.18 以降 | ||
− | |||
− | |||
|- | |- | ||
| <code><nowiki>{{filepath:</nowiki>''file name''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{filepath:</nowiki>''file name''<nowiki>|nowiki}}</nowiki></code> <br /><code><nowiki>{{filepath:</nowiki>''file name''<nowiki>|</nowiki>''thumbnail_size''<nowiki>}}</nowiki></code> | | <code><nowiki>{{filepath:</nowiki>''file name''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{filepath:</nowiki>''file name''<nowiki>|nowiki}}</nowiki></code> <br /><code><nowiki>{{filepath:</nowiki>''file name''<nowiki>|</nowiki>''thumbnail_size''<nowiki>}}</nowiki></code> | ||
635行目: | 556行目: | ||
| A protocol-relative path to the full size or thumbnail ({{mediawiki|rev:80813|1.18 以降}}) of a media file. | | A protocol-relative path to the full size or thumbnail ({{mediawiki|rev:80813|1.18 以降}}) of a media file. | ||
| {{mediawiki|rev:25854|1.12 以降}} <br />{{mediawiki|rev:80813|1.18 以降}} | | {{mediawiki|rev:25854|1.12 以降}} <br />{{mediawiki|rev:80813|1.18 以降}} | ||
− | |||
− | |||
|- | |- | ||
| <code><nowiki>{{urlencode:</nowiki>''string''<nowiki>}}</nowiki></code> (or <code><nowiki>{{urlencode:</nowiki>''string''<nowiki>|QUERY}}</nowiki></code>) <br /><code><nowiki>{{urlencode:</nowiki>''string''<nowiki>|WIKI}}</nowiki></code> <br /><code><nowiki>{{urlencode:</nowiki>''string''<nowiki>|PATH}}</nowiki></code> | | <code><nowiki>{{urlencode:</nowiki>''string''<nowiki>}}</nowiki></code> (or <code><nowiki>{{urlencode:</nowiki>''string''<nowiki>|QUERY}}</nowiki></code>) <br /><code><nowiki>{{urlencode:</nowiki>''string''<nowiki>|WIKI}}</nowiki></code> <br /><code><nowiki>{{urlencode:</nowiki>''string''<nowiki>|PATH}}</nowiki></code> | ||
643行目: | 562行目: | ||
| The input encoded for use in URLs. Note that there is no urldecode function like there is in the obsolete [[Extension:StringFunctions]]. | | The input encoded for use in URLs. Note that there is no urldecode function like there is in the obsolete [[Extension:StringFunctions]]. | ||
| {{mediawiki|rev:14273|1.7 以降}} (または {{mediawiki|rev:64726|1.17 以降}}) <br />{{mediawiki|rev:64726|1.17 以降}} <br />{{mediawiki|rev:64726|1.17 以降}} | | {{mediawiki|rev:14273|1.7 以降}} (または {{mediawiki|rev:64726|1.17 以降}}) <br />{{mediawiki|rev:64726|1.17 以降}} <br />{{mediawiki|rev:64726|1.17 以降}} | ||
− | |||
− | |||
|- | |- | ||
| <code><nowiki>{{anchorencode:</nowiki>''string''<nowiki>}}</nowiki></code> | | <code><nowiki>{{anchorencode:</nowiki>''string''<nowiki>}}</nowiki></code> | ||
715行目: | 632行目: | ||
|} | |} | ||
− | Don't confuse localised namespaces with [[Manual:Using custom namespaces | + | Don't confuse localised namespaces with [[Manual:Using custom namespaces|custom namespaces]]. |
=== 整形 === | === 整形 === | ||
835行目: | 752行目: | ||
! バージョン | ! バージョン | ||
|- | |- | ||
− | | | + | | <code><nowiki>{{plural:2|</nowiki>''is''<nowiki>|</nowiki>''are''<nowiki>}}</nowiki></code> |
| <code><nowiki>{{plural:0|is|are}}</nowiki></code> → {{plural:0|is|are}} <br /> <code><nowiki>{{plural:1*1|is|are}}</nowiki></code> → {{plural:1*1|is|are}} <br /> <code><nowiki>{{plural:21 mod 10|is|are}}</nowiki></code> → {{plural:21 mod 10|is|are}} <br /> <code><nowiki>{{plural:{{#expr:21 mod 10}}|is|are}}</nowiki></code> → {{plural:{{#expr:21 mod 10}}|is|are}} <br /> <code><nowiki>{{plural:1|is|are}}</nowiki></code> → {{plural:1|is|are}} <br /> <code><nowiki>{{plural:2|is|are}}</nowiki></code> → {{plural:2|is|are}} <br /> (For [[:w:Polish language|Polish]]) <br /><code><nowiki>{{plural:2|milion|miliony|milionów}}</nowiki></code> → miliony<br /><code><nowiki>{{plural:5|milion|miliony|milionów}}</nowiki></code> → milionów | | <code><nowiki>{{plural:0|is|are}}</nowiki></code> → {{plural:0|is|are}} <br /> <code><nowiki>{{plural:1*1|is|are}}</nowiki></code> → {{plural:1*1|is|are}} <br /> <code><nowiki>{{plural:21 mod 10|is|are}}</nowiki></code> → {{plural:21 mod 10|is|are}} <br /> <code><nowiki>{{plural:{{#expr:21 mod 10}}|is|are}}</nowiki></code> → {{plural:{{#expr:21 mod 10}}|is|are}} <br /> <code><nowiki>{{plural:1|is|are}}</nowiki></code> → {{plural:1|is|are}} <br /> <code><nowiki>{{plural:2|is|are}}</nowiki></code> → {{plural:2|is|are}} <br /> (For [[:w:Polish language|Polish]]) <br /><code><nowiki>{{plural:2|milion|miliony|milionów}}</nowiki></code> → miliony<br /><code><nowiki>{{plural:5|milion|miliony|milionów}}</nowiki></code> → milionów | ||
| Outputs the singular form (second parameter) if the first parameter is an expression equalling one; the plural form (third parameter) otherwise. Its functioning is [[m:Help:Magic_words#Language-dependent_word_conversions|language-dependent]]. Plural transformations are used for languages like Russian based on "count mod 10". You should not expect this to handle fractions (like 44.5) — see [[bugzilla:28128|bug 28128]]. | | Outputs the singular form (second parameter) if the first parameter is an expression equalling one; the plural form (third parameter) otherwise. Its functioning is [[m:Help:Magic_words#Language-dependent_word_conversions|language-dependent]]. Plural transformations are used for languages like Russian based on "count mod 10". You should not expect this to handle fractions (like 44.5) — see [[bugzilla:28128|bug 28128]]. | ||
| | | | ||
|- | |- | ||
− | | | + | | <code><nowiki>{{grammar:N|</nowiki>''noun''<nowiki>}}</nowiki></code> |
| | | | ||
| Outputs the correct inflected form of the given word described by the inflection code after the colon ([[m:Help:Magic_words#Language-dependent_word_conversions|language-dependent]]). Grammar transformations are used for inflected languages like Polish. See also {{mediawiki|Manual:$wgGrammarForms}}. | | Outputs the correct inflected form of the given word described by the inflection code after the colon ([[m:Help:Magic_words#Language-dependent_word_conversions|language-dependent]]). Grammar transformations are used for inflected languages like Polish. See also {{mediawiki|Manual:$wgGrammarForms}}. | ||
| 1.7 以降 | | 1.7 以降 | ||
|- | |- | ||
− | | | + | | <code><nowiki>{{gender:</nowiki>''username'' <br /><nowiki>|</nowiki>''return text if user is male'' <br /><nowiki>|</nowiki>''return text if user is female'' <br /><nowiki>|</nowiki>''return text if user hasn't defined their gender''<nowiki>}}</nowiki></code> |
| ''(Depends on the named user's gender)'' | | ''(Depends on the named user's gender)'' | ||
| A switch for the gender set in [[Special:Preferences]]. <br/> | | A switch for the gender set in [[Special:Preferences]]. <br/> | ||
851行目: | 768行目: | ||
| {{mediawiki|rev:46247|1.15 以降}} | | {{mediawiki|rev:46247|1.15 以降}} | ||
|- | |- | ||
− | | | + | | <code><nowiki>{{int:</nowiki>''message name''<nowiki>}}</nowiki> |
| <code><nowiki>{{int:</nowiki>edit<nowiki>}}</nowiki></code> → '''{{int:edit}}''' <br /><small>''(Depends on user language; try: [{{fullurl:{{FULLPAGENAME}}|uselang=fr}}#Localisation fr] • [{{fullurl:{{FULLPAGENAME}}|uselang=ja}}#Localisation ja])''</small> | | <code><nowiki>{{int:</nowiki>edit<nowiki>}}</nowiki></code> → '''{{int:edit}}''' <br /><small>''(Depends on user language; try: [{{fullurl:{{FULLPAGENAME}}|uselang=fr}}#Localisation fr] • [{{fullurl:{{FULLPAGENAME}}|uselang=ja}}#Localisation ja])''</small> | ||
| Internationalizes (translates) the given '''int'''erface (MediaWiki namespace) message into the user language. For <code>msgnw</code> and other transclusion magic words, see [[m:Help:Magic words#Template modifiers]]. | | Internationalizes (translates) the given '''int'''erface (MediaWiki namespace) message into the user language. For <code>msgnw</code> and other transclusion magic words, see [[m:Help:Magic words#Template modifiers]]. | ||
876行目: | 793行目: | ||
<code><nowiki>{{#language:ar|en}}</nowiki></code> | <code><nowiki>{{#language:ar|en}}</nowiki></code> | ||
| {{#language:language code}} <br />{{#language:ar}} <br />{{#language:language code|target language code}} <br />Arabic | | {{#language:language code}} <br />{{#language:ar}} <br />{{#language:language code|target language code}} <br />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 | + | | 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. |
| {{mediawiki|rev:14490|1.7 以降}} | | {{mediawiki|rev:14490|1.7 以降}} | ||
{{r|91875|1.18 以降}} (translation) | {{r|91875|1.18 以降}} (translation) |