Difference between revisions of "Template:Editnotice/notice"

From blackwiki
Jump to navigation Jump to search
imported>JJMC89
(only show the move link to those that can move it)
imported>Jackmcbarn
(since Template:Editnotice doesn't support "infinite" or "never", this shouldn't either. Also, categorize invalid ones)
Line 1: Line 1:
{{Notice|This {{#switch:{{#titleparts: {{FULLPAGENAME}}|2}}
+
{{Notice|The following editnotice {{#switch:{{lc:{{{expiry|¬}}}}}
  | Template:Editnotices/Namespace  = namespace notice (for [[Wikipedia:Namespace|the {{#titleparts: {{FULLPAGENAME}} |1|3}} namespace]])
 
  | Template:Editnotices/Group      = group editnotice (for {{pagelinks|{{#titleparts: {{FULLPAGENAME}} |0|3}}}} and its subpages)
 
  | Template:Editnotices/Page      = editnotice (for {{pagelinks|{{#titleparts: {{FULLPAGENAME}} |0|3}}}})
 
  | Template:Editnotices/Protection = [[Wikipedia:Editnotice#Protection notices|protection notice]] (for {{pagelinks|{{#titleparts: {{FULLPAGENAME}} |0|3}}}})
 
  | #default = editnotice
 
}} {{#switch:{{lc:{{{expiry|¬}}}}}
 
  |infinite|never
 
 
   |indefinite = is set never to expire
 
   |indefinite = is set never to expire
 
   |
 
   |
 
   |¬          = does not have an expiry time set
 
   |¬          = does not have an expiry time set
 
   |#default  = {{#iferror:{{#time:U|{{{expiry}}}}}
 
   |#default  = {{#iferror:{{#time:U|{{{expiry}}}}}
   |{{error|has an invalid expiry time}}
+
   |{{error|has an invalid expiry time[[Category:Editnotices with invalid expirations]]}}
 
   |{{#ifexpr:{{#time:U|{{{expiry}}}}}>{{#time:U|{{CURRENTTIMESTAMP}}}}
 
   |{{#ifexpr:{{#time:U|{{{expiry}}}}}>{{#time:U|{{CURRENTTIMESTAMP}}}}
 
     |will expire {{#time:H:i, j F Y|{{{expiry}}}}} (UTC)
 
     |will expire {{#time:H:i, j F Y|{{{expiry}}}}} (UTC)
Line 17: Line 10:
 
   }}
 
   }}
 
   }}
 
   }}
  }}. To adjust this setting, please update the {{para|expiry}} parameter.
+
  }}. To adjust this setting, please update the {{Para|expiry}} parameter.
{{#switch:{{#titleparts: {{FULLPAGENAME}}|2}}
 
  | Template:Editnotices/Page
 
  | Template:Editnotices/Protection = {{#ifexist:{{#titleparts:{{FULLPAGENAME}}|0|3}}
 
    |{{#ifeq:{{#invoke:redirect|isRedirect|{{#titleparts:{{FULLPAGENAME}}|0|3}}}}|yes
 
      | <br /><span style="color:#050">Note:</span> ''[[:{{#titleparts:{{FULLPAGENAME}}|0|3}}]]'' redirects to {{#invoke:redirect|main|{{#titleparts:{{FULLPAGENAME}}|0|3}}|bracket=yes}}. {{#ifeq:{{{redirect}}}|yes||<span class="sysop-show templateeditor-show extendedmover-show">[{{fullurl:Special:MovePage|wpOldTitle={{urlencode:{{FULLPAGENAME}}}}&wpNewTitle={{urlencode:{{#titleparts:{{FULLPAGENAME}}|2|1}}/{{#invoke:redirect|main|{{#titleparts:{{FULLPAGENAME}}|0|3}}}}}}&wpReason={{urlencode:Page now at {{#invoke:redirect|main|{{#titleparts:{{FULLPAGENAME}}|0|3}}|bracket=yes}}}}&wpMovetalk=1&wpLeaveRedirect=0}} Move this editnotice to that page.]</span>[[Category:Editnotices whose targets are redirects]]}}}}
 
    |{{ #switch: {{#invoke:Effective protection level|create|{{#titleparts: {{FULLPAGENAME}} |0|3}}}}
 
    | sysop | templateeditor | extendedconfirmed | autoconfirmed =
 
    | #default = [[Category:Editnotices with unsalted non-existent targets]]
 
    }}
 
  }}
 
 
}}
 
}}
}}<noinclude>
 
{{Documentation}}
 
</noinclude>
 

Revision as of 17:50, 2 August 2020