도움말:Magic words
![]() |
참고: 이 문서를 편집하면 CC0에 따라 당신의 기여를 배포하는 데 동의하는 것으로 간주됩니다. 자세한 내용은 퍼블릭 도메인 도움말 문서를 확인하세요.
|
![]() |
매직 워드(Magic words) 또는 특수 명령문은 미디어위키에서 시간, 사이트의 정보 혹은 문서의 이름 등 정해진 값, 문자열 혹은 함수를 출력하는데 사용하는 문자열입니다. 이 문서는 미디어위키에서 기본적으로 제공하는 특수 명령문에 대해서만 설명하고 있습니다. 기술적인 참고 사항에 대해서는 Manual:Magic words 를 보시기 바랍니다.
특수 명령문에는 크게 세 가지 종류가 있습니다.
- 작동 스위치: 두 개의 밑줄표로 둘러싸이고 대문자로 된 문자열을 가지는 경우가 보통입니다. 예시:
__FOO__
- 변수: 두 개의 중괄호로 둘러싸이고 대문자로 된 문자열을 가집니다. 예시:
{{FOO}}
. 보시다시피, 틀을 사용하는 것과 매우 닮았습니다. - 파서 함수: 파라미터가 주어집니다. 또한
{{foo:...}}
나{{#foo:...}}
의 형태를 가집니다. 예시:{{#invoke:}}
. Help:확장기능:파서 함수 , Extension:Scribunto 도 같이 참고해 보세요.
변수와 파서 함수는 틀과 마찬가지로 "풀기:" 혹은 "subst:"를 이용해서 풀어쓴 형태로 나타낼 수도 있습니다. 문서에 의존적인 특수 명령어들은(예시:PAGEID 등)은 명령어들이 본문이 아닌 문서에 인용된 틀이나 시스템 메시지를 통해서 삽입되었을지라도 "현재 문서"에 관련된 값을 출력합니다.
작동 스위치
작동 스위치는 (스킨이 지원하는 경우) 문서의 레이아웃이나 작동을 제어하고 내용을 원하는 대로 넣거나 빼는 데 사용할 수 있습니다. 특히 아래의 것들 중 일부는 미네르바 노이에 스킨에서 지원하지 않습니다.
문자열 | 설명 | 버전 | ||
---|---|---|---|---|
목차 | ||||
__NOTOC__
|
목차(TOC)를 숨깁니다. | |||
__FORCETOC__
|
목차가 항상 보이도록 설정합니다. | |||
__TOC__
|
문자열이 입력된 곳에 목차를 표시합니다. (만약 __NOTOC__ 가 사용되었다면 NOTOC을 무시합니다.) 여러 번 사용된 경우는 첫 번째만 작동합니다.
|
|||
편집 | ||||
__NOEDITSECTION__
|
소제목에 붙는 '편집' 링크를 숨깁니다. 틀 안에서 이 명령어를 사용할 경우 이 틀을 모두 포함하는 문서와 해당 문서에 한해 이 문서에서 인용된 틀 전체에 영향을 줍니다. 어떻게 작동하는지 확인하려면 이곳을 확인하십시오. | |||
__NEWSECTIONLINK__
|
토론 문서가 아닌 경우, 문서 메뉴에 새 토론 추가하기를 추가합니다. (이름은 Adding a section to the end에서 지정할 수 있습니다.) |
| ||
__NONEWSECTIONLINK__
|
Removes the link beside the "편집" tab on pages in talk namespaces. |
| ||
분류 | ||||
__NOGALLERY__
|
분류 문서에서 사용합니다. 그림 파일이 섬네일로 나오지 않고, 대신 일반 문서로 나옵니다. |
| ||
__HIDDENCAT__
|
분류 문서에서 사용합니다. 해당 분류에 속하는 문서가 자신이 그 분류에 속한다는 것을 표시하지 않습니다. (해당 분류를 보려면 사용자 설정에서 바꿀 수 있습니다.) |
| ||
__EXPECTUNUSEDCATEGORY__
|
Used on a category page, removes the category from Special:UnusedCategories. |
| ||
언어 변환 | ||||
__NOCONTENTCONVERT__ __NOCC__
|
언어 표현을 변경할 수 있는 경우에 사용합니다. 문서를 표시할 때 언어 변환을 사용하지 않습니다. 예를 들어, 중국어 문서(zh)를 zh_cn, zh_tw, zh_sg, zh_hk로 변환하지 않습니다. | |||
__NOTITLECONVERT__ __NOTC__
|
__NOCONTENTCONVERT__ 와 비슷하지만, 제목에만 변환을 사용하지 않습니다. 나머지 내용은 변환합니다.
|
|||
기타 | ||||
__START__
|
작동하지 않습니다. Was used to point where database message starts after comment that should not be transcluded. Removed in r1695 and completely removed in r24784. |
| ||
__END__
|
Explicitly marks the end of the article, to prevent MediaWiki from removing trailing whitespace. Removed in 19213. |
| ||
__INDEX__
|
검색엔진이 이 문서를 수집하는 것을 허가합니다. ($manual-wg-bot-policy을 오버라이드하지만, robots.txt를 오버라이드하지 않습니다.) It obeys $manual-wg-exempt-from-bot variable. |
| ||
__NOINDEX__
|
검색엔진이 이 문서를 수집하는 것을 거부합니다. It obeys $wgExemptFromUserRobotsControl variable. |
| ||
__STATICREDIRECT__
|
넘겨주기 문서에서 사용합니다. 누군가 문서를 이동하고 나서 "$fixDoubleRedirects"를 확인할 때, 미디어위키가 자동으로 넘겨주기 링크를 갱신하지 않습니다 (요구 변수는 $wgFixDoubleRedirects ). |
| ||
확장 기능 | ||||
확장 기능 | 문자열 | 설명 | 버전 | |
GlobalUserPage | __NOGLOBAL__
|
전역 사용자 문서를 비활성화 합니다. If present on the central user page, will prevent it from being displayed on remote wikis, and it also determines whether a link to a user page on remote wiki should be red or blue. |
| |
Disambiguator | __DISAMBIG__
|
Identifies a disambiguation page. |
|
변수
Variables return information about the current page, wiki, or date. Their syntax is similar to templates. Variables marked as "[expensive]" are tracked by the software, and the number that can be included on a page is limited.
If a template name conflicts with a variable, the variable will be used (so to transclude the template Template:PAGENAME you would need to write {{Template:PAGENAME}}
). In some cases, adding parameters will force the parser to invoke a template; for example, {{CURRENTDAYNAME|x}}
transcludes Template:CURRENTDAYNAME, not the variable.
날짜 및 시간
다음 변수는 현재 날짜와 시간을 UTC로 반환합니다.
Due to MediaWiki and browser caching, these variables frequently show when the page was cached rather than the current time.
The use of those variables cause pages to be cached for a more limited number of seconds. This is configured in MagicWordFactory.
The date and time magic words are formatted in the wiki content language. Since 1.19, they depend on the page content language.
변수 | 출력 | 설명 | 버전 | |
---|---|---|---|---|
연도 | ||||
{{CURRENTYEAR}}
|
2021 | 연도 | ||
달 | ||||
{{CURRENTMONTH}}
|
04 | 달(01~12의 두 자리 숫자로 표시) | ||
{{CURRENTMONTH1}}
|
4 | Month (unpadded number) | ||
{{CURRENTMONTHNAME}}
|
4월 | 달(이름으로 표시) | ||
{{CURRENTMONTHNAMEGEN}}
|
4월 | 달(소유격. 언어에 따라 소유격이 다른 경우에 사용합니다) | ||
{{CURRENTMONTHABBREV}}
|
4 | 달(약어 표기) |
| |
날짜 | ||||
{{CURRENTDAY}}
|
16 | 월별 날짜(1~31로 표기) | ||
{{CURRENTDAY2}}
|
16 | 월별 날짜(01~31로 표기) |
| |
{{CURRENTDOW}}
|
5 | 요일(숫자, 월=1, 화=2, ..., 일=7) | ||
{{CURRENTDAYNAME}}
|
금요일 | 요일(이름) | ||
시간 | ||||
{{CURRENTTIME}}
|
13:49 | 시간(24시간 HH:mm) | ||
{{CURRENTHOUR}}
|
13 | 시간(분 없이, HH(00~24)로 표기) | ||
기타 | ||||
{{CURRENTWEEK}}
|
15 | 주(숫자, 한 해에서 몇 번째 주인지를 표시) | ||
{{CURRENTTIMESTAMP}}
|
20210416134941 | YYYYMMDDHHmmss |
|
The following variables do the same as the preceding ones but using the site's server config or $wgLocaltimezone.
{{LOCALYEAR}}
{{LOCALMONTH}}
{{LOCALMONTH1}}
{{LOCALMONTHNAME}}
{{LOCALMONTHNAMEGEN}}
{{LOCALMONTHABBREV}}
{{LOCALDAY}}
{{LOCALDAY2}}
{{LOCALDOW}}
{{LOCALDAYNAME}}
{{LOCALTIME}}
{{LOCALHOUR}}
{{LOCALWEEK}}
{{LOCALTIMESTAMP}}
For more thorough time formatting, or to output the current year and week with better compliance with ISO-8601, you may want to install 확장기능:ParserFunctions to use the #time parser function.
기술적인 메타데이터
변수 | 출력 | 설명 | 버전 | ||
---|---|---|---|---|---|
사이트 | |||||
{{SITENAME}}
|
MediaWiki | 위키 사이트 이름($manual-wg-sitename에서 설정 가능) | |||
{{SERVER}}
|
//www.mediawiki.org | 위키 도메인 URL($manual-wg-server에서 설정 가능) | |||
{{SERVERNAME}}
|
www.mediawiki.org | Subdomain and domain name (no longer dependent on $wgServerName as of version 1.17). | |||
{{DIRMARK}}
|
|
위키 기본 언어의 방향(좌에서 우, 우에서 좌)에 대응하는 유니코드 기호를 출력합니다. 여러 언어를 섞어서 사용하는 경우 유용합니다. |
| ||
{{SCRIPTPATH}}
|
/w | 스크립트 위치 상대경로($manual-wg-scriptpath) | |||
{{STYLEPATH}}
|
/w/skins | 스킨 스타일 위치 상대경로($manual-wg-stylepath) |
| ||
{{CURRENTVERSION}}
|
1.37.0-wmf.1 (d24309a) | 미디어위키 버전 |
| ||
{{CONTENTLANGUAGE}}
|
en en |
기본 사용 언어($manual-wg-langcode) |
| ||
페이지 | |||||
{{PAGEID}}
|
60388 | Returns the page identifier. |
| ||
{{PAGELANGUAGE}}
|
ko
한국어 |
Returns the language of the current page. The language code that this variable returns can be converted to a language name using {{#language:...}} .
|
| ||
<translate><!--T:1--> Translated unit. Language: <tvar|lang>{{TRANSLATIONLANGUAGE}}</>.</translate>
|
Translated unit. Language: en.
Not translated unit. Language: en. |
Must be used in a translated page, inside <translate> tags. Returns the language code of the current translation unit. In a translation page, if the unit has been translated, then it returns translation language. Else, it returns source language. The language code that this variable returns can be converted to a language name using {{#language:...}} . Should only be used by translation admins.
|
| ||
{{PROTECTIONLEVEL:동작}}
|
입력한 기능('edit': 편집, 'move': 이동)에 대해, 현재 문서의 보호 상태('autoconfirm': 준보호, 'sysop': 보호)를 출력합니다. 보호 상태가 없으면 빈 문자열을 출력합니다. |
| |||
{{PROTECTIONEXPIRY:동작}}
|
Outputs the protection expiry (e.g. "20160418155030", "infinity") for a given action (e.g. "edit", "move") on the current page. 보호되어 있지 않은 경우 "무한대"를 변환합니다. |
| |||
{{CASCADINGSOURCES}}
|
[Expensive] Returns the sources of any cascading protection acting on the current page. Pages will not return their own title unless they transclude themselves. |
| |||
현재 문서의 최근 편집 기록 | |||||
{{REVISIONID}}
|
- | 편집 기록 고유 ID It is empty in preview, thus one can show an error message only in preview. May be disabled in miser mode. |
| ||
{{REVISIONDAY}}
|
4 | 편집한 날(1~31 표기) |
| ||
{{REVISIONDAY2}}
|
04 | 편집한 날(01~31 표기) |
| ||
{{REVISIONMONTH}}
|
04 | 편집한 달(01~31로 표기. 1.17+보다 이전 버전의 경우는 1~31로 표기합니다.) |
| ||
{{REVISIONMONTH1}}
|
4 | Month edit was made (unpadded number). |
| ||
{{REVISIONYEAR}}
|
2021 | 편집한 연도 |
| ||
{{REVISIONTIMESTAMP}}
|
20210404221521 | 편집한 시간 |
| ||
{{REVISIONUSER}}
|
FuzzyBot | 편집한 사용자명 |
| ||
{{REVISIONSIZE}}
|
84389 | The size (bytes of wikitext) of the current revision of this page |
| ||
문서 출력 | |||||
{{DISPLAYTITLE:제목}} {{DISPLAYTITLE:제목|noerror}} {{DISPLAYTITLE:제목|noreplace}}
|
Format the current page's title header. The value must be equivalent to the default title: only capitalization changes to certain parts of the title (not all) 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 |
(for noerror and noreplace) | |||
{{DEFAULTSORT:sortkey}} {{DEFAULTSORTKEY:sortkey}} {{DEFAULTCATEGORYSORT:sortkey}} {{DEFAULTSORT:sortkey|noerror}} {{DEFAULTSORT:sortkey|noreplace}}
|
문서 분류에 사용되는 정렬 키를 변경합니다. For example if you put {{DEFAULTSORT:Smith, John}} 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 this defaultsort do nothing if a defaultsort was already specified earlier in the page.
|
(for noerror and noreplace) |
통계
Numbers returned by these variables normally contain separators (commas, dots or spaces, depending on the local language) but can return raw numbers with the ":R" flag (for example, {{NUMBEROFPAGES}}
→ 1,086,972 and {{NUMBEROFPAGES:R}}
→ 1086972).
Use "|R" for magic words that require a parameter like PAGESINCATEGORY (for example {{PAGESINCATEGORY:Help}}
and {{PAGESINCATEGORY:Help|R}}
, or {{PAGESINCATEGORY:Help|subcats}}
and {{PAGESINCATEGORY:Help|subcats|R}}
). Also applicable to {{PAGESIZE:page name}}
hereinbefore.
The number magic words are formatted in the wiki content language. Since 1.19, it depends on the page content language.
변수 | 출력 | 설명 | 버전 | |
---|---|---|---|---|
{{NUMBEROFPAGES}}
|
1,086,972 | 위키 문서 수 |
| |
{{NUMBEROFARTICLES}}
|
44,182 | Number of pages in content namespaces that qualify as articles. See Manual:$wgArticleCountMethod for details. | ||
{{NUMBEROFFILES}}
|
2,878 | 올린 파일 수입니다. |
| |
{{NUMBEROFEDITS}}
|
4,424,533 | 위키 편집 수입니다. |
| |
{{NUMBEROFVIEWS}}
|
방문자 수입니다. 캐시를 사용하는 경우 대개 쓸모없습니다. Gerrit change 150699에서 제거됩니다. |
| ||
{{NUMBEROFUSERS}}
|
17,466,835 | 등록된 사용자 수입니다. |
| |
{{NUMBEROFADMINS}}
|
165 | 관리자 그룹 에 있는 사용자 수입니다. |
| |
{{NUMBEROFACTIVEUSERS}}
|
1,421 | Special:Statistics의 기준에 근거한 활동적인 사용자의 수입니다. |
| |
{{PAGESINCATEGORY:categoryname}} {{PAGESINCAT:categoryname}}
|
128 128 |
[Expensive] Number of pages (including subcategories and files) in the given category. (Category:Help used for demonstration) |
| |
{{PAGESINCATEGORY:categoryname|all}} {{PAGESINCATEGORY:categoryname|pages}} {{PAGESINCATEGORY:categoryname|subcats}} {{PAGESINCATEGORY:categoryname|files}}
|
128 125 3 0 |
[Expensive] Respectively, the number of
in the given category. (Category:Help used for demonstration) |
| |
{{NUMBERINGROUP:그룹이름$code1그룹이름}} {{NUMINGROUP:groupname}}
|
29 29 |
특정 그룹 에 있는 사용자 수입니다. ({{NUMBERINGROUP:bureaucrat}} used for demonstration) |
| |
{{PAGESINNS:색인$code1색인}} {{PAGESINNAMESPACE:index}}
|
활성화되지 않음 | [Expensive] Number of pages in the given namespace (replace index with the relevant namespace index). For instance, {{PAGESINNAMESPACE:14}} will output the number of category pages. {{PAGESINNS:0}} differs from {{NUMBEROFARTICLES}} in that the former includes redirects and disambiguation pages. Disabled by default, enable with $wgAllowSlowParserFunctions .
|
|
문서 제목
변수 | For current page | 설명 | 버전 | |
---|---|---|---|---|
{{FULLPAGENAME}}
|
Help:Magic words/ko | 문서 제목, 이름공간 포함 |
| |
{{PAGENAME}}
|
Magic words/ko | 문서 제목, 이름공간 제외 | ||
{{BASEPAGENAME}}
|
Magic words | 기본 문서 제목. 이름공간을 제외하며, 하위 문서에 대한 정보도 제외합니다. "이름공간:제목/하위1/하위2"의 경우 "제목/하위1"를 출력합니다.
더 복잡한 출력이 필요한 경우는 |
| |
{{ROOTPAGENAME}}
|
Magic words | 현재 페이지의 루트의 이름. Would return Title on page Help:Title/Foo/Bar .
|
| |
{{SUBPAGENAME}}
|
ko | 하위 문서 정보. "제목/하위"의 경우 "하위"를 출력합니다. Would return Bar on page Help:Title/Foo/Bar .
If no subpage exists the value of For more complex splitting, use |
| |
{{SUBJECTPAGENAME}} {{ARTICLEPAGENAME}}
|
Help:Magic words/ko Help:Magic words/ko |
문서 이름공간의 문서 제목(이름공간 포함) |
| |
{{TALKPAGENAME}}
|
Help talk:Magic words/ko | 토론 이름공간의 문서 제목(이름공간 포함) |
|
None of these are affected by changes to the display title using {{DISPLAYTITLE:xxxx}}
; the values returned are the original page title.
The {{BASEPAGENAME}}
and {{SUBPAGENAME}}
magic words only work in namespaces that have subpages enabled. See $wgNamespacesWithSubpages for information on enabling subpages.
As of 1.15+, these can all take a parameter, allowing specification of the page to be operated on, instead of just the current page:
{{PAGENAME:Template:Main Page}}
→ Main Page
URL 인코드된 페이지 이름
The following are equivalents encoded for use in MediaWiki URLs (i.e. spaces replaced with underscores and some characters HTML escaped using numeric character encoding):
{{FULLPAGENAMEE}}
{{PAGENAMEE}}
{{BASEPAGENAMEE}}
{{SUBPAGENAMEE}}
{{SUBJECTPAGENAMEE}}
{{ARTICLEPAGENAMEE}}
{{TALKPAGENAMEE}}
{{ROOTPAGENAMEE}}
Note that {{PAGENAME:...}}
, {{PAGENAMEE:...}}
and {{urlencode:...}}
have distinct implementations. See Manual:PAGENAMEE encoding for details.
이름공간
변수 | 출력 | 설명 | 버전 | |
---|---|---|---|---|
{{NAMESPACE}}
|
Help | 문서 이름공간의 이름 | ||
{{NAMESPACENUMBER}}
|
12 | 문서 이름공간의 ID |
| |
{{SUBJECTSPACE}} {{ARTICLESPACE}}
|
Help Help |
Name of the associated content namespace |
| |
{{TALKSPACE}}
|
Help talk | 문서의 토론 이름공간. {{SUBJECTSPACE}} 과 반대의 기능입니다.
|
|
The following are equivalents encoded for use in MediaWiki URLs (spaces replaced with underscores and some characters percent-encoded):
{{NAMESPACEE}}
{{SUBJECTSPACEE}}
{{ARTICLESPACEE}}
{{TALKSPACEE}}
As of 1.15+, these can take a full-page-name parameter and will return the requested namespace associated with that page, instead of with the current page:
{{NAMESPACENUMBER:MediaWiki}}
→ 0{{NAMESPACE:MediaWiki}}
→ (Pages in main space will return empty){{NAMESPACE:Template:Main Page}}
→ Template{{SUBJECTSPACE:Template:Main Page}}
→ Template{{ARTICLESPACE:Template:Main Page}}
→ Template{{TALKSPACE:Template:Main Page}}
→ Template talk
Parameter must not be a namespace name:
{{SUBJECTSPACE:Help talk}}
→ (Empty)
기타
변수 | 출력 | 설명 | 버전 | |
---|---|---|---|---|
{{!}}
|
| | 틀 인수의 일부로 파이프 문자(수직선)을 넣어줍니다. 이 특수 명령문이 추가되기 이전에는 많은 위키들이 틀:!을 따로 만들어 | 를 직접 넣었습니다.
See Help:Extension:ParserFunctions#Escaping pipe characters in tables for further explanation. |
|
파서 함수
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 확장기능:ParserFunctions . For those see Help:확장기능:파서 함수 .
다른 문서의 기술적인 메타데이터
파서 함수 | (MediaWiki 페이지에 대한) 출력 |
설명 | 버전 | |
---|---|---|---|---|
{{PAGEID: 문서 이름 }}
|
1 | [Expensive] Returns the page identifier of the specified page*. |
| |
{{PAGESIZE:문서 이름}} {{PAGESIZE: 문서 이름 |R}}
|
89,297 89297 |
[Expensive] Returns the byte size of the specified page. Use "|R " to get raw (unformatted) numbers.
|
| |
{{PROTECTIONLEVEL:동작 | 문서 이름}}
|
sysop | [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. |
| |
{{PROTECTIONEXPIRY:
|
infinity | [Expensive] Outputs the protection expiry (e.g. "20160418155030", "infinity") for a given action (e.g. "edit", "move") on the specified page. Returns "infinity" if not protected. |
| |
{{CASCADINGSOURCES: page name}}
|
[Expensive] Returns the sources of any cascading protection acting on the specified page. Pages will not return their own title unless they transclude themselves. |
| ||
{{REVISIONID: 문서 이름 }}
|
3878227 | [Expensive] Unique revision ID of the last revision on the specified page*. |
| |
{{REVISIONDAY: 문서 이름 }}
|
26 | [Expensive] Day of edit from the last revision of the specified page* (unpadded number). |
| |
{{REVISIONDAY2: 문서 이름 }}
|
26 | [Expensive] Day of edit from the last revision of the specified page* (zero-padded number). |
| |
{{REVISIONMONTH: 문서 이름 }}
|
05 | [Expensive] Month of edit from the last revision of the specified page* (zero-padded number as of 1.17+, unpadded number in prior versions). |
| |
{{REVISIONMONTH1: 문서 이름 }}
|
5 | [Expensive] Month of edit from the last revision of the specified page* (unpadded number). |
| |
{{REVISIONYEAR: 문서 이름 }}
|
2020 | [Expensive] Year of edit from the last revision of the specified page*. |
| |
{{REVISIONTIMESTAMP: 문서 이름 }}
|
20200526133817 | [Expensive] Timestamp as of time of edit on the specified page*. |
| |
{{REVISIONUSER: 문서 이름 }}
|
Shirayuki | [Expensive] The username from the last revision on the specified page*. |
| |
|
URL 데이터
파서 함수 | 입력 → 출력 | 설명 | 버전 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{localurl:문서 이름}} {{localurl:문서 이름
|
{{localurl:MediaWiki}} → /wiki/MediaWiki {{localurl:MediaWiki|printable=yes}} → /w/index.php?title=MediaWiki&printable=yes |
The relative path to the title. | |||||||||||||||
{{fullurl:문서 이름}} {{fullurl:문서 이름 {{fullurl:interwiki:remote page name
|
{{fullurl:Category:Top level}} → //www.mediawiki.org/wiki/Category:Top_level
|
A protocol-relative path to the title, which depends on the $wgServer configuration setting for the local wiki (and so may or may not start with http(s):// ). This will also resolve interwiki prefixes. Note: Unbracketed (plain) protocol-relative links are not automagically linked.
|
| ||||||||||||||
{{canonicalurl:문서 이름}} {{canonicalurl:문서 이름 {{canonicalurl:interwiki:remote page name
|
{{canonicalurl:Category:Top level}} → https://www.mediawiki.org/wiki/Category:Top_level
|
The absolute path to the title, using the canonical URL. This will also resolve interwiki prefixes. |
| ||||||||||||||
{{filepath:file name}} {{filepath:file name|nowiki}} {{filepath:file name|thumbnail_size}}
|
{{filepath:Wiki.png}} → //upload.wikimedia.org/wikipedia/mediawiki/b/bc/Wiki.png
|
A protocol-relative path to the full size or thumbnail (1.18+) of a media file. |
| ||||||||||||||
{{urlencode:string}} or {{urlencode:string|QUERY}} {{urlencode:string|WIKI}} {{urlencode:string|PATH}}
|
{{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 |
The input encoded for use in URLs. Note that there is no urldecode function like there is in the obsolete Extension:StringFunctions
|
| ||||||||||||||
{{anchorencode:문자열}}
|
{{anchorencode:x y z á é}} → x_y_z_á_é |
The input encoded for use in URL section anchors (after the “#” symbol in a URL). |
|
이름공간
{{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.
내용 이름공간 | 토론 이름공간 | |||
---|---|---|---|---|
사용법 | 출력 | 사용법 | 출력 | |
{{ns:-2}} / {{ns:Media}}
|
Media | {{ns:-1}} / {{ns:Special}}
|
Special (no talk page) | |
{{ns:0}} / {{ns:}}
|
{{ns:1}} / {{ns:Talk}}
|
Talk | ||
{{ns:2}} / {{ns:User}}
|
User | {{ns:3}} / {{ns:User talk}}
|
User talk | |
{{ns:4}} / {{ns:Project}}
|
Project Varies between wikis |
{{ns:5}} / {{ns:Project talk}}
|
Project talk | |
{{ns:6}} / {{ns:File}} or {{ns:Image}}
|
File | {{ns:7}} / {{ns:File talk}} or {{ns:Image talk}}
|
File talk | |
{{ns:8}} / {{ns:MediaWiki}}
|
MediaWiki | {{ns:9}} / {{ns:MediaWiki talk}}
|
MediaWiki talk | |
{{ns:10}} / {{ns:Template}}
|
Template | {{ns:11}} / {{ns:Template talk}}
|
Template talk | |
{{ns:12}} / {{ns:Help}}
|
Help | {{ns:13}} / {{ns:Help talk}}
|
Help talk | |
{{ns:14}} / {{ns:Category}}
|
Category | {{ns:15}} / {{ns:Category talk}}
|
Category talk |
Don't confuse localised namespaces with custom namespaces.
형식
사용법 | 입력 → 출력 | 설명 | 버전 | ||
---|---|---|---|---|---|
{{formatnum:unformatted number}}
|
지원되지 않음: Examples of wrong input (unreliable output), with or without |
Takes an unformatted number (Arabic, no group separators and The
If you really need to format (according the wiki's locale) a number in unknown input format, you could try and use |
| ||
|
Note: In the examples above, "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.
|
| ||
{{lc:string}}
|
{{lc:DATA CENTER}} → data center
|
소문자로 입력합니다. |
| ||
{{lcfirst:string}}
|
{{lcfirst:DATA center}} → dATA center
|
맨 처음 글자를 소문자로 입력합니다. |
| ||
{{uc:string}}
|
{{uc:text transform}} → TEXT TRANSFORM
|
대문자로 입력합니다. |
| ||
{{ucfirst:string}}
|
{{ucfirst:text tRAnSFORM}} → Text tRAnSFORM
|
맨 처음 글자를 대문자로 입력합니다. |
| ||
{{padleft:xyz|stringlength}}
|
{{padleft:xyz|5}} → 00xyz
|
Inserts a string of padding characters (character chosen in third parameter; default "0") of a specified length (second parameter) next to a chosen base character or variable (first parameter). The final digits or characters in the base replace the final characters in the padding; i.e. 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. |
| ||
{{padright:xyz|stringlength}} {{padright:xyz|strlen|char}} {{padright:xyz|strlen|string}}
|
{{padright:xyz|5}} → xyz00
|
Identical to padleft but adds padding characters to the right side.
|
|
같이 보기: Extension:StringFunctions .
지역화
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 확장기능:번역 .
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.
사용법 | 입력 → 출력 | 설명 | 버전 | |
---|---|---|---|---|
{{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{{plural:-1|is|are}} → is{{plural:-2|is|are}} → are{{plural:0.5|is|are}} → are{{plural:1.5|is|are}} → are{{plural:-0.5|is|are}} → are{{plural:-1.5|is|are}} → are(러시아어로는) {{PLURAL:5|1=Категория|Категории}} → Категории
|
Outputs the singular form (second parameter) if the absolute value of 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):
|
||
{{grammar:N|noun}}
|
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. |
| ||
{{gender:username|text for every gender}}
|
(지정된 사용자의 성별에 의존합니다) | A switch for the gender set in Special:Preferences. |
| |
{{int:메시지 이름}}
|
{{int:edit}} → Edit (Depends on user language; try: fr • ja) |
Internationalizes (translates) the given interface (MediaWiki namespace) message into the user language. For |
||
{{int:editsectionhint|MediaWiki}}
|
{{int:editsectionhint|MediaWiki}} → Edit section: MediaWiki
|
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. |
Transclusion modifiers
{{Page name|optional params}}
usually transcludes another page, by default from the Template:namespace.
These magic words modify that behavior.
사용법 | 설명 | 버전 | |
---|---|---|---|
{{:xyz}}
|
A bare colon is not a template modifier but the prefix for the main namespace. Since transclusion defaults to the Template namespace, you would use for example, {{:UTC}} (vs. {{UTC}}) to include the text of the main namespace article UTC rather than Template:UTC. | ||
{{int:xyz}}
|
Same as {{MediaWiki:xyz}}, except standard message translation is applied depending on subpages and content/user/uselang language. Another difference is: this doesn't appear under "이 문서에서 사용한 틀:". Rendered as ⧼xyz⧽ if MediaWiki:xyz doesn't exist. 같이 보기 도움말:시스템 메시지 . | ||
{{msg:xyz}} {{raw:xyz}}
|
Even if there is a magic word named "xyz", use template:xyz unless the template doesn't exist (equivalent to {{template:xyz}}). Normally, magic words have priority when there is a conflict. | ||
{{raw:xyz}}
|
If $wgEnableScaryTranscluding is enabled, and this is an interwiki transclusion, include the raw wikitext instead of the html from the foreign wiki. |
| |
{{msgnw:xyz}}
|
The unexpanded wikitext is rendered (more or less, for details see 도움말:틀 ). | ||
{{subst:xyz}}
|
In the wikitext, the tag is substituted by the content (single-level evaluation only), see 도움말:틀 . | ||
{{safesubst:xyz}}
|
도움말:틀 참고. |
잡다한 것들
사용법 | Input → 출력 | 설명 | 버전 | ||
---|---|---|---|---|---|
{{#language:language code}} {{#language:language code|target language code}}
|
{{#language:ar}} → العربية {{#language:ar|en}} → 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. |
| ||
{{#special:특수 문서 이름}}
|
{{#special:userlogin}} → Special:UserLogin
|
The localized name for the given canonical Special: page. |
| ||
{{#speciale:특수 문서 이름}}
|
{{#speciale:userlogin}} → Special:UserLogin
|
The localized and URL-encoded name for the given canonical Special: page. |
| ||
{{#tag:tagname
|
Example for the Cite extension's <ref> tags:
|
Alias for XML-style MediaWiki parser tags or extension tags. It allows a pre-save transform of wiki code and 확장기능: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:
…이것처럼 다시 쓸 수 있습니다:
|
|
- ↑ Citation on Magic words/ko.