Template:Template rating: Difference between revisions
Appearance
add suppress-pp= |
adjust to display {{pp}} only if actually protected |
||
| Line 78: | Line 78: | ||
| #default = <!-- ***** Error not in Template or Module namespaces ***** -->{{if preview|1={{error|Error: {{tl|Template rating}} can only be used on pages in the [[Wikipedia:Template namespace|Template:]] or [[Wikipedia:Module namespace|Module: namespaces]].}}}}[[Category:Pages with templates in the wrong namespace]] | | #default = <!-- ***** Error not in Template or Module namespaces ***** -->{{if preview|1={{error|Error: {{tl|Template rating}} can only be used on pages in the [[Wikipedia:Template namespace|Template:]] or [[Wikipedia:Module namespace|Module: namespaces]].}}}}[[Category:Pages with templates in the wrong namespace]] | ||
}}<!-- End switch. -->|{{If preview|1={{error|Page using [[Template:Template rating]] with <u>empty</u> {{para|1}} module rating parameter.}}}}[[Category:Pages using template rating template with unknown parameters|{{FULLPAGENAME}}]]<!-- | }}<!-- End switch. -->|{{If preview|1={{error|Page using [[Template:Template rating]] with <u>empty</u> {{para|1}} module rating parameter.}}}}[[Category:Pages using template rating template with unknown parameters|{{FULLPAGENAME}}]]<!-- | ||
-->}}<!-- End if. Display protection template if necessary, this will obviously show it for /doc page too since it uses {{FULLPAGENAME}}: -->{{#if:{{{suppress-pp|}}}||{{ | -->}}<!-- End if. Display protection template if necessary, this will obviously show it for /doc page too since it uses {{FULLPAGENAME}}: -->{{#switch:{{Namespace detect|template=t|module=m|demospace={{{demospace|}}}}} | ||
|t|m = {{#if:{{{suppress-pp|}}} | |||
| | |||
|{{#switch:{{#invoke:Effective protection level|edit|{{{demopage|{{FULLPAGENAME}}}}}}} | |||
|*|user = <!-- If not protected page, do nothing. --> | |||
|#default = {{#ifeq:{{lc:{{SUBPAGENAME}}}}|doc | |||
|<!-- {{#if:{{{2|}}}{{{doc-reason|}}}{{{3|}}}{{{doc-action|}}} --><!-- | |||
--><!-- | -->{{pp|{{{2|{{{doc-reason|}}}}}}|action={{{3|{{{doc-action|}}}}}}}}<!-- | |||
--><!-- }} --> | |||
-->|{{pp|1={{{reason|{{{doc-reason|}}}}}}|action={{{action|{{{doc-action|}}}}}}|demolevel={{{demolevel|}}}}}<!-- | |||
-->}}<!-- | |||
-->}}<!-- | |||
-->}} | |||
|#default = <!-- If not in template or module nampespace, do nothing | |||
-->}}<!-- | |||
End template, start tracking. | End template, start tracking. | ||
-->{{#invoke:Check for unknown parameters| check | -->{{#invoke:Check for unknown parameters| check | ||
Revision as of 10:41, 11 September 2025
| File:Green check.svg | This template is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing. |
Lua error in Module:Effective_protection_level at line 64: attempt to index field 'TitleBlacklist' (a nil value).
File:Test Template Info-Icon - Version (2).svg Template documentation[create] [purge]