User:Lariat2301/SandBox2: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 53: Line 53:
[[Image:mall-{{{status|unknown}}}-small.jpg]]
[[Image:mall-{{{status|unknown}}}-small.jpg]]
<pre>
<pre>
{| style="background:#EEEEFF; width:500px; height:300px; border: solid 2px #BBBBEE; -moz-border-radius:18px" cellspacing="2px" cellpadding= "0px""
{| style="width:7px; height:7px; background:{{StatusMap {{{status|unknown}}}}}" | <!-- Hah! Nothing in the box! -->
| style="text-align:center" colspan=4 | '''Building Danger Level Colors'''
|-
| width=32px |
{| style="width:7px; height:7px; background:{{StatusMap {{{status|unknown}}}}}" align=center |
|}
|}
| '''Safe'''
<small>Less than 15 zombies outside.</small>
}
</pre>
</pre>
{| style="background:#EEEEFF; width:500px; height:300px; border: solid 2px #BBBBEE; -moz-border-radius:18px" cellspacing="2px" cellpadding= "0px""
{| style="width:7px; height:7px; background:{{StatusMap {{{status|unknown}}}}}" | <!-- Hah! Nothing in the box! -->
| style="text-align:center" colspan=4 | '''Building Danger Level Colors'''
|-
| width=32px |
{| style="width:7px; height:7px; background:{{StatusMap {{{status|unknown}}}}}" align=center |
|}
|}
| '''Safe'''
<small>Less than 15 zombies outside.</small>
}

Revision as of 16:10, 11 June 2009

With normal transclusion:

{{CURRENTDAY}}-{{CURRENTMONTHNAME}}-{{CURRENTYEAR}} {{CURRENTTIME}}

produces...

8-January-2025 22:41

With subclusion:

{{subst:CURRENTDAY}}-{{subst:CURRENTMONTHNAME}}-{{subst:CURRENTYEAR}} {{subst:CURRENTTIME}}

produces...

11-June-2009 15:54

But in the latter case, the actual source of this page has been changed permanently.

Try it: edit this page and replace the date-and-time information shown under
subclusion with the protected version just above it. Then save the page and reopen it.

The question is: can this be used to automate wiki-readable timestamps?

Imagine that a subclusion'd version of the month and date were in a template in such a way that they automatically time-stamped a DangerReport when a user updated it. Comparisons between the 'current' month and date and those so timestamped could be used to automate aging of DangerReports... or at least I think so.

Checking basic timestamping: {{CURRENTTIMESTAMP}}? Is this undefined?: 20250108224141

While we're at it, lets take a look at some of the other cool stuff from [1]:
{{LOCALTIME}}? Is this undefined?: 22:41
{{NUMBEROFUSERS}}? Is this undefined?: 51,340
{{NUMBEROFACTIVEUSERS}}? Is this undefined?: 24
{{NUMBEROFADMINS}}? Is this undefined?: 7
This one might be cool: __NEWSECTIONLINK__? If this works, there should be a "+" at the top of this page for new sections.

Yup, that one works.

Ah, what is the mediawiki version of the UD wiki? {{CURRENTVERSION}}: 1.39.11
Finally, anything the UD wiki can do specially? It'll be listed on the Special:Version page.



Other tools to be used in this: {{PREVIOUSMONTH}} isn't implemented here (undefined: Template:PREVIOUSMONTH) but this is what generates it:

{{#expr:(({{CURRENTMONTH}}+10)mod 12)+1}}

Does it work? Only if our wiki has implemented the math functions... Here: {{#expr:((01+10)mod 12)+1}} Nope. Doesn't work. What is missing comes from here.



OK:

[[Image:mall-{{{status|unknown}}}-small.jpg]]

Mall-unknown-small.jpg

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