Template:Pp-protected: Difference between revisions

using #switch instead of several #eq 's to reduce code size
(update a few categories with Wikipedia prefix)
(using #switch instead of several #eq 's to reduce code size)
Line 6:
|dispute=no
|reason={{#if:{{{reason|}}}| because {{lcfirst:{{{reason|}}}}}}}
|categories={{{categoriescategory|{{#switch: {{NAMESPACE}}
| {{ns:2}}
{{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Wikipedia protected pages|{{PAGENAME}}]]}}
{{#ifeq:{{NAMESPACE}} | {{ns:143}}| = [[Category:Wikipedia protected user and user talk pages|{{PAGENAME}}]]}}
{{#ifeq:{{NAMESPACE}} | {{ns:1006}}| = [[Category:WikipediaProtected protected pages|{{PAGENAME}}images]]}}
| {{ns:4}}
{{#ifeq:{{NAMESPACE}}|{{ns:4}}|[[Category:Protected project pages|{{PAGENAME}}]]}}
{{#ifeq:{{NAMESPACE}} | {{ns:12}}| = [[Category:Protected project pages|{{PAGENAME}}]]}}
{{#ifeq:{{NAMESPACE}} | {{ns:610}}| = [[Category:ProtectedWikipedia imagesprotected templates|{{PAGENAME}}]]}}
| #default = {{talk other|[[Category:Protected talk pages]]|[[Category:Wikipedia protected pages|{{PAGENAME}}]]}}}}{{#ifeqifexpr:{{NAMESPACE#if:{{{expiry|}}}|{{ns#time:2U|today}}>{{#time:U|{{{expiry}}}}}|0}}|[[Category:Wikipedia protected userpages andwith userexpiry talk pagesexpired|{{PAGENAME}}]]}}}}}}}</includeonly><noinclude>
{{#ifeq:{{NAMESPACE}}|{{ns:3}}|[[Category:Wikipedia protected user and user talk pages|{{PAGENAME}}]]}}
{{#ifeq:{{NAMESPACE}}|{{ns:10}}|[[Category:Wikipedia protected templates|{{PAGENAME}}]]}}
{{talk other|{{#ifeq:{{NAMESPACE}}|{{ns:3}}||[[Category:Protected talk pages]]}}}}
{{#ifexpr:{{#if:{{{expiry|}}}|{{#time:U|today}}>{{#time:U|{{{expiry}}}}}|0}}|[[Category:Wikipedia protected pages with expiry expired|{{PAGENAME}}]]}}}}}}}</includeonly><noinclude>
{{pp-protected|demospace=main|categories=no|reason=[[Lorem ipsum|Lorem ipsum dolor sit amet]]}}
Anonymous user