Difference between revisions of "Template:Pp-meta"
From Game Detectives Wiki
[unchecked revision] | [unchecked revision] |
(Made protection-level-related features case-insensitive) |
(Refining demolevel defaulting scheme to add an undefined case since, as I earlier forgot, templates cannot be passed parameters by ParserFunctions.) |
||
Line 2: | Line 2: | ||
|move=<!-- | |move=<!-- | ||
-->{{#ifeq: | -->{{#ifeq: | ||
− | {{#switch:{{lc:{{{demolevel| | + | {{#switch:{{lc:{{{demolevel|undefined}}}}} |
|semi | |semi | ||
|autoconfirmed=autoconfirmed | |autoconfirmed=autoconfirmed | ||
Line 8: | Line 8: | ||
|full | |full | ||
|sysop=sysop | |sysop=sysop | ||
+ | |undefined={{PROTECTIONLEVEL:move}} | ||
|#default=<!--fallback value: null | |#default=<!--fallback value: null | ||
-->}} | -->}} | ||
Line 14: | Line 15: | ||
|create=<!-- | |create=<!-- | ||
-->{{#if: | -->{{#if: | ||
− | {{#switch:{{lc:{{{demolevel| | + | {{#switch:{{lc:{{{demolevel|undefined}}}}} |
|semi | |semi | ||
|autoconfirmed=autoconfirmed | |autoconfirmed=autoconfirmed | ||
Line 20: | Line 21: | ||
|full | |full | ||
|sysop=sysop | |sysop=sysop | ||
+ | |undefined={{PROTECTIONLEVEL:create}} | ||
|#default=<!--fallback value: null | |#default=<!--fallback value: null | ||
-->}} | -->}} | ||
Line 26: | Line 28: | ||
|#default<!--includes all other types-->=<!-- | |#default<!--includes all other types-->=<!-- | ||
-->{{#if: | -->{{#if: | ||
− | {{#switch:{{lc:{{{demolevel| | + | {{#switch:{{lc:{{{demolevel|undefined}}}}} |
|semi | |semi | ||
|autoconfirmed=autoconfirmed | |autoconfirmed=autoconfirmed | ||
Line 32: | Line 34: | ||
|full | |full | ||
|sysop=sysop | |sysop=sysop | ||
+ | |undefined={{PROTECTIONLEVEL:edit}} | ||
|#default=<!--fallback value: null | |#default=<!--fallback value: null | ||
-->}} | -->}} | ||
Line 41: | Line 44: | ||
|sysop=sysop | |sysop=sysop | ||
|#default=<!--fallback value: null-->}} | |#default=<!--fallback value: null-->}} | ||
− | |{{#switch:{{lc:{{{demolevel| | + | |{{#switch:{{lc:{{{demolevel|undefined}}}}} |
|semi | |semi | ||
|autoconfirmed=autoconfirmed | |autoconfirmed=autoconfirmed | ||
Line 47: | Line 50: | ||
|full | |full | ||
|sysop=sysop | |sysop=sysop | ||
+ | |undefined={{PROTECTIONLEVEL:edit}} | ||
|#default=<!--fallback value: null | |#default=<!--fallback value: null | ||
-->}} | -->}} |