Difference between revisions of "Template:Editnotice/notice"

From blackwiki
Jump to navigation Jump to search
imported>Jackmcbarn
(since Template:Editnotice doesn't support "infinite" or "never", this shouldn't either. Also, categorize invalid ones)
imported>Jackmcbarn
(Undid revision 970832365 by Jackmcbarn (talk))
Line 1: Line 1:
{{Notice|The following editnotice {{#switch:{{lc:{{{expiry|¬}}}}}
+
{{Notice|This {{#switch:{{#titleparts: {{FULLPAGENAME}}|2}}
 +
  | 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[[Category:Editnotices with invalid expirations]]}}
+
   |{{error|has an invalid expiry time}}
 
   |{{#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 10: Line 17:
 
   }}
 
   }}
 
   }}
 
   }}
  }}. 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

Template documentation[view] [edit] [history] [purge]

Called from {{Editnotice}}. For more details, see {{Editnotice/doc}}.