Template:Protection: Difference between revisions

From PZwiki
(shows which user group(s) can edit the page, and added break before reason)
m (added notpageimage class to sign)
 
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<includeonly>{{NoticeBox
<noinclude>
| type  = protection
{{Documentation/sandbox|doc=
| style = text-align: center; font-size: 120%;
Added to pages that have some level of protection. The level of protection is automatically displayed, if there is no protection, nothing will display, apart from the base message.
| text  = This page has been put into '''protection''' by a PZwiki [[PZwiki:Administrators|administrator]]{{#if:{{PROTECTIONLEVEL:edit|}}| so that only users in the [[PZwiki:{{PROTECTIONLEVEL:edit}}|{{PROTECTIONLEVEL:edit}}]]}} user group may edit this page. {{#if:{{{reason|}}}|<br>'''Reason given:''' {{{reason|}}} }}
 
| hidecat = {{{hidecat|}}}
The first parameter is optional and should be used to provide a reason for the protection.
</div>
 
}}</includeonly><noinclude>{{Documentation}}</noinclude>
==Usage==
===Parameters===
;<code>1</code>
:The reason for the protection.
 
==Examples==
*{{tll|Protection}}
{{Protection}}
*{{tll|Protection|This template is considered '''High Risk''' as it is used on multiple pages.}}
{{Protection|This template is considered '''High Risk''' as it is used on multiple pages.}}
 
{{Translation guide|<syntaxhighlight lang="html">
{{#switch:{{{1|}}}
| title = This page has been put into protection by a PZwiki [[PZwiki:Administrators|administrator]].
| reason = Reason
| note = Only users in the [[PZwiki:{{PROTECTIONLEVEL:edit}}|{{PROTECTIONLEVEL:edit}}]] [[Special:ListGroupRights|user group]] may edit this page.
| #default = {{Error|translation}}
}}
</syntaxhighlight>}}
 
==See also==
*{{ll|PZwiki:Mboxes}}
}}
{{ll|Category:Mbox}}
</noinclude><includeonly>{{Mbox
| color = #bbbbaa
| sign = [[File:Lock-locked.png|link=Template:Protection{{lcs}}|class=notpageimage]]
| title = {{tt|name=Protection
  | default = This page has been put into protection by a PZwiki [[PZwiki:Administrators|administrator]].
  | arg1 = title
  }}
| content = {{#if:{{{1|}}}|{{tt|name=Protection
  | default = Reason
  | arg1 = reason
  }}: {{{1}}}}}
| note = {{#if: {{PROTECTIONLEVEL:edit|}}
  | {{tt|name = Protection
    | default = Only users in the [[PZwiki:{{PROTECTIONLEVEL:edit}}|{{PROTECTIONLEVEL:edit}}]] [[Special:ListGroupRights|user group]] may edit this page.
    | arg1 = note
    }}
  }}
| id = protect
| collapsed = {{#if:{{{1|}}}||true}}
}}</includeonly>

Latest revision as of 14:15, 24 April 2024

Notebook.pngTemplate Documentation

Added to pages that have some level of protection. The level of protection is automatically displayed, if there is no protection, nothing will display, apart from the base message.

The first parameter is optional and should be used to provide a reason for the protection.

Usage

Parameters

1
The reason for the protection.

Examples

Lock-locked.png
This page has been put into protection by a PZwiki administrator.
  • {{Protection|This template is considered High Risk as it is used on multiple pages.}}
Lock-locked.png
This page has been put into protection by a PZwiki administrator.
Reason: This template is considered High Risk as it is used on multiple pages.

How to translate

This template is translatable.

Template code

Paste the following code into the <includeonly> tag of the translated template and translate the text after each = sign (except for #default =).

{{#switch:{{{1|}}}
| title = This page has been put into protection by a PZwiki [[PZwiki:Administrators|administrator]].
| reason = Reason
| note = Only users in the [[PZwiki:{{PROTECTIONLEVEL:edit}}|{{PROTECTIONLEVEL:edit}}]] [[Special:ListGroupRights|user group]] may edit this page.
| #default = {{Error|translation}}
}}

Template documentation

Copy the code wrapped in the <noinclude> tag in this template and translate the text after doc = in the {{Documentation}} template.

{{Translation guide}} template should be removed from the translated documentation.

See also

Editors can experiment in this template's sandbox.