Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Protected/sandbox: Difference between revisions

Template page
Add support for Cascading Protection
Add support for separate `upload` and `edit` protection icons
Line 15: Line 15:


| sysop=
| sysop=
   {{#ifeq:{{{icon}}}|no||<indicator name="protected">[[File:Full-protection-shackle-block.svg|20px|link=Special:MyLanguage/Commons:Protection policy|{{ {{tSwitch|protected/text}}|img-text1}}]]</indicator>}}<!--
   {{#ifeq:{{{icon}}}|no||<indicator name="protected">[[File:Full-protection-shackle-block.svg|20px|link=Special:MyLanguage/Commons:FULL|{{ {{tSwitch|protected/text}}|img-text1}}]]</indicator>}}<!--
-->{{Autotranslate
-->{{Autotranslate
<!-- Autotranslate parameters: -->
<!-- Autotranslate parameters: -->
Line 28: Line 28:


| templateeditor=
| templateeditor=
  <indicator name="protected">[[File:Template-protection-shackle-brackets 2.svg|20px|link=Special:MyLanguage/Commons:Protection policy||{{ {{tSwitch|protected/text}}|img-text1}}]]</indicator>
  <indicator name="protected">[[File:Template-protection-shackle-brackets 2.svg|20px|link=Special:MyLanguage/Commons:TP|{{ {{tSwitch|protected/text}}|img-text1}}]]</indicator>


| autoconfirmed=
| autoconfirmed=
   <indicator name="protected">[[File:Semi-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy||{{ {{tSwitch|protected/text}}|img-text2}}]]</indicator>
   <indicator name="protected">[[File:Semi-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:SEMI|{{ {{tSwitch|protected/text}}|img-text2}}]]</indicator>


| #default=
| #default=
   {{#ifeq:{{NAMESPACE}}|{{{demo-ns|{{ns:6}}}}}
   {{#ifeq:{{NAMESPACE}}|{{{demo-ns|{{ns:6}}}}}||
   | {{#switch:{{{demo-upload|{{PROTECTIONLEVEL:upload}}}}}
    {{ifsandbox||{{error|message={{ {{tSwitch|protected/text}}|error-text}}|tag=div}}<!--
    -->{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Unprotected pages using protection templates]]}}}}}}}
   }}
}}{{#ifeq:{{NAMESPACE}}|{{{demo-ns|{{ns:6}}}}}
| {{#switch:{{{demo-upload|{{PROTECTIONLEVEL:upload}}}}}
  | {{#if:{{{demo-edit|{{PROTECTIONLEVEL:edit}}}}}|{{{demo-edit|{{PROTECTIONLEVEL:edit}}}}}|^}} =
    <!-- don't add the upload protection shackle when {{PROTECTIONLEVEL:upload}} == {{PROTECTIONLEVEL:edit}} -->


     | sysop=
  | cascade-sysop | sysop | templateeditor =
       <indicator name="protected">[[File:Upload-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy||{{ {{tSwitch|protected/text}}|img-text3}}]]</indicator>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Upload protected files]]}}} }}
     {{#switch:{{{demo-edit|{{#if:{{CASCADINGSOURCES}}|cascade-sysop|{{PROTECTIONLEVEL:edit}}}}}}}
    | cascade-sysop | sysop=
      <!-- only add the upload protection shackle when not also fully protected from editing -->
    | #default=
       <indicator name="protected-upload">[[File:Upload-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy||{{ {{tSwitch|protected/text}}|img-text3}}]]</indicator>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Upload protected files]]}}} }}
    }}


     | autoconfirmed=
  | autoconfirmed=
       <indicator name="protected">[[File:Semi-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy||{{ {{tSwitch|protected/text}}|img-text4}}]]</indicator>
     {{#switch:{{{demo-edit|{{#if:{{CASCADINGSOURCES}}|cascade-sysop|{{PROTECTIONLEVEL:edit}}}}}}}
    | cascade-sysop  | sysop
    | templateeditor | autoconfirmed=
      <!-- only add the upload semi-protection shackle when not also protected from editing -->
    | #default=
       <indicator name="protected-upload">[[File:Semi-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy||{{ {{tSwitch|protected/text}}|img-text4}}]]</indicator>
    }}


    | #default={{ifsandbox||
  | #default={{ifsandbox||{{error|message={{ {{tSwitch|protected/text}}|error-text}}|tag=div}}<!--
      <div class="error">{{ {{tSwitch|protected/text}}|error-text}}</div>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Unprotected pages using protection templates]]}}} }}}}
     -->{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Unprotected pages using protection templates]]}}}}}}}
     }}
  |{{ifsandbox||<div class="error">{{ {{tSwitch|protected/text}}|error-text}}</div>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Unprotected pages using protection templates]]}}} }}}}
   }}
   }}
}}</includeonly></onlyinclude>
}}</includeonly></onlyinclude>
{{Documentation/sandbox}}
{{Documentation/sandbox}}
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->

Revision as of 16:36, 21 August 2021

Cookies help us deliver our services. By using our services, you agree to our use of cookies.