Difference between revisions of "Template:Event infobox"

no edit summary
 
Line 1: Line 1:
<includeonly>{{#if: {{NAMESPACE}} | <!-- don't create subobj within namespace --> |
<includeonly>{{#if: {{NAMESPACE}} | <!-- don't create subobj within namespace --> |
{{#vardefine:is active|{{#ifeq:{{{active|}}}|true|true|{{#ifeq:{{{active|}}}|false|false|}}}}
{{ #if: {{{id|}}} | {{#masterdata:Event|{{{id|}}} }} }}{{#vardefine:is active|{{#ifeq:{{{active|}}}|true|true|{{#ifeq:{{{active|}}}|false|false|}}}}
}}{{#vardefine:duration array|{{{duration|}}}{{#vardefine:duration|}}
}}{{#vardefine:duration array|{{{duration|{{#var:event duration|}}}}}{{#vardefine:duration|}}
}}{{#if:{{{duration|}}}|
}}{{#if:{{{duration|{{#var:event duration|}}}}}|
   {{#vardefine:duration loop|1
   {{#vardefine:duration loop|1
}}{{#while:|{{#var:duration loop}}|
}}{{#while:|{{#var:duration loop}}|
Line 45: Line 45:
   {{#sub:{{#var:duration array}}|{{#expr:{{#pos:{{#var:duration array}}|;}}+1}}}}
   {{#sub:{{#var:duration array}}|{{#expr:{{#pos:{{#var:duration array}}|;}}+1}}}}
}}
}}
}}}}{{#ifeq:{{#var:is active|false}}|true||{{#vardefine:is active|false}}}}{{ #if: {{{id|}}} | {{#masterdata:Event|{{{id|}}} }} }}{{#subobject:event{{#vardefineecho:eventnumber|{{#expr:{{#var:eventnumber|-1}}+1}}}}
}}}}{{#ifeq:{{#var:is active|false}}|true||{{#vardefine:is active|false}}}}{{#subobject:event{{#vardefineecho:eventnumber|{{#expr:{{#var:eventnumber|-1}}+1}}}}
| Has game context = Event
| Has game context = Event
| Has Japanese name ={{{jp name|}}}
| Has Japanese name ={{{jp name|}}}
Line 54: Line 54:
| Has news link = {{#ifeq:{{#var:is active|}}|true||https://web.archive.org/web/*/|}}{{{news link|}}}
| Has news link = {{#ifeq:{{#var:is active|}}|true||https://web.archive.org/web/*/|}}{{{news link|}}}
| Has banner image = {{{banner image|}}}
| Has banner image = {{{banner image|}}}
| Has duration date = {{#var:duration|{{{duration|}}}}}
| Has duration date = {{#var:duration|{{{duration|{{#var:event duration|}}}}}}}
| Has event type = {{{type|Time-Limited}}}
| Has event type = {{{type|Time-Limited}}}
| Earliest duration = {{#var:duration earliest start}}
| Earliest duration = {{#var:duration earliest start}}