Jump to content

Template:Template rating: Difference between revisions

From Fifth Empire Wiki
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|}}}||{{pp|1={{{reason|{{{doc-reason|}}}}}}|action={{{action|{{{doc-action|}}}}}}|demolevel={{{demolevel|}}}}}}}<!-- This subtemplate was replaced by just using {{pp}}: {{Template rating/protected|nocat={{{nocat|false}}}|demospace={{{demospace|<noinclude>module</noinclude>}}}{{#if:{{{demopage|}}}|{{!}}demopage={{{demopage|}}}}}}}--><!--
-->}}<!-- 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

Lua error in Module:Effective_protection_level at line 64: attempt to index field 'TitleBlacklist' (a nil value).