Template:Protection

From FasciPedia
Jump to navigation Jump to search

[edit] [purge] Documentation

Usage:
{{Protection}}

If a user wishes to put a "userlock" banner at the top, they can by including "User" as an argument:

{{Protection|User}}

You can also force an output banner if you wish; for instance a page may be always intended to have a certain level of protection and you wish to reflect that so others will know to restore that level of protection. A small message will appear below the banner informing that this banner is forced, and will also indicate if the current page protection does not match:

{{Protection|Force=Full}}


Output:
If the page is unprotected, it will print out the following banner:

{{#vardefine:PageProtection|Nolock}}{{#vardefine:Userlock|No}}{{#vardefine:Force|Yes}}{{#vardefine:Protection|None}}{{#vardefine:Protection|{{#var:Protection}}}}{{#vardefine:Equal|No}}{{#vardefine:Lock|{{#var:Protection}}}}{{#vardefine:LockType|N}}{{#vardefine:LockImage|Key{{#var:locktype}}.png}}{{#vardefine:LogoImage|Wiki-wordmark.png}}{{#vardefine:LockWidth|80px}}{{#vardefine:LogoWidth|120px}}{{#vardefine:LockText|Text{{#var:LockType}}.png}}{{#vardefine:LockTextWidth|360px}}{{#vardefine:LockColor|rgba(192,207,192,1)}}
[[File:{{#var:LogoImage}}|left|{{#var:LogoWidth}}|link=]][[File:{{#var:LockText}}|center|{{#var:LockTextWidth}}|link=]][[File:{{#var:LockImage}}|right|{{#var:LockWidth}}|link=]]

A page locked to registered users will print out the following banner:

{{#vardefine:PageProtection|Nolock}}{{#vardefine:Userlock|No}}{{#vardefine:Force|Yes}}{{#vardefine:Protection|Half}}{{#vardefine:Protection|{{#var:Protection}}}}{{#vardefine:Equal|No}}{{#vardefine:Lock|{{#var:Protection}}}}{{#vardefine:LockType|N}}{{#vardefine:LockImage|Key{{#var:locktype}}.png}}{{#vardefine:LogoImage|Wiki-wordmark.png}}{{#vardefine:LockWidth|80px}}{{#vardefine:LogoWidth|120px}}{{#vardefine:LockText|Text{{#var:LockType}}.png}}{{#vardefine:LockTextWidth|360px}}{{#vardefine:LockColor|rgba(192,207,192,1)}}
[[File:{{#var:LogoImage}}|left|{{#var:LogoWidth}}|link=]][[File:{{#var:LockText}}|center|{{#var:LockTextWidth}}|link=]][[File:{{#var:LockImage}}|right|{{#var:LockWidth}}|link=]]

A page locked to administrators will print out the following banner:

{{#vardefine:PageProtection|Nolock}}{{#vardefine:Userlock|No}}{{#vardefine:Force|Yes}}{{#vardefine:Protection|Full}}{{#vardefine:Protection|{{#var:Protection}}}}{{#vardefine:Equal|No}}{{#vardefine:Lock|{{#var:Protection}}}}{{#vardefine:LockType|N}}{{#vardefine:LockImage|Key{{#var:locktype}}.png}}{{#vardefine:LogoImage|Wiki-wordmark.png}}{{#vardefine:LockWidth|80px}}{{#vardefine:LogoWidth|120px}}{{#vardefine:LockText|Text{{#var:LockType}}.png}}{{#vardefine:LockTextWidth|360px}}{{#vardefine:LockColor|rgba(192,207,192,1)}}
[[File:{{#var:LogoImage}}|left|{{#var:LogoWidth}}|link=]][[File:{{#var:LockText}}|center|{{#var:LockTextWidth}}|link=]][[File:{{#var:LockImage}}|right|{{#var:LockWidth}}|link=]]

If "|User" is specified or the page in which this template is used is in the User: or User_Blog: namespace, the following banner will replace the above banner (except in the case of a fully locked page):

{{#vardefine:PageProtection|Nolock}}{{#vardefine:Userlock|Yes}}{{#vardefine:Force|Yes}}{{#vardefine:Protection|None}}{{#vardefine:Protection|{{#var:Protection}}}}{{#vardefine:Equal|No}}{{#vardefine:Lock|{{#var:Protection}}}}{{#vardefine:LockType|N}}{{#vardefine:LockImage|Key{{#var:locktype}}.png}}{{#vardefine:LogoImage|Wiki-wordmark.png}}{{#vardefine:LockWidth|80px}}{{#vardefine:LogoWidth|120px}}{{#vardefine:LockText|Text{{#var:LockType}}.png}}{{#vardefine:LockTextWidth|360px}}{{#vardefine:LockColor|rgba(192,207,192,1)}}
[[File:{{#var:LogoImage}}|left|{{#var:LogoWidth}}|link=]][[File:{{#var:LockText}}|center|{{#var:LockTextWidth}}|link=]][[File:{{#var:LockImage}}|right|{{#var:LockWidth}}|link=]]
Dependencies
You are required to ask Wikia Staff to enable the variable extension by using the Special:Contact.
See also