Template:Event: Difference between revisions

From A3! Wiki
Fimbulvetr (talk | contribs)
No edit summary
Tree (talk | contribs)
m cargo_query: Add field alias and update string literal quotes, in preparation for Cargo extension upgrade
 
(34 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly>===[[{{{eventname}}}]]===
<includeonly>
<div class="eventbox">
{{#ifeq: {{{type|}}} | Rerelease | [[File:2018-12 event banner.png|right|500px]] |[[File:{{Replace|{{{name_en|}}}}} event banner.png|right|500px]]}}
{{#if: {{{banner|}}} | <div class="eventbanner">[[File:{{{banner}}}|frameless|link={{{eventname}}}|{{{eventname}}}]]</div> | }}
<div class="eventinfo"><ul><li>'''Event Period:''' {{#if: {{{eventstart|}}} | {{#time: F j, Y H:i | {{{eventstart}}}}} JST |TBA}}{{#if: {{{eventend|}}} | &nbsp;to {{#time: F j, Y H:i | {{{eventend}}}}} JST |}}</li>
{{#if: {{{countdown|}}} | <li>'''Countdown:''' {{{countdown}}}</li> | }}
{{#if: {{{relatedscout|}}} | <li>'''Related Scouting:''' [[Scouting_Events#{{{relatedscout}}}|{{{relatedscout}}}]]</li>| }} {{#if: {{{relatedscout2|}}} |& [[Scouting_Events#{{{relatedscout2}}}|{{{relatedscout2}}}</li>]] | }}
<li>'''Featured:''' {{{feature}}}</li></ul></div>
</div></includeonly>


<noinclude>
=Event Information=
{{Template:Event
<b>{{{name_en|}}}</b>{{#if: {{{name_alt|}}} | , alt. '{{{name_alt|}}}' }}{{#if: {{{name_lit|}}} | , lit. '{{{name_lit|}}}' }} {{#if: {{{name_jp|}}} |({{{name_jp}}} <i>{{{name_ro|}}}</i>)|}} is event number {{{number}}} in A3! overall. {{#if: {{{extra|}}}|{{{extra|}}}|}}
|banner=Niboshi event banner.png
|eventname=Summer Troupe's Second Play The Adventure for Sardines
|eventstart=
|eventend=
|countdown=
|relatedscout=Sunday With a Cat
|feature=SSR [[Yuki Rurikawa]], SR [[Muku Sakisaka]], [[Character Hub#Summer Troupe|Summer Troupe]]
}}


==Documentation==
'''Event Type:''' [[{{{type|}}} Events|{{{type|}}} Event]]<br>
<pre>===[[{{{eventname}}}]]===
'''Event Period:''' {{#time: F j, Y H:i | {{{start}}} }} JST to {{#time: F j, Y H:i | {{{end}}} }} JST<br> {{#if: {{{theme2|}}} | '''Theme Songs:''' [[{{{theme|}}}]], [[{{{theme2|}}}]]<br> | {{#if: {{{theme|}}} | '''Theme Song:''' [[{{{theme|}}}]]<br>|}} }}
<div class="eventbox">
'''Event Scout:''' {{#cargo_query:tables= Scout|fields=CONCAT('[[Scouting Events','#',Scout.name_en,'|',Scout.name_en,']]')=Name|where=Scout.event HOLDS '{{{name_en|}}}'|order by=Scout.number }}
{{#if: {{{banner|}}} | <div class="eventbanner">[[File:{{{banner}}}|frameless|link={{{eventname}}}|{{{eventname}}}]]</div> | }}
{{#cargo_query:tables=Scout,Cards,Card_Files|join on=Cards.cardset = Scout.name_en, Cards.number = Card_Files.number|fields=Card_Files.icon1, CONCAT(Cards.rarity, ' ', Cards.chara) = Caption, CONCAT('Cards/', Cards.chara, '/', Cards.cardname) = Page Link|where=Scout.event HOLDS '{{{name_en|}}}' |format=gallery|mode=nolines|image width=100px|show bytes=0|show dimensions=0|show filename=0|alt field=Caption|caption field=Caption|link field=Page Link|default=|order by=Cards.number}}
<div class="eventinfo"><ul><li>'''Event Period:''' {{#if: {{{eventstart|}}} | {{#time: F j, Y H:i | {{{eventstart}}}}} JST |TBA}}{{#if: {{{eventend|}}} | &nbsp;to {{#time: F j, Y H:i | {{{eventend}}}}} JST |}}</li>
'''Event Cards:''' {{#ifeq: {{#cargo_query:tables=Cards,Card_Files|join on=Cards.number = Card_Files.number|fields=IFNULL(Card_Files.icon1,Card_Files.icon2)|where=Cards.cardset='{{{name_en|}}}'|default=N/A}} | N/A | N/A | {{#tag:gallery|{{Featured Cards|{{{name_en}}}}}|mode=nolines|widths=100px}} }}<br>
{{#if: {{{countdown|}}} | <li>'''Countdown:''' {{{countdown}}}</li> | }}
'''Title Achievements:''' {{#ifeq: {{#cargo_query:tables=Event,Titles|join on=Event.name_en = Titles.event|fields=CONCAT('[[',title,'.png]]')=TitleImage|where=Titles.event ='{{{name_en|}}}'|default=N/A}} | N/A | N/A | {{#cargo_query:tables=Event,Titles|join on=Event.name_en = Titles.event|fields=CONCAT('[[File:',title,'.png|180px]] ',title)=TitleImage|where=Titles.event ='{{{name_en|}}}'|order by=Titles.number ASC|default=N/A}} }}<br>
{{#if: {{{relatedscout|}}} | <li>'''Related Scouting:''' [[Scouting_Events#{{{relatedscout}}}|{{{relatedscout}}}]]</li>| }} {{#if: {{{relatedscout2|}}} |& [[Scouting_Events#{{{relatedscout2}}}|{{{relatedscout2}}}</li>]] | }}
'''Previous Event:''' {{#cargo_query:tables=Event|fields=CONCAT('[[',name_en,']]')=Name|where=number={{{number|}}}-1}}<br>
<li>'''Featured:''' {{{feature}}}</li></ul></div>
'''Next Event:''' {{#cargo_query:tables=Event|fields=CONCAT('[[',name_en,']]')=Name|where=number={{{number|}}}+1|default=N/A}}<br>
</div></pre>
[[Category:Events]] [[Category:{{{type|}}} Events]] {{#switch: {{{type|}}} | Troupe = [[Category: {{{troupe|}}} Events]] | }}
 
Blank Template:
<pre>{{Event
|banner=
|eventname=
|eventstart=
|eventend=
|relatedscout=
|featured=
}}
<gallery mode=nolines style="font-size: 0.9em; margin-bottom: 3em;">
</gallery>
{{clear}}
</pre>
 
Example of filled template:
<pre>{{Event
|banner=Niboshi event banner.png
|eventname=Summer Troupe's Second Play The Adventure for Sardines
|eventstart=2017/4/14 16:00
|eventend=April 24th 2017 13:59
|relatedscout=Sunday With a Cat
|feature=SSR [[Yuki Rurikawa]], SR [[Muku Sakisaka]], [[Character Hub#Summer Troupe|Summer Troupe]]
}}
<gallery mode=nolines style="font-size: 0.9em; margin-bottom: 3em;">
File:(Willful Cat) Yuki Action SSR.png|SSR [[Yuki Rurikawa]]
File:(Resolute Kitty) Muku Action SR.png|SR [[Muku Sakisaka]]
File:(The Adventure for Sardines) Tenma Serious N.png|N [[Tenma Sumeragi]]
File:(The Adventure for Sardines) Yuki Comedy N.png|N [[Yuki Rurikawa]]
File:(The Adventure for Sardines) Kazunari Comedy N.png|N [[Kazunari Miyoshi]]
</gallery>
{{clear}}
{{clear}}
</pre>
</includeonly>
 
If there's no related scouting event leave blank or remove the field. If we don't have images for the cards yet, omit the gallery portion but leave in <nowiki>{{clear}}</nowiki>.
</noinclude>

Latest revision as of 02:25, 31 December 2024