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: Difference between revisions

Template page
fix examples
Replace link=COM:P with link=commons:COM:P (COM prefix not configured)
 
(44 intermediate revisions by 17 users not shown)
Line 1: Line 1:
{{#ifexpr:{{#if:{{{demo|<noinclude>sysop</noinclude>}}}|1|0}}or{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop|1|0}}=1|<!-- if demo or page is fully protected then
{{#switch:{{{demo-edit|{{PROTECTIONLEVEL:edit}}}}}
--><div style="position:absolute; z-index:100; right:10px; top:10px">[[File:Padlock.svg|20px|link=Commons:Page protection|This page is protected against editing.]]</div>
<table class="protected" style="background:#fff; border:1px solid #aaa; padding:.2em; margin:.5em auto;">
<tr>
<td style="padding-right:4px; padding-left:4px;">[[File:Padlock.svg|40px|link=Commons:Page protection]]</td>
<td>'''This {{namespace}} has been protected {{#if:{{{1|}}} | because {{{1}}} | from editing to prevent vandalism}}.'''<br /><span style="font-size:90%;">{{{note|{{#ifeq:{{NAMESPACE}} | {{TALKSPACE}} || {{#ifeq:{{NAMESPACE}} | {{ns:user}} || Please discuss changes on the [[{{TALKPAGENAME}}|talk page]] or [[Commons:Administrators' noticeboard/Blocks & protections|request unprotection]].}} }}}}}</span></td>
</tr>
</table><includeonly>{{#if:{{{demo|}}}||{{{category|{{#switch:{{NAMESPACE}}|{{ns:file}}=[[Category:Protected images]]|{{ns:user}}|{{ns:user_talk}}=|[[Category:Protected pages]]}}}}}}}</includeonly>|<!-- else check if semi
-->{{#ifeq:{{PROTECTIONLEVEL:edit}}|autoconfirmed|
<div style="position:absolute; z-index:100; right:10px; top:10px">[[File:Padlock-silver-medium.svg|20px|link=Commons:Page protection|This page is semi-protected against editing.]]</div>|<!-- else
--><div class="error">Error: This page is not currently protected. Please remove the protection template. {{{category|[[Category:Unprotected pages using protection templates]]}}}</div>}}}}<noinclude>


| sysop=
  {{#ifeq:{{{icon}}}|no||<indicator name="protected">[[File:Full-protection-shackle-block.svg|20px|link=Special:MyLanguage/Commons:Protection policy|{{{{tSwitch|protected/text}}|img-text1}}]]</indicator>}}
  <table class="protected" style="direction: {{#dir:{{int:Lang}}}}; background:var(--background-color-base,#fff); border:1px solid var(--border-color-base, #aaa); color: inherit; padding:.2em; margin:.5em auto;">
  <tr>
  <td style="padding-right:4px; padding-left:4px;">[[File:Full-protection-shackle-block.svg|40px|link=commons:COM:P|Protected]]</td>
  <td>'''{{{{tSwitch|protected/text}}|text1}} {{#if:{{{1|}}}|{{{{tSwitch|protected/text}}|reason|reason={{{1}}}}}|{{{{tSwitch|protected/text}}|default-reason}}}}'''<br /><span style="font-size:90%;">{{{note|{{{{tSwitch|protected/text}}|text2}} }}}</span></td>
  </tr>
  </table>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|{{#switch:{{NAMESPACE}}|{{ns:6}}=[[Category:Protected files]]|{{ns:2}}|{{ns:3}}|{{ns:10}}=|[[Category:Protected pages]]}} }}} }}


----
| templateeditor=
===Usage===
<indicator name="protected">[[File:Template-protection-shackle-brackets 2.svg|20px|link=Special:MyLanguage/Commons:Protection policy|{{{{tSwitch|protected/text}}|img-text1}}]]</indicator>
General protection template to inform users a page is protected. (Note: This does not protect pages. Admins can only do that.)
* Adds images to [[:Category:Protected images]] and everything else to [[:Category:Protected pages]] (except user pages and user talk pages).


Syntax: <nowiki>{{</nowiki>protected|''give reason here''}}.
| editautopatrolprotected =
* If no reason is given the default is "to prevent vandalism."
  <indicator name="protected">[[File:Extended-protection-shackle-account-pro-plus.svg|20px|link=Special:MyLanguage/Commons:Protection policy|{{{{tSwitch|protected/text}}|img-text1}}]]</indicator>
* The second line doesn't show up on talk pages or user pages (unless the <code>note</code> parameter is used).


===Examples===
| autoconfirmed=
<nowiki>{{</nowiki>protected}} → {{protected|demo=sysop}}
  <indicator name="protected">[[File:Semi-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy|{{{{tSwitch|protected/text}}|img-text2}}]]</indicator>


<nowiki>{{</nowiki>protected|I said so}} {{protected|I said so|demo=sysop}}
| #default=
  {{#ifeq:{{NAMESPACE}}|{{{demo-ns|{{ns:6}}}}}
  | {{#switch:{{{demo-upload|{{PROTECTIONLEVEL:upload}}}}}


<nowiki>{{</nowiki>protected|note=And you can change this too.}} {{protected|note=And you can change this too.|demo=sysop}}
    | sysop=
      <indicator name="protected">[[File:Upload-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy|{{{{tSwitch|protected/text}}|img-text3}}]]</indicator>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Upload protected files]]}}} }}


===See also===
    | autoconfirmed=
* {{tl|protected image}} - for high-risk images that are indefinitely protected.
      <indicator name="protected">[[File:Semi-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy|{{{{tSwitch|protected/text}}|img-text4}}]]</indicator>
* {{tl|en main page}} - for images on the English Wikipedia's main page.
* {{tl|permprot}} - for high-risk templates that are indefinitely protected (use on talk page).


[[Category:Protection templates|{{PAGENAME}}]]
    | #default={{ifsandbox|1=|2=
      <div class="error">{{{{tSwitch|protected/text}}|error-text}}</div>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Unprotected pages using protection templates]]}}} }}}}
    }}
  |{{ifsandbox|1=|2=<div class="error">{{{{tSwitch|protected/text}}|error-text}}</div>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Unprotected pages using protection templates]]}}} }}}}
  }}
}}<noinclude>
{{documentation}}
</noinclude>
</noinclude>

Latest revision as of 04:19, 12 August 2026

Error: This page is not currently protected. Please request protection or remove the protection template.
Template documentation[ view · edit · history · purge ]
This documentation is transcluded from Template:Protected/doc.

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.