User:Lariat2301/SandBox3: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
(New page: <noinclude>See: Sand Pit, Sand Box, SandBox2 and SandBox3. __TOC__</noincl...)
 
No edit summary
Line 1: Line 1:
<noinclude>See: [[User:Lariat2301/SandPit|Sand Pit]], [[User:Lariat2301/SandBox|Sand Box]], [[User:Lariat2301/SandBox2|SandBox2]] and [[User:Lariat2301/SandBox2|SandBox3]].
<noinclude>See: [[User:Lariat2301/SandPit|Sand Pit]], [[User:Lariat2301/SandBox|Sand Box]], [[User:Lariat2301/SandBox2|SandBox2]] and [[User:Lariat2301/SandBox2|SandBox3]].
__TOC__</noinclude>
 
Our goal is to create the simplest template which, when aimed at an existing DangerReport, produces a tiny color-coded box signaling that building's latest known condition.
 
A later goal will be to include a hover tooltip that provides additional details, such as:
* the name and coordinates of the building;
* the date of the report.
 
The current version still depends on various StatusMap templates, such as [[Template:StatusMap unknown]] and [[Template:StatusMap safe]]. There might be better ways of doing this, such as with a [[Template:Switch]] statement. I found an example if its usage at the right side, [[Template:UDGame/Guide#.C2.A0.C2.A0.C2.A0.C2.A0Random|here]].
 
The current source:
<pre>
{| style="width:7px; height:7px; background:{{StatusMap {{{status|unknown}}}}}" | <!-- Hah! Nothing in the box! -->
|}
</pre>
The current default is "unknown", thus the result without a setting for the variable <nowiki>{{{status}}}</nowiki> will be the gray box below:
</noinclude>
{| style="width:7px; height:7px; background:{{StatusMap {{{status|unknown}}}}}" | <!-- Hah! Nothing in the box! -->
{| style="width:7px; height:7px; background:{{StatusMap {{{status|unknown}}}}}" | <!-- Hah! Nothing in the box! -->
|}
|}

Revision as of 16:34, 11 June 2009

See: Sand Pit, Sand Box, SandBox2 and SandBox3.

Our goal is to create the simplest template which, when aimed at an existing DangerReport, produces a tiny color-coded box signaling that building's latest known condition.

A later goal will be to include a hover tooltip that provides additional details, such as:

  • the name and coordinates of the building;
  • the date of the report.

The current version still depends on various StatusMap templates, such as Template:StatusMap unknown and Template:StatusMap safe. There might be better ways of doing this, such as with a Template:Switch statement. I found an example if its usage at the right side, here.

The current source:

{| style="width:7px; height:7px; background:{{StatusMap {{{status|unknown}}}}}" | <!-- Hah! Nothing in the box! -->
|}

The current default is "unknown", thus the result without a setting for the variable {{{status}}} will be the gray box below: