Difference between revisions of "Template:Event preview infobox"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
Line 62: Line 62:
</tr>
</tr>
{{#vardefine:duration array|{{#show:{{#var:event subobj}}|?Has duration date}}}}{{#vardefine:duration loop|1}}{{#vardefine:duration loop|1}}{{#while:|{{#var:duration loop}}|
{{#vardefine:duration array|{{#show:{{#var:event subobj}}|?Has duration date}}}}{{#vardefine:duration loop|1}}{{#vardefine:duration loop|1}}{{#while:|{{#var:duration loop}}|
{{#vardefine:duration array piece|{{#sub:{{#var:duration array}}|0|{{#pos:{{#var:duration array}}|;}}}}}}
{{#vardefine:duration array piece|{{#sub:{{#var:duration array}}|0|{{#pos:{{#var:duration array}}|;}}}}}}{{#vardefine:duration array piece start|{{#explode:{{#explode:{{#var:duration array piece}}|!|1}}|->|0}}}}{{#vardefine:duration array piece end|{{#explode:{{#explode:{{#var:duration array piece}}|!|1}}|->|1}}}}
<tr>
<tr>
<td><b>{{#explode:{{#var:duration array piece}}|!|0}}</b>{{#vardefineecho:duration title tag|{{#ifexpr:{{#time: U|now}}>{{#time: U|{{#explode:{{#explode:{{#var:duration array piece}}|!|1}}|->|0}}}} and {{#time: U|now}}<{{#time: U|{{#explode:{{#explode:{{#var:duration array piece}}|!|1}}|->|1}}}}|b|s}}}}
<td><b>{{#explode:{{#var:duration array piece}}|!|0}}</b>
</td>
</td>
<td>From {{#explode:{{#explode:{{#var:duration array piece}}|!|1}}|->|0}} until {{#explode:{{#explode:{{#var:duration array piece}}|!|1}}|->|1}}</td>
<td>From {{#var:duration array piece start}} until {{#var:duration array piece end}}</td>
</tr>
</tr>
{{#if:{{#pos:{{#var:duration array}}|;}}||{{#vardefine:duration loop|}}}}{{#vardefine:duration array|{{#sub:{{#var:duration array}}|{{#expr:{{#pos:{{#var:duration array}}|;}}+1}}}}}}
{{#if:{{#pos:{{#var:duration array}}|;}}||{{#vardefine:duration loop|}}}}{{#vardefine:duration array|{{#sub:{{#var:duration array}}|{{#expr:{{#pos:{{#var:duration array}}|;}}+1}}}}}}

Revision as of 05:38, 13 July 2018

Description

This template displays.

Usage

{{Event preview infobox
| en name = 
| jp name =
| banners = 
| floats =
}}

Parameters

en name
English name of event
jp name
Japanese name of event (optional if en name is provided; required if not).
banners
Number of banners to show; defaults to 1. Provide 0 to show all.
floats
Determines if it should float to the right; only "true" enables it.

Examples

{{Event preview infobox
| en name = Honorless Great Summer Festival Struggle
| banners = 2
}}
Honorless Great Summer Festival Struggle
F7fd7992ba9dfb001d4e9444dbfc4662.jpg
Durations
Gacha From 2018-07-05T18:00:00+09:00 until 2018-08-06T23:59:00+09:00
Event Main Quest From 2018-07-09T00:00:00+09:00 until 2018-08-06T23:59:00+09:00
Event Free Quest From 2018-07-09T00:00:00+09:00 until 2018-07-30T23:59:00+09:00
Bonus Quests From 2018-08-02T00:00:00+09:00 until 2018-08-06T23:59:00+09:00