Template:New: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Jeremy Linden (talk | contribs)
No edit summary
Jeremy Linden (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude>{{#ifexpr:{{CURRENTTIMESTAMP}} < {{{expiry|99999999}}}*1000000 | [[File:New_tag.png|20px]] | }}</onlyinclude>
<onlyinclude>{{#ifexpr:{{CURRENTTIMESTAMP}} < {{{expiry|99999999}}}*1000000 | [[File:New_tag.png|20px|link=]] | }}</onlyinclude>


=== Usage ===
=== Usage ===
Displays a [[File:New_tag.png|20px]] icon if the current date is before the expiry date defined in the <code>expiry</code> template parameter.
Displays a [[File:New_tag.png|20px|link=]] icon if the current date is before the expiry date defined in the <code>expiry</code> template parameter.


The expiry date parameter is a single number defined in the form of YYYYMMDD.  For example, an expiry date of <code>November 4, 2012</code> would be <code>20121104</code>.
The expiry date parameter is a single number defined in the form of YYYYMMDD.  For example, an expiry date of <code>November 4, 2012</code> would be <code>20121104</code>.
Line 9: Line 9:


==== Example ====
==== Example ====
To create a "NEW!" tag that expires on August 18, 2014, insert the following code into your document:
To create a [[File:New_tag.png|20px|link=]] tag that expires on August 18, 2014, insert the following code into your document:


<code><nowiki>{{New|expiry=20140818}}</nowiki></code>
<code><nowiki>{{New|expiry=20140818}}</nowiki></code>

Latest revision as of 15:14, 30 May 2013

Usage

Displays a icon if the current date is before the expiry date defined in the expiry template parameter.

The expiry date parameter is a single number defined in the form of YYYYMMDD. For example, an expiry date of November 4, 2012 would be 20121104.

If no expiry date is provided, expiry defaults to 99999999, effectively negating an expiry date for the display of the tag.

Example

To create a tag that expires on August 18, 2014, insert the following code into your document:

{{New|expiry=20140818}}