Template:Pp-meta: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#ifeq:{{#switch:{{lc:{{{type}}}}} | {{#ifeq:{{#switch:{{lc:{{{type}}}}} | ||
|move={{#ifeq: | |move={{#ifeq:{{#switch:{{lc:{{{demolevel|undefined}}}}} | ||
|semi|autoconfirmed=autoconfirmed|administrator|full|sysop=sysop|undefined={{PROTECTIONLEVEL:move}}|#default=}} | |||
|semi | |sysop|yes|no}} | ||
|create={{#if:{{#switch:{{lc:{{{demolevel|undefined}}}}} | |||
|semi|autoconfirmed=autoconfirmed|administrator|full|sysop=sysop|undefined={{PROTECTIONLEVEL:create}}|#default=}} | |||
|yes|no}} | |||
|#default={{#if:{{#switch:{{lc:{{{demolevel|undefined}}}}} | |||
|semi|autoconfirmed=autoconfirmed|administrator|full|sysop=sysop|undefined={{PROTECTIONLEVEL:edit}}|#default=}} | |||
|sysop|yes|no | |||
|create={{#if: | |||
|semi | |||
|yes|no | |||
|#default={{#if: | |||
|semi | |||
|{{#ifeq:{{#switch:{{lc:{{{disallowlevel|}}}}} | |{{#ifeq:{{#switch:{{lc:{{{disallowlevel|}}}}} | ||
|semi | |semi|autoconfirmed=autoconfirmed|administrator|full|sysop=sysop|#default=}} | ||
|{{#switch:{{lc:{{{demolevel|undefined}}}}} | |{{#switch:{{lc:{{{demolevel|undefined}}}}} | ||
|semi | |semi|autoconfirmed=autoconfirmed|administrator|full|sysop=sysop|undefined={{PROTECTIONLEVEL:edit}}|#default=}} | ||
|no|yes}}|no}}}}|yes|{{#ifeq:{{lc:{{{small|}}}}}|yes| | |||
<div class="metadata topicon" id="protected-icon" style="display:none; right:55px;"> | |||
[[Image:{{{image|{{#switch:{{lc:{{{type}}}}} | |||
|no|yes | |||
}}|yes|{{#ifeq:{{lc:{{{small|}}}}}|yes| | |||
<div class="metadata topicon" id="protected-icon" style="display:none; right:55px;">[[Image:{{{image|{{#switch:{{lc:{{{type}}}}} | |||
|full=Padlock.svg | |full=Padlock.svg | ||
|semi=Padlock-silver-medium.svg | |semi=Padlock-silver-medium.svg | ||
Line 58: | Line 22: | ||
|office=Padlock-black.svg | |office=Padlock-black.svg | ||
|create=Padlock-skyblue.svg | |create=Padlock-skyblue.svg | ||
|#default=Transparent.gif | |#default=Transparent.gif}}}}}|20px|link={{{icon-link|Protection policy#{{lc:{{{type}}}}}}}}|{{{icon-text|This {{pagetype|subjectspace=yes}} is {{#switch:{{lc:{{{type}}}}} | ||
}}}}}|20px|link={{{icon-link|Protection policy#{{lc:{{{type}}}}}}}}|{{{icon-text|This {{pagetype|subjectspace=yes}} is {{#switch:{{lc:{{{type}}}}} | |||
|semi=semi- | |semi=semi- | ||
|move=move- | |move=move- | ||
Line 67: | Line 30: | ||
|full | |full | ||
|#default=}}protected{{#ifeq:{{lc:{{{type}}}}}|indef||{{#if:{{{expiry|}}}|<nowiki> </nowiki>until {{#time:F j, Y|{{{expiry}}}}}}}}}{{#if:{{{icon-reason|}}}|<nowiki> </nowiki>{{{icon-reason}}}}}.}}}]]</div> | |#default=}}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 | ||
| image = [[Image:{{{image|{{#switch:{{lc:{{{type}}}}} | | image=[[Image:{{{image|{{#switch:{{lc:{{{type}}}}} | ||
|full=Padlock.svg | |full=Padlock.svg | ||
|semi=Padlock-silver-medium.svg | |semi=Padlock-silver-medium.svg | ||
Line 77: | Line 40: | ||
|office=Padlock-black.svg | |office=Padlock-black.svg | ||
|create=Padlock-skyblue.svg | |create=Padlock-skyblue.svg | ||
|#default=Transparent.gif | |#default=Transparent.gif}}}}}|40px|{{{icon-text|This page is {{#switch:{{lc:{{{type}}}}} | ||
}}}}}|40px|{{{icon-text|This page is {{#switch:{{lc:{{{type}}}}} | |||
|semi=semi- | |semi=semi- | ||
|move=move- | |move=move- | ||
Line 86: | Line 48: | ||
|full | |full | ||
|#default=}}protected.}}}]] | |#default=}}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 | ||
|semi=Editing of this {{pagetype|subjectspace=yes}} by new or unregistered users is currently disabled | |semi=Editing of this {{pagetype|subjectspace=yes}} by new or unregistered users is currently disabled | ||
Line 92: | Line 54: | ||
|indef=This page is protected from editing ''indefinitely'' | |indef=This page is protected from editing ''indefinitely'' | ||
|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:F j, Y|{{{expiry}}}}}}}}}{{{reason<includeonly>|</includeonly>}}}.}}}'''<br /> | ||
}}{{#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}}}}} | {{{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]}}.}} | ||
|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. | 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. 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. | ||
|office=If you can edit this page, please discuss all changes and additions on the [[{{TALKPAGENAME}}|talk page]] first. '''Do not remove protection from this article unless you are authorized by the platform to do so.''' | |office=If you can edit this page, please discuss all changes and additions on the [[{{TALKPAGENAME}}|talk page]] first. '''Do not remove protection from this article unless you are authorized by the platform to do so.''' | ||
|create=Please see the {{#if:{{{xfd|}}}|'''[[{{{xfd}}}|deletion discussion]]''' or the}} [{{fullurl:Special:Log|type=delete&page={{FULLPAGENAMEE}}}} deletion log] for details of why this page was deleted. If you would like to create a page at this title, you must first request for it to be unprotected, or contact the administrator who deleted the page for the deleted material to be restored. If unsuccessful, you can use deletion review. | |create=Please see the {{#if:{{{xfd|}}}|'''[[{{{xfd}}}|deletion discussion]]''' or the}} [{{fullurl:Special:Log|type=delete&page={{FULLPAGENAMEE}}}} deletion log] for details of why this page was deleted. If you would like to create a page at this title, you must first request for it to be unprotected, or contact the administrator who deleted the page for the deleted material to be restored. If unsuccessful, you can use deletion review.}}}}} | ||
}}}}} | |||
}} | }} | ||
}}|[[Category:Protected templates]]}}<includeonly>{{#ifeq:{{lc:{{{categories|no}}}}}|no||{{{categories|}}}}}</includeonly><noinclude> | }}|[[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> |
Latest revision as of 14:25, 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