Difference between revisions of "Template:Editnotice"

From Timelines
Jump to: navigation, search
(put in Category:Expired editnotices if expired)
(pass param |redirect (now recognized by notice subtemplate) to suppress category when it equals yes)
 
(16 intermediate revisions by 7 users not shown)
Line 2: Line 2:
 
  |{{Editnotice/notice
 
  |{{Editnotice/notice
 
   |expiry={{{expiry|¬}}}
 
   |expiry={{{expiry|¬}}}
 +
  |redirect={{{redirect|}}}
 
  }}
 
  }}
 
}}{{#ifexpr:{{#ifeq:{{FULLROOTPAGENAME}}|Template:Editnotices
 
}}{{#ifexpr:{{#ifeq:{{FULLROOTPAGENAME}}|Template:Editnotices
Line 19: Line 20:
 
  }}
 
  }}
 
  |{{fmbox
 
  |{{fmbox
   |type      = editnotice
+
   |type      = {{{type|editnotice}}}
 
   |id        = {{{id|}}}
 
   |id        = {{{id|}}}
 
   |textstyle = {{{textstyle|}}}
 
   |textstyle = {{{textstyle|}}}
Line 25: Line 26:
 
   |class    = {{{class|}}}
 
   |class    = {{{class|}}}
 
   |image    = {{#if:{{{image|}}}
 
   |image    = {{#if:{{{image|}}}
   |{{image|{{{image}}}|{{#if:{{{imagesize|}}}|{{{imagesize}}}|40x40px}}}}
+
   |{{#invoke:InfoboxImage|InfoboxImage|image={{{image}}}|size={{{imagesize|}}}|sizedefault=40x40px}}
 
   |none
 
   |none
 
   }}
 
   }}
 
   |imageright= {{#if:{{{imageright|}}}
 
   |imageright= {{#if:{{{imageright|}}}
   |{{image|{{{imageright}}}|{{#if:{{{imagerightsize|}}}|{{{imagerightsize}}}|{{#if:{{{imagesize|}}}|{{{imagesize}}}|40x40px}}}}}}
+
   |{{#invoke:InfoboxImage|InfoboxImage|image={{{imageright}}}|size={{{imagerightsize|}}}|sizedefault=40x40px}}
 
   }}
 
   }}
 
   |text      = {{#if:{{{header|}}}
 
   |text      = {{#if:{{{header|}}}
   |<dl><dt style="{{{headerstyle|}}}">{{{header}}}</dt></dl>
+
   |<div style="font-weight: bold; {{{headerstyle|}}}">{{{header}}}</div>
 
   }}
 
   }}
 
{{{text|{{{1}}}}}}
 
{{{text|{{{1}}}}}}
 
  }}
 
  }}
}}{{#ifexpr:{{#time:U|{{{expiry}}}}}-{{#time:U|{{CURRENTTIMESTAMP}}}}>0
+
}}{{#ifeq:{{FULLROOTPAGENAME}}|Template:Editnotices|{{#switch:{{{expiry|¬}}}
     |
+
  |indefinite
     |[[Category:Expired editnotices]]
+
  |
   }}<noinclude>
+
  |¬          = <!-- Expiry not specified -->
 +
  |#default  = {{#iferror:{{#time:U|{{{expiry}}}}}
 +
  | <!-- Invalid expiry time -->
 +
  |{{#ifexpr:{{#time:U|{{{expiry}}}}}-{{#time:U|{{CURRENTTIMESTAMP}}}}>0
 +
     | <!-- Notice current -->
 +
     |[[Category:Expired editnotices]] <!-- Notice expired -->
 +
   }}
 +
  }}
 +
}}
 +
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 06:19, 7 September 2016

Template documentation[create]