Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Protected/doc: Difference between revisions

Template page
m Localisation: categorize template
Changed to use main template instead
 
(32 intermediate revisions by 14 users not shown)
Line 1: Line 1:
__NOTOC__
<includeonly>{{Sandbox other||
=== Usage ===
{{#if:{{PROTECTIONLEVEL:edit}}{{CASCADINGSOURCES}}|{{protected}}}}
General protection template to inform users a page is protected. (Note: This does not protect pages. Only admins can do that.)
}}</includeonly><!--
*Adds 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]].
--><!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --><!--
Syntax: <nowiki>{{</nowiki>protected|''give reason here''}}.
-->{{TemplateBox
*If no reason is given the default is "to prevent vandalism".
|1        = 1
*The second line doesn't show up on talk pages or user pages (unless the <code>note</code> parameter is used).
|1d-en    = —<!-- English description of the first parameter the template takes -->
|1label  = reason
|1aliases = <!-- List of aliases, separated by / (a slash) -->
|1type    = line
|1def    = {{ {{tSwitch|protected/text}}|default-reason}}
|1stat    = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample -->


=== Examples ===
|2        = icon
:''The message box does not appear on semi-protected pages or upload-only protected files. An icon still appears in the top-right corner.''
|2label  = hide icon
<nowiki>{{</nowiki>protected}} → {{protected|demo-edit=sysop|icon=no}}
|2d-en    = If this parameter has any value, the padlock icon doesn’t appear in the top-right corner.
 
|2d-td    =  
<nowiki>{{</nowiki>protected|I said so}} → {{protected|I said so|demo-edit=sysop|icon=no}}
|2type    = unknown
 
|2def    =  
<nowiki>{{</nowiki>protected|note=And you can change this too.}} → {{protected|note=And you can change this too.|demo-edit=sysop|icon=no}}
|2stat    = optional-


=== Padlocks ===
|3        = note
* [[File:Padlock.svg|20px]] = full protection from editing.
|3label  = note
* [[File:Padlock-silver.svg|20px]] = semi protection from editing or uploading.
|3d      = Its default value doesn’t show up on talk pages or user pages (if you specify the parameter, it does so).
* [[File:Padlock-green.svg|20px]] = full protection from uploading (but not editing).
|3d-td    =
|3type    = line
|3def    = {{ {{tSwitch|protected/text}}|text2}} (except talk and user pages)
|3stat    = optional-


=== See also ===
|name              = protected
|desc              = General protection template to inform users a page is protected. This template does not protect a page; only administrators can protect pages.
|namespace          = all
|usergroup          = admin
| placement = top
| relieson =
{{ifsandbox|
* {{tld|Protection banner/core}}
}}
|usage-notes        =
|type              =
|example            =
|example-value      =
|i18n-method        = ext.translate
|i18n-desc          = Only the text is switched out based on the user's interface, not the whole template (like with {{tl|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.
{{ifsandbox|
Additionally, this template stores translation strings in [[Data:I18n/Protection banner.tab]].
}}
|i18n-mediawiki-msg =
|i18n-subpage      = text
|seealso            =  
*{{tl|Mprotected}} - for images included on the [[Main Page]], which are protected because of the cascading protection (but are not protected directly).
*{{tl|Mprotected}} - for images included on the [[Main Page]], which are protected because of the cascading protection (but are not protected directly).
*{{tl|permprot}} - for high-risk templates that are indefinitely protected (use on talk page).
*{{tl|permprot}} - for high-risk templates that are indefinitely protected (use on talk page).
*{{tl|MWheader}} - for MediaWiki pages (use on talk page).
*{{tl|MWheader}} - for MediaWiki pages (use on talk page).


== Localisation ==
=== Padlocks ===
Only the text is switched out based on the user's interface, not the whole template (like with {{tl|autotranslate}}) to avoid unnecessary complexity. Please translate the following and add it to a subpage of Template:Protected/text, e.g. [[Template:Protected/text/en]].
* [[File:Cascade-protection-shackle-double-chain-link.svg|20px]] = cascading full protection from editing.
* [[File:Full-protection-shackle-block.svg|20px]] = full protection from editing.
* [[File:Template-protection-shackle-brackets 2.svg|20px]] = template protection from editing.
* [[File:Extended-protection-shackle-account-pro-plus.svg|20px]] = autopatroller protection from editing or uploading.
* [[File:Semi-protection-shackle.svg|20px]] = semi-protection from editing or uploading.
* [[File:Upload-protection-shackle.svg|20px]] = full protection from uploading (but not editing).
* [[File:Move-protection-shackle.svg|20px]] = full protection from moving (but not editing).
|setscats          = 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]].
| print = line
}}


{{pre2|scroll|<nowiki>
== Examples ==
{{#switch:{{{1}}}
:''The message box does not appear on semi-protected pages or upload-only protected files. An icon still appears in the top-right corner.''
|text1=This {{namespace}} has been protected
{{ifsandbox|1=
|default-reason=from editing to prevent vandalism.
=== {{ll/s|COM:CASCADE|Cascade Protected}} ===
|reason=because {{{reason}}}.
{{unordered list
|text2=Please discuss changes on the [[{{TALKPAGENAME}}|talk page]] or [[COM:AN/P|request unprotection]].
| {{tld|protected{{\sandbox}}}} → {{protected/sandbox|demo-edit=cascade-sysop|icon=no}}
|img-text1=This page is protected against editing.
| {{tld|protected{{\sandbox}}|I said so}} → {{protected/sandbox|I said so|demo-edit=cascade-sysop|icon=no}}
|img-text2=This page is semi-protected against editing.
| {{tld|protected{{\sandbox}}|note{{=}}And you can change this too.}} → {{protected/sandbox|note=And you can change this too.|demo-edit=cascade-sysop|icon=no}}
|img-text3=This page is protected against reuploading.
}}
|img-text4=This page is semi-protected against reuploading.
=== {{ll/s|COM:FULL|Fully Protected}} ===
|error-text=Error: This page is not currently protected. Please remove the protection template.
{{unordered list
}}&lt;noinclude>
| {{tld|protected{{\sandbox}}}} → {{protected{{\sandbox}}|demo-edit=sysop|icon=no}}
{{translated tag|localisation}}
| {{tld|protected{{\sandbox}}|I said so}} → {{protected{{\sandbox}}|I said so|demo-edit=sysop|icon=no}}
&lt;/noinclude>
| {{tld|protected{{\sandbox}}|note{{=}}And you can change this too.}} → {{protected{{\sandbox}}|note=And you can change this too.|demo-edit=sysop|icon=no}}
</nowiki>}}
}}
 
=== {{ll/s|COM:TP|Template Protected}} ===
There is no /lang page or /layout page to deal with. Keep in mind this is still a work in progress and new text fields may be added in the future.
{{unordered list
<includeonly>
| {{tld|protected{{\sandbox}}|box{{=}}1}} → {{protected/sandbox|box=1|demo-edit=templateeditor|icon=no}}
[[Category:Protection templates|{{PAGENAME}}]]
| {{tld|protected{{\sandbox}}|box{{=}}1|I said so}} → {{protected/sandbox|box=1|I said so|demo-edit=templateeditor|icon=no}}
</includeonly><noinclude>
| {{tld|protected{{\sandbox}}|box{{=}}1|note{{=}}And you can change this too.}} → {{protected/sandbox|box=1|note=And you can change this too.|demo-edit=templateeditor|icon=no}}
 
}}
[[Category:Template documentation]]
=== {{ll/s|COM:TP|Semi-protected}} ===
</noinclude>
{{unordered list
| {{tld|protected{{\sandbox}}|box{{=}}1}} → {{protected/sandbox|box=1|demo-edit=autoconfirmed|icon=no}}
| {{tld|protected{{\sandbox}}|box{{=}}1|I said so}} → {{protected/sandbox|box=1|I said so|demo-edit=autoconfirmed|icon=no}}
| {{tld|protected{{\sandbox}}|box{{=}}1|note{{=}}And you can change this too.}} → {{protected/sandbox|box=1|note=And you can change this too.|demo-edit=autoconfirmed|icon=no}}
}}
|2=
=== {{ll/s|COM:FULL|Fully Protected}} ===
{{unordered list
| {{tld|protected}} → {{protected|demo-edit=sysop|icon=no}}
| {{tld|protected|I said so}} → {{protected|I said so|demo-edit=sysop|icon=no}}
| {{tld|protected|note{{=}}And you can change this too.}} → {{protected|note=And you can change this too.|demo-edit=sysop|icon=no}}
}}
}}<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Protection templates]]
}}</includeonly>

Latest revision as of 23:10, 10 November 2025

General protection template to inform users a page is protected. This template does not protect a page; only administrators can protect pages.

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

ParameterDescriptionDefaultStatus
1reasonfrom editing to prevent vandalism.optional
iconhide iconIf this parameter has any value, the padlock icon doesn’t appear in the top-right corner.emptyoptional
notenoteIts default value doesn’t show up on talk pages or user pages (if you specify the parameter, it does so).Please discuss changes on the talk page or request unprotection. (except talk and user pages)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

Placement: At the top of the page

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

  • = cascading full protection from editing.
  • = full protection from editing.
  • = template protection from editing.
  • = autopatroller protection from editing or uploading.
  • = semi-protection from editing or uploading.
  • = full protection from uploading (but not editing).
  • = full protection from moving (but not editing).

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}}
    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}}
    Protected This template has been protected because I said so.
    Please discuss changes on the talk page or request unprotection.
  • {{protected|note=And you can change this too.}}
    Protected This template has been protected from editing to prevent vandalism.
    And you can change this too.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.