Template:Pp-meta: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{#ifeq:{{#switch:{{lc:{{{type}}}}} | {{#ifeq:{{#switch:{{lc:{{{type}}}}} | ||
|move= | |move={{#ifeq: | ||
{{#switch:{{lc:{{{demolevel|undefined}}}}} | {{#switch:{{lc:{{{demolevel|undefined}}}}} | ||
|semi | |semi | ||
Line 10: | Line 9: | ||
|sysop=sysop | |sysop=sysop | ||
|undefined={{PROTECTIONLEVEL:move}} | |undefined={{PROTECTIONLEVEL:move}} | ||
|#default= | |#default=}} | ||
|sysop|yes|no | |sysop|yes|no | ||
}} | }} | ||
|create= | |create={{#if: | ||
{{#switch:{{lc:{{{demolevel|undefined}}}}} | {{#switch:{{lc:{{{demolevel|undefined}}}}} | ||
|semi | |semi | ||
Line 23: | Line 20: | ||
|sysop=sysop | |sysop=sysop | ||
|undefined={{PROTECTIONLEVEL:create}} | |undefined={{PROTECTIONLEVEL:create}} | ||
|#default= | |#default=}} | ||
|yes|no | |yes|no | ||
}} | }} | ||
|#default | |#default={{#if: | ||
{{#switch:{{lc:{{{demolevel|undefined}}}}} | {{#switch:{{lc:{{{demolevel|undefined}}}}} | ||
|semi | |semi | ||
Line 36: | Line 31: | ||
|sysop=sysop | |sysop=sysop | ||
|undefined={{PROTECTIONLEVEL:edit}} | |undefined={{PROTECTIONLEVEL:edit}} | ||
|#default= | |#default=}} | ||
|{{#ifeq:{{#switch:{{lc:{{{disallowlevel|}}}}} | |{{#ifeq:{{#switch:{{lc:{{{disallowlevel|}}}}} | ||
|semi | |semi | ||
Line 44: | Line 38: | ||
|full | |full | ||
|sysop=sysop | |sysop=sysop | ||
|#default= | |#default=}} | ||
|{{#switch:{{lc:{{{demolevel|undefined}}}}} | |{{#switch:{{lc:{{{demolevel|undefined}}}}} | ||
|semi | |semi | ||
Line 52: | Line 46: | ||
|sysop=sysop | |sysop=sysop | ||
|undefined={{PROTECTIONLEVEL:edit}} | |undefined={{PROTECTIONLEVEL:edit}} | ||
|#default= | |#default=}} | ||
|no|yes | |no|yes | ||
}} | }} | ||
Line 71: | Line 64: | ||
|indef=permanently<nowiki> </nowiki> | |indef=permanently<nowiki> </nowiki> | ||
|create=creation- | |create=creation- | ||
|office= | |office= | ||
|full | |full | ||
|#default= | |#default=}}protected{{#ifeq:{{lc:{{{type}}}}}|indef||{{#if:{{{expiry|}}}|<nowiki> </nowiki>until {{#time:F j, Y|{{{expiry}}}}}}}}}{{#if:{{{icon-reason|}}}|<nowiki> </nowiki>{{{icon-reason}}}}}.}}}]]</div> | ||
}}protected{{#ifeq:{{lc:{{{type}}}}}|indef||{{#if:{{{expiry|}}}|<nowiki> </nowiki>until {{#time:F j, Y|{{{expiry}}}}}}}}}{{#if:{{{icon-reason|}}}|<nowiki> </nowiki>{{{icon-reason}}}}}.}}}]]</div> | |{{mbox | ||
| | |||
{{mbox | |||
| demospace = {{{demospace|}}} | | demospace = {{{demospace|}}} | ||
| type = protection | | type = protection | ||
Line 92: | Line 83: | ||
|indef=permanently<nowiki> </nowiki> | |indef=permanently<nowiki> </nowiki> | ||
|create=creation- | |create=creation- | ||
|office= | |office= | ||
|full | |full | ||
|#default= | |#default=}}protected.}}}]] | ||
}}protected.}}}]] | |||
| text = '''{{{reason-text|{{#switch:{{lc:{{{type}}}}} | | text = '''{{{reason-text|{{#switch:{{lc:{{{type}}}}} | ||
|full=This page is currently protected from editing | |full=This page is currently protected from editing | ||
Line 103: | Line 93: | ||
|office=This {{pagetype|subjectspace=yes}} is currently protected from editing | |office=This {{pagetype|subjectspace=yes}} is currently protected from editing | ||
|create=Recreation of this {{pagetype|subjectspace=yes}} has been disabled | |create=Recreation of this {{pagetype|subjectspace=yes}} has been disabled | ||
}}{{#ifeq:{{lc:{{{type}}}}}|indef||{{#if:{{{expiry|}}}| until {{#time: | }}{{#ifeq:{{lc:{{{type}}}}}|indef||{{#if:{{{expiry|}}}| until {{#time:F j, Y|{{{expiry}}}}}}}}}{{{reason<includeonly>|</includeonly>}}}.}}}'''<br /> {{{explanation-text|{{#ifeq:{{lc:{{{dispute}}}}}|yes|This protection is '''not''' an endorsement of the {{#ifeq:{{{type}}}|move|[{{fullurl:Special:Log|type=move&page={{FULLPAGENAMEE}}}} current title]|[{{fullurl:{{FULLPAGENAMEE}}|action=history}} current version]}}.}} See the protection policy and [{{fullurl:Special:Log|type=protect&page={{FULLPAGENAMEE}}}} protection log] for more details. {{#switch:{{lc:{{{type}}}}} | ||
|full|indef=Please discuss any changes on the [[{{TALKPAGENAME}}|talk page]]; you may use the {{tlx|editprotected}} template to ask an administrator to make the edit if it is supported by consensus. {{#ifeq:{{NAMESPACE}}|{{ns:8}} | |full|indef=Please discuss any changes on the [[{{TALKPAGENAME}}|talk page]]; you may use the {{tlx|editprotected}} template to ask an administrator to make the edit if it is supported by consensus. {{#ifeq:{{NAMESPACE}}|{{ns:8}}||You may also request that this page be unprotected.}} | ||
|semi=If you cannot edit this {{pagetype|subjectspace=yes}} and you wish to make a change, you can {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}||request an edit, discuss changes on the talk page,}} request unprotection, log in, or <span class="plainlinks">[http://en.wikipedia.org/w/index.php?title=Special:Userlogin&type=signup <span style="color:#002bb8;" title="Sign in / create account">create an account</span>]. | |semi=If you cannot edit this {{pagetype|subjectspace=yes}} and you wish to make a change, you can {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}||request an edit, discuss changes on the talk page,}} request unprotection, log in, or <span class="plainlinks">[http://en.wikipedia.org/w/index.php?title=Special:Userlogin&type=signup <span style="color:#002bb8;" title="Sign in / create account">create an account</span>]. | ||
|move=The page may still be edited but cannot be moved until unprotected. Please discuss any suggested moves on the [[{{TALKPAGENAME}}|talk page]] or at requested moves. You can also request that the page be unprotected. | |move=The page may still be edited but cannot be moved until unprotected. Please discuss any suggested moves on the [[{{TALKPAGENAME}}|talk page]] or at requested moves. You can also request that the page be unprotected. | ||
Line 111: | Line 101: | ||
}}}}} | }}}}} | ||
}} | }} | ||
}}|[[Category:Protected templates]]}} | }}|[[Category:Protected templates]]}}<includeonly>{{#ifeq:{{lc:{{{categories|no}}}}}|no||{{{categories|}}}}}</includeonly><noinclude> | ||
{{documentation}} | {{documentation}} | ||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
</noinclude> | </noinclude> |
Revision as of 14:21, 21 July 2024
Usage
The `` template is used to display a message indicating the protection status of a page. This template helps communicate the type of protection applied to the page, such as edit protection, move protection, or creation protection.
Parameters
- `type`: Specifies the type of protection. Common values are `full`, `semi`, `move`, `create`, `indef`, and `office`.
- `demolevel` (optional): Overrides the actual protection level for demonstration purposes.
- `disallowlevel` (optional): Specifies a level to disallow actions even if the user meets the `demolevel`.
- `expiry` (optional): The expiry date of the protection, if applicable.
- `small` (optional): If set to `yes`, a smaller icon and message will be displayed.
- `image` (optional): Overrides the default protection icon.
- `icon-link` (optional): Specifies a custom link for the protection icon.
- `icon-text` (optional): Custom text for the protection icon tooltip.
- `reason-text` (optional): Custom text explaining the reason for the protection.
- `explanation-text` (optional): Additional explanation text.
- `categories` (optional): Categories for the page. Set to `no` to disable automatic categories.
- `demospace` (optional): For testing in different namespaces.
Examples
Basic Usage
To indicate that a page is fully protected, use:
{{pp-meta|type=full}}
Semi-Protection with Expiry
To indicate that a page is semi-protected until a specific date, use:
{{pp-meta|type=semi|expiry=July 31, 2024}}
Move Protection
To indicate that a page is protected from moving, use:
{{pp-meta|type=move}}
Custom Icon and Text
To use a custom icon and text, use:
{{pp-meta|type=full|image=CustomIcon.svg|icon-text=Custom protection message}}
See Also
Documentation
Template loop detected: Template:Documentation