Template:Protected/doc: Difference between revisions
More actions
| Line 5: | Line 5: | ||
|1aliases = <!-- List of aliases, separated by / (a slash) --> | |1aliases = <!-- List of aliases, separated by / (a slash) --> | ||
|1type = line | |1type = line | ||
|1def = {{ | |1def = {{tlg|mono=1|nowrapname=1|nolink=1|[[Template:protected/text|protected/text]]/{{magic word|int|[[MediaWiki:lang|lang]]}}<wbr/>|{{nowrap|default-reason}}}} | ||
|1stat = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample --> | |1stat = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample --> | ||
| Line 21: | Line 21: | ||
|3d-td = | |3d-td = | ||
|3type = line | |3type = line | ||
|3def = {{ | |3def = {{tlg|mono=1|nowrapname=1|nolink=1|[[Template:protected/text|protected/text]]/{{magic word|int|[[MediaWiki:lang|lang]]}}<wbr/>|text2}} (except talk and user pages) | ||
|3stat = optional- | |3stat = optional- | ||
| Line 57: | Line 57: | ||
== Examples == | == Examples == | ||
:''The message box does not appear on semi-protected pages or upload-only protected files. An icon still appears in the top-right corner.'' | :''The message box does not appear on semi-protected pages or upload-only protected files. An icon still appears in the top-right corner.'' | ||
{{tld|protected{{\sandbox}}}} → {{protected{{\sandbox}}|demo-edit=sysop|icon=no}} | |||
{{tld|protected{{\sandbox}}|I said so}} → {{protected{{\sandbox}}|I said so|demo-edit=sysop|icon=no}} | |||
{{tld|protected{{\sandbox}}|note=And you can change this too.}} → {{protected{{\sandbox}}|note=And you can change this too.|demo-edit=sysop|icon=no}}<includeonly> | |||
[[Category:Protection templates]] | [[Category:Protection templates]] | ||
</includeonly> | </includeonly> | ||
Revision as of 13:22, 21 August 2021
General protection template to inform users a page is protected. (Note: This does not protect pages. Only admins can do that.)
The template automatically sets the following categories: files to Category:Protected files and everything else except user pages, user talk pages, and templates to Category:Protected pages. If the page is not protected, it will end up in Category:Unprotected pages using protection templates.
Usage
{{protected |1= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | reason | — | {{protected/text/{{int:lang}} | optional |
icon | hide icon | If this parameter has any value, the padlock icon doesn’t appear in the top-right corner. | empty | optional |
note | note | It’s default value doesn’t show up on talk pages or user pages (if you specify the parameter, it does so). | {{protected/text/{{int:lang}} | optional |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: Administrators
See also
- {{Mprotected}} - for images included on the Main Page, which are protected because of the cascading protection (but are not protected directly).
- {{Permprot}} - for high-risk templates that are indefinitely protected (use on talk page).
- {{MWheader}} - for MediaWiki pages (use on talk page).
Padlocks
Localization
العربية ∙ беларуская (тарашкевіца) ∙ বাংলা ∙ dansk ∙ Deutsch ∙ English ∙ español ∙ فارسی ∙ français ∙ galego ∙ עברית ∙ हिन्दी ∙ hrvatski ∙ magyar ∙ italiano ∙ 日本語 ∙ 한국어 ∙ македонски ∙ മലയാളം ∙ मराठी ∙ မြန်မာဘာသာ ∙ Nederlands ∙ polski ∙ português ∙ português do Brasil ∙ русский ∙ slovenščina ∙ српски / srpski ∙ svenska ∙ ไทย ∙ Türkçe ∙ українська ∙ 中文
This template makes use of {{Autotranslate}} and the translate extension.
Only the text is switched out based on the user's interface, not the whole template (like with {{Autotranslate}}) to avoid unnecessary complexity. Keep in mind this is still a work in progress and new text fields may be added in the future.
Examples
- The message box does not appear on semi-protected pages or upload-only protected files. An icon still appears in the top-right corner.
{{protected}} →
| This template has been protected from editing to prevent vandalism. Please discuss changes on the talk page or request unprotection. |
{{protected|I said so}} →
| This template has been protected because I said so. Please discuss changes on the talk page or request unprotection. |
{{protected}} →
| This template has been protected from editing to prevent vandalism. And you can change this too. |