Template:Pp-template/doc: Difference between revisions

From Know Islam
Jump to navigation Jump to search
(Created page with "<includeonly>{{pp-meta |type={{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}} |semi |autoconfirmed=semi |administrator |full |sysop=indef |move=move |#default=indef<!--fallback value-->}} |small={{{small|yes}}} |demospace={{{demospace|}}} |demolevel={{#ifeq:{{PAGENAME}}/{{NAMESPACE}}|{{SUBPAGENAME}}/{{ns:Template}}|{{{demolevel|undefined}}}|{{#ifeq:{{lc:{{SUBPAGENAME}}}}|sandbo...")
 
No edit summary
Line 1: Line 1:
<includeonly>{{pp-meta
<!-- This is the documentation for Template:Pp-template -->
|type={{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
 
  |semi
== Usage ==
  |autoconfirmed=semi
The '''{{PAGENAME}}''' template is used to display protection information for pages. It adjusts its output based on the page's protection level, namespace, and other parameters.
  |administrator
 
  |full
=== Parameters ===
  |sysop=indef
* '''type''': The type of protection (e.g., semi, full, move).
  |move=move
* '''small''': Controls whether the small version of the protection icon is displayed (default: yes).
  |#default=indef<!--fallback value-->}}
* '''demospace''': The demonstration namespace.
|small={{{small|yes}}}
* '''demolevel''': The demonstration protection level.
|demospace={{{demospace|}}}
* '''expiry''': The expiry of the protection (not used in this template).
|demolevel={{#ifeq:{{PAGENAME}}/{{NAMESPACE}}|{{SUBPAGENAME}}/{{ns:Template}}|{{{demolevel|undefined}}}|{{#ifeq:{{lc:{{SUBPAGENAME}}}}|sandbox|sysop|{{{demolevel|undefined}}}}}}}
* '''dispute''': Whether the protection is due to a dispute (default: no).
|expiry=<!--not applicable-->
* '''icon-text''': Custom text for the protection icon.
|dispute=no
* '''reason-text''': Custom text for the reason of protection.
|icon-text=This {{#ifeq:{{NAMESPACE}}|{{ns:6}}|image, included in a high-risk template or message,|high-risk template}} is indefinitely {{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
* '''categories''': Custom categories for the template.
  |semi
 
  |autoconfirmed=semi-protected from editing
== Examples ==
  |move=move-protected
<syntaxhighlight lang="html">
  |administrator
{{Pp-template
  |full
|type=semi
  |sysop
|small=no
  |#default=<!--fallback value-->protected from editing}} to prevent vandalism.
|demospace=Template
|reason-text=This {{#switch:{{NAMESPACE}}
|demolevel=autoconfirmed
  |{{ns:image}}=image, used in one or more [[Wikipedia:High-risk templates|high-risk templates]]{{#switch:{{{demolevel|{{PROTECTIONLEVEL:edit}}}}}
}}
  |semi
</syntaxhighlight>
  |autoconfirmed=
 
  |administrator
== Categories ==
  |full
This template automatically categorizes pages based on their protection level:
  |sysop=<nowiki> </nowiki>and/or [[Special:Allmessages|system messages]],
* [[:Category:Wikipedia semi-protected templates]]
  |#default=<!--fallback value-->}}
* [[:Category:Wikipedia move-protected templates]]
  |#default=[[Wikipedia:High-risk templates|high-risk template]]
* [[:Category:Wikipedia protected templates]]
}} has been [[Wikipedia:This page is protected|{{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
 
  |semi
== See Also ==
  |autoconfirmed=semi-
* [[Wikipedia:Protection policy]]
  |move=move-
* [[Wikipedia:Template messages/Protection]]
  |administrator
* [[Wikipedia:High-risk templates]]
  |full
 
  |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}}}}}
  |semi
  |autoconfirmed=
  |administrator
  |full
  |sysop<!--uses default-->
  |#default={{#switch:{{NAMESPACE}}|{{ns:image}}=<br /><small>'''Do not move this image''' to [[commons:|Wikimedia Commons]].</small>}}}}
|categories={{{categories|{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
  |semi
  |autoconfirmed=[[Category:Wikipedia semi-protected templates|{{PAGENAME}}]]{{#ifeq:{{PROTECTIONLEVEL:move}}|sysop|[[Category:Wikipedia move-protected templates|{{PAGENAME}}]]}}
  |move=[[Category:Wikipedia move-protected templates|{{PAGENAME}}]]
  |administrator
  |full
  |sysop<!--uses default-->
  |#default=[[Category:Wikipedia protected templates|{{PAGENAME}}]]<!--fallback value-->}}}}{{#ifeq:{{NAMESPACE}}|{{ns:6}}|[[Category:{{#switch:{{{demolevel|{{PROTECTIONLEVEL:edit}}}}}
  |semi
  |autoconfirmed=Semi-protected
  |administrator
  |full
  |sysop<!--uses default-->
  |#default=Protected<!--fallback value-->}} images|{{PAGENAME}}]]}}}}}}}
</includeonly>
<noinclude>
<noinclude>
{{pp-template|categories=no}}  <!-- Show the small version -->
[[Category:Wikipedia template documentation|Pp-template]]
{{pp-template|small=no}}      <!-- Show the large version -->
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Revision as of 14:30, 21 July 2024


Usage

The Pp-template/doc 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