Template:Protection: Difference between revisions

From PZwiki
(update doc)
m (update)
Line 10: Line 10:
:The reason for the protection.
:The reason for the protection.


===Examples===
==Examples==
<pre>{{Protection}}</pre>
*{{tll|Protection}}
:'''Produces:'''
{{Protection}}
{{Protection}}
:'''OR'''
*{{tll|Protection|This template is consider '''High Risk''' as it is used on multiple pages.}}
<pre>{{Protection|This template is consider '''High Risk''' as it is used on multiple pages.}}</pre>
:'''Produces:'''
{{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.}}


Line 34: Line 31:
</noinclude><includeonly>{{Mbox
</noinclude><includeonly>{{Mbox
| color = #bbbbaa
| color = #bbbbaa
| sign = [[File:Lock-locked.png|link=Template:Protection{{#ifeq:{{Language code}}|true|{{Subpage}}|}}]]
| sign = [[File:Lock-locked.png|link=Template:Protection{{lcs}}]]
| title = {{tt
| title = {{tt|name = Protection
  | name = Protection
   | default = This page has been put into protection by a PZwiki [[PZwiki:Administrators|administrator]].
   | default = This page has been put into protection by a PZwiki [[PZwiki:Administrators|administrator]].
   | arg1 = title
   | arg1 = title
   }}
   }}
| content = {{tt
| content = {{tt|name = Protection
  | name = Protection
   | default = Reason
   | default = Reason
   | arg1 = reason
   | arg1 = reason
   }}: {{#if:{{{1|}}}|{{{1}}}|...}}
   }}: {{#if:{{{1|}}}|{{{1}}}|...}}
| note = {{#if: {{PROTECTIONLEVEL:edit|}}
| note = {{#if: {{PROTECTIONLEVEL:edit|}}
   | {{tt
   | {{tt|name = Protection
    | name = Protection
     | default = Only users in the [[PZwiki:{{PROTECTIONLEVEL:edit}}|{{PROTECTIONLEVEL:edit}}]] [[Special:ListGroupRights|user group]] may edit this page.
     | default = Only users in the [[PZwiki:{{PROTECTIONLEVEL:edit}}|{{PROTECTIONLEVEL:edit}}]] [[Special:ListGroupRights|user group]] may edit this page.
     | arg1 = note
     | arg1 = note

Revision as of 19:03, 30 December 2023

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.
Reason: ...
  • {{Protection|This template is consider 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 = [[Category:Incorrect template usage]]
}}

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.