Template:Pp-template: Difference between revisions

From Know Islam
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
{{pp-meta
{{pp-meta
Line 23: Line 24:
   |#default=<!--fallback value-->protected from editing}} to prevent vandalism.
   |#default=<!--fallback value-->protected from editing}} to prevent vandalism.
|reason-text=This {{#switch:{{NAMESPACE}}
|reason-text=This {{#switch:{{NAMESPACE}}
   |{{ns:image}}=image, used in one or more [[Wikipedia:High-risk templates|high-risk templates]]{{#switch:{{{demolevel|{{PROTECTIONLEVEL:edit}}}}}
   |{{ns:image}}=image, used in one or more [[High-risk templates|high-risk templates]]{{#switch:{{{demolevel|{{PROTECTIONLEVEL:edit}}}}}
   |semi
   |semi
   |autoconfirmed=
   |autoconfirmed=
Line 30: Line 31:
   |sysop=<nowiki> </nowiki>and/or [[Special:Allmessages|system messages]],
   |sysop=<nowiki> </nowiki>and/or [[Special:Allmessages|system messages]],
   |#default=<!--fallback value-->}}
   |#default=<!--fallback value-->}}
   |#default=[[Wikipedia:High-risk templates|high-risk template]]
   |#default=[[High-risk templates|high-risk template]]
}} has been [[Wikipedia:This page is protected|{{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
}} has been [[This page is protected|{{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
   |semi
   |semi
   |autoconfirmed=semi-
   |autoconfirmed=semi-
Line 38: Line 39:
   |full
   |full
   |sysop<!--uses default-->
   |sysop<!--uses default-->
   |#default=<!--fallback value-->}}protected]]{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop||<nowiki> </nowiki>from editing}} to prevent [[Wikipedia:Vandalism|vandalism]]. {{#switch:{{{demolevel|{{PROTECTIONLEVEL:edit}}}}}
   |#default=<!--fallback value-->}}protected]]{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop||<nowiki> </nowiki>from editing}} to prevent [[Vandalism|vandalism]]. {{#switch:{{{demolevel|{{PROTECTIONLEVEL:edit}}}}}
   |semi
   |semi
   |autoconfirmed=
   |autoconfirmed=
Line 47: Line 48:
|categories={{{categories|{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
|categories={{{categories|{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
   |semi
   |semi
   |autoconfirmed=[[Category:Wikipedia semi-protected templates|{{PAGENAME}}]]{{#ifeq:{{PROTECTIONLEVEL:move}}|sysop|[[Category:Wikipedia move-protected templates|{{PAGENAME}}]]}}
   |autoconfirmed=[[Category:Semi-protected templates|{{PAGENAME}}]]{{#ifeq:{{PROTECTIONLEVEL:move}}|sysop|[[Category:Move-protected templates|{{PAGENAME}}]]}}
   |move=[[Category:Wikipedia move-protected templates|{{PAGENAME}}]]
   |move=[[Category:Move-protected templates|{{PAGENAME}}]]
   |administrator
   |administrator
   |full
   |full
   |sysop<!--uses default-->
   |sysop<!--uses default-->
   |#default=[[Category:Wikipedia protected templates|{{PAGENAME}}]]<!--fallback value-->}}}}{{#ifeq:{{NAMESPACE}}|{{ns:6}}|[[Category:{{#switch:{{{demolevel|{{PROTECTIONLEVEL:edit}}}}}
   |#default=[[Category:Protected templates|{{PAGENAME}}]]<!--fallback value-->}}}}{{#ifeq:{{NAMESPACE}}|{{ns:6}}|[[Category:{{#switch:{{{demolevel|{{PROTECTIONLEVEL:edit}}}}}
   |semi
   |semi
   |autoconfirmed=Semi-protected
   |autoconfirmed=Semi-protected

Revision as of 14:32, 21 July 2024



Usage

The Pp-template template is used to display protection information for pages. It adjusts its output based on the page's protection level, namespace, and other parameters.

Parameters

  • type: The type of protection (e.g., semi, full, move).
  • small: Controls whether the small version of the protection icon is displayed (default: yes).
  • demospace: The demonstration namespace.
  • demolevel: The demonstration protection level.
  • expiry: The expiry of the protection (not used in this template).
  • dispute: Whether the protection is due to a dispute (default: no).
  • icon-text: Custom text for the protection icon.
  • reason-text: Custom text for the reason of protection.
  • categories: Custom categories for the template.

Examples

{{Pp-template
|type=semi
|small=no
|demospace=Template
|demolevel=autoconfirmed
}}

Categories

This template automatically categorizes pages based on their protection level:

See Also