Difference between revisions of "Template:Editnotice"

From Timelines
Jump to: navigation, search
(Undid revision 410524082 by MSGJ (talk)that broke some editnotices, one at WP:ERRORS for example)
(try and restore expiration code, with fixed space ...)
Line 1: Line 1:
{{fmbox
+
{{#ifeq:{{FULLROOTPAGENAME}}|Template:Editnotices
  |type      = editnotice
+
  |{{notice|The following editnotice ''{{#switch:{{{expiry|¬}}}
|id        = {{{id|}}}
+
  |indefinite = is set to never expire
|textstyle = {{{textstyle|}}}
+
  |
|style     = {{{style|}}}
+
  |¬          = does not have an expiry time set
|image    = {{#if:{{{image|}}}
+
  |#default  = {{#iferror:{{#time:U|{{{expiry}}}}}
  |{{image|{{{image}}}|40x40px}}
+
    |has an invalid expiry time
   |none
+
     |{{#ifexpr:{{#time:U|{{{expiry}}}}}-{{#time:U|{{CURRENTTIMESTAMP}}}}>0
 +
    |will expire {{{expiry}}}
 +
    |expired {{{expiry}}}
 +
    }}
 +
  }}
 +
   }}''. To adjust this setting, please update the {{para|expiry}} parameter.
 
  }}
 
  }}
  |imageright    = {{#if:{{{imageright|}}}
+
}}{{#ifexpr:{{#ifeq:{{FULLROOTPAGENAME}}|Template:Editnotices
  |{{image|{{{imageright}}}|40x40px}}
+
  |1
 +
  |0
 +
  }}+{{#switch:{{{expiry|¬}}}
 +
  |indefinite = 1
 +
  |
 +
  |¬          = 1 <!-- Expiry not specified -->
 +
  |#default  = {{#iferror:{{#time:U|{{{expiry}}}}}
 +
  |0 <!-- Invalid expiry time -->
 +
  |{{#ifexpr:{{#time:U|{{{expiry}}}}}-{{#time:U|{{CURRENTTIMESTAMP}}}}>0
 +
    |1 <!-- Notice current -->
 +
    |0 <!-- Notice expired -->
 +
  }}
 +
  }}
 
  }}
 
  }}
  |text      = {{#if:{{{header|}}}
+
  |{{fmbox
  |<dl><dt style="{{{headerstyle|}}}">{{{header}}}</dt></dl>
+
  |type      = editnotice
 +
  |id        = {{{id|}}}
 +
  |textstyle = {{{textstyle|}}}
 +
  |style    = {{{style|}}}
 +
  |image    = {{#if:{{{image|}}}
 +
  |{{image|{{{image}}}|40x40px}}
 +
  |none
 +
  }}
 +
  |imageright= {{#if:{{{imageright|}}}
 +
  |{{image|{{{imageright}}}|40x40px}}
 +
  }}
 +
  |text      = {{#if:{{{header|}}}
 +
  |<dl><dt style="{{{headerstyle|}}}">{{{header}}}</dt></dl>
 +
  }}
 +
{{{text|{{{1}}}}}}
 
  }}
 
  }}
{{{text|{{{1}}}}}}
 
 
}}<noinclude>
 
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 03:39, 28 January 2011

Template documentation[create]