Difference between revisions of "Template:User time zone"

From Ouroboros Portal
Jump to: navigation, search
(userbox stolen from wikipedia.)
 
m (9 revisions)
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
<div style="float:left;border:solid #ccc 1px;margin: 1px;">
+
<div style="float: left; border: solid #4169E1 1px; margin: 1px;">
{| cellspacing="0" style="width:238px;background: #fff;"
+
{| cellspacing="0" style="width: 238px; color: #000000; background: #D3D3D3;"
| style="width:45px;height:45px;background:#ccc;text-align:center;font-size:14pt;color:font color;"| {{#switch:{{{2}}}|watch=[[Image:Noia 64 apps clock.png{{!}}46px]]|clock=[[Image:Wall clock.jpg{{!}}46px]]|alarm=[[Image:Windup alarm clock.jpg{{!}}46px]]|{{{1}}}}}
+
| style="width: 45px; height: 45px; background: white; text-align: center;" |{{#if:{{{3|}}}|{{{3}}}|'''{{{1}}}'''}}
| style="font-size: 8pt; padding: 4pt; line-height: 1.25em; color: font color;" | This user's time zone is '''{{#if:{{{3|}}}|[[{{{3}}}|{{{1}}}]]|[[{{{1}}}]]}}'''.
+
| style="font-size: 8pt; padding: 4pt; line-height: 1.25em;" | This user's time zone is '''[[Wikipedia:{{#if:{{{2|}}}|{{{2}}}|{{{1}}} }}|{{{1}}}]]'''.
|}</div><noinclude>{{clear}}
+
|}</div><noinclude>{{clr}}
----
+
 
This template is meant to replace all other time zone related templates. Please see the usage to create your template.
+
=Notes=
==Usage==
+
Takes 1, 2, or 3 parameters.
The first variable of the template is required and can be UTC with or without an offset, GMT, or your time zone's abbreviation. The second variable is the image you wish to use. There are three images to from which to choose, or you can leave it blank, and your time zone's abbreviation will be displayed where the image would be. It is recommended that you use an image with a time zone with an offset. The third variable is for the link for the timezone abbreviation to point to - by default, this is the abbreviation itself, which is usually a disambiguation. The old syntax using '''<code><nowiki>time zone{{!}}time zone abbreviation</nowiki></code>''' in the first argument is still currently supported, but requires that an image be used.
+
==one==
===Samples===
+
If only one parameter is used, then this is the output.
 
{|
 
{|
!Template output
+
! wikicode
!Stand alone code
+
! resulting code
![[Template:Babel|Babel box]] code
+
! output
 
|-
 
|-
|{{User time zone|UTC}}
+
| <pre>{{User time zone|UTC}}</pre>
|<pre>{{User time zone|UTC}}</pre>
+
| <nowiki>'''UTC''' This user's time zone is '''[[Wikipedia:UTC|UTC]]'''.</nowiki>
|<pre>|time zone{{!}}UTC|</pre>
+
| {{User time zone|UTC}}
 +
|}
 +
==two==
 +
If two parameters are used, the the link text is modified, useful when MDT and EST don't redirect immediately to the wikipedia articles.
 +
{|
 +
! wikicode
 +
! resulting code
 +
! output
 
|-
 
|-
|{{User time zone|GMT}}
+
| <pre>{{User time zone|MDT|Mountain Time Zone}}</pre>
|<pre>{{User time zone|GMT}}</pre>
+
| <nowiki>'''MDT''' This user's time zone is '''[[Wikipedia:Mountain Time Zone|MDT]]'''.</nowiki>
|<pre>|time zone{{!}}GMT|</pre>
+
| {{User time zone|MDT|Mountain Time Zone}}
 +
|}
 +
==three==
 +
The third parameter is entirely optional, will replace the large bold text to the left. (bold caused by wikimarkup's apostrophes, using third parameter removes them)
 +
{|
 +
! wikicode
 +
! resulting code
 +
! output
 
|-
 
|-
|{{User time zone|EST}}
+
| <pre>{{User time zone|MDT|Mountain Time Zone|[[Image:IO Accuracy.png]]}}</pre>
|<pre>{{User time zone|EST}}</pre>
+
| <nowiki>'''[[Image:IO Accuracy.png]]''' This user's time zone is '''[[Wikipedia:Mountain Time Zone|MDT]]'''.</nowiki>
|<pre>|time zone{{!}}EST|</pre>
+
| {{User time zone|MDT|Mountain Time Zone|[[Image:IO Accuracy.png]]}}
|-
+
|}[[Category:Userbox Templates|{{PAGENAME}}]]</noinclude>
|{{User time zone|UTC-5}}
+
|<pre>{{User time zone|UTC-5}}</pre>
+
|<pre>|time zone{{!}}UTC-5|</pre>
+
|-
+
|{{User time zone|UTC+0:20}}
+
|<pre>{{User time zone|UTC+0:20}}</pre>
+
|<pre>|time zone{{!}}UCT+0:20|</pre>
+
|-
+
|{{User time zone|UTC|watch}}
+
|<pre>{{User time zone|UTC|watch}}</pre>
+
|<pre>|time zone{{!}}UTC{{!}}watch|</pre>
+
|-
+
|{{User time zone|GMT|watch}}
+
|<pre>{{User time zone|GMT|watch}}</pre>
+
|<pre>|time zone{{!}}GMT{{!}}watch|</pre>
+
|-
+
|{{User time zone|EST|watch}}
+
|<pre>{{User time zone|EST|watch}}</pre>
+
|<pre>|time zone{{!}}EST{{!}}watch|</pre>
+
|-
+
|{{User time zone|UTC-5|watch}}
+
|<pre>{{User time zone|UTC-5|watch}}</pre>
+
|<pre>|time zone{{!}}UTC-5{{!}}watch|</pre>
+
|-
+
|{{User time zone|UTC+0:20|watch}}
+
|<pre>{{User time zone|UTC+0:20|watch}}</pre>
+
|<pre>|time zone{{!}}UTC+0:20{{!}}watch|</pre>
+
|-
+
|{{User time zone|UTC|clock}}
+
|<pre>{{User time zone|UTC|clock}}</pre>
+
|<pre>|time zone{{!}}UTC{{!}}clock|</pre>
+
|-
+
|{{User time zone|GMT|clock}}
+
|<pre>{{User time zone|GMT|clock}}</pre>
+
|<pre>|time zone{{!}}GMT{{!}}clock|</pre>
+
|-
+
|{{User time zone|EST|clock}}
+
|<pre>{{User time zone|EST|clock}}</pre>
+
|<pre>|time zone{{!}}EST{{!}}clock|</pre>
+
|-
+
|{{User time zone|UTC-5|clock}}
+
|<pre>{{User time zone|UTC-5|clock}}</pre>
+
|<pre>|time zone{{!}}UTC-5{{!}}clock|</pre>
+
|-
+
|{{User time zone|UTC+0:20|clock}}
+
|<pre>{{User time zone|UTC+0:20|clock}}</pre>
+
|<pre>|time zone{{!}}UTC+0:20{{!}}clock|</pre>
+
|-
+
|{{User time zone|UTC|alarm}}
+
|<pre>{{User time zone|UTC|alarm}}</pre>
+
|<pre>|time zone{{!}}UTC{{!}}|alarm|</pre>
+
|-
+
|{{User time zone|GMT|alarm}}
+
|<pre>{{User time zone|GMT|alarm}}</pre>
+
|<pre>|time zone{{!}}GMT{{!}}alarm|</pre>
+
|-
+
|{{User time zone|EST|alarm}}
+
|<pre>{{User time zone|EST|alarm}}</pre>
+
|<pre>|time zone{{!}}EST{{!}}alarm|</pre>
+
|-
+
|{{User time zone|UTC-5|alarm}}
+
|<pre>{{User time zone|UTC-5|alarm}}</pre>
+
|<pre>|time zone{{!}}UTC-5{{!}}alarm|</pre>
+
|-
+
|{{User time zone|UTC+0:20|alarm}}
+
|<pre>{{User time zone|UTC+0:20|alarm}}</pre>
+
|<pre>|time zone{{!}}UTC+0:20{{!}}alarm|</pre>
+
|}
+
 
+
===Offsets===
+
'''Available [[UTC]] offsets:''' [[UTC+14|+14]], [[UTC+13:45|+13:45]], [[UTC+13|+13]], [[UTC+12:45|+12:45]], [[UTC+12|+12]], [[UTC+11:30|+11:30]], [[UTC+11|+11]], [[UTC+10:30|+10:30]], [[UTC+10|+10]], [[UTC+9:30|+9:30]], [[UTC+9|+9]], [[UTC+8:45|+8:45]], [[UTC+8:30|+8:30]], [[UTC+8|+8]], [[UTC+7:30|+7:30]], [[UTC+7:20|+7:20]], [[UTC+7|+7]], [[UTC+6:30|+6:30]], [[UTC+6|+6]], [[UTC+5:45|+5:45]], [[UTC+5:40|+5:40]], [[UTC+5:30|+5:30]], [[UTC+5|+5]], [[UTC+4:51|+4:51]], [[UTC+4:30|+4:30]], [[UTC+4|+4]], [[UTC+3:30|+3:30]], [[UTC+3|+3]], [[UTC+2|+2]], [[UTC+1|+1]], [[UTC+0:30|+0:30]], [[UTC+0:20|+0:20]], [[UTC-0:25|-0:25]], [[UTC-1|-1]], [[UTC-2|-2]], [[UTC-2:30|-2:30]], [[UTC-3|-3]], [[UTC-3:30|-3:30]], [[UTC-4|-4]], [[UTC-5|-5]], [[UTC-6|-6]], [[UTC-7|-7]], [[UTC-8|-8]], [[UTC-9|-9]], [[UTC-9:30|-9:30]], [[UTC-10|-10]], [[UTC-11|-11]], [[UTC-12|-12]]
+
[[Category:Time zone user templates| ]][[Category:User templates using ParserFunctions|Time zone]]</noinclude>
+

Latest revision as of 04:04, 26 February 2009

{{{1}}} This user's time zone is [[Wikipedia:{{{1}}}|{{{1}}}]].

Notes

Takes 1, 2, or 3 parameters.

one

If only one parameter is used, then this is the output.

wikicode resulting code output
{{User time zone|UTC}}
'''UTC''' This user's time zone is '''[[Wikipedia:UTC|UTC]]'''.
UTC This user's time zone is UTC.

two

If two parameters are used, the the link text is modified, useful when MDT and EST don't redirect immediately to the wikipedia articles.

wikicode resulting code output
{{User time zone|MDT|Mountain Time Zone}}
'''MDT''' This user's time zone is '''[[Wikipedia:Mountain Time Zone|MDT]]'''.
MDT This user's time zone is MDT.

three

The third parameter is entirely optional, will replace the large bold text to the left. (bold caused by wikimarkup's apostrophes, using third parameter removes them)

wikicode resulting code output
{{User time zone|MDT|Mountain Time Zone|[[Image:IO Accuracy.png]]}}
'''[[Image:IO Accuracy.png]]''' This user's time zone is '''[[Wikipedia:Mountain Time Zone|MDT]]'''.
IO Accuracy.png This user's time zone is MDT.