Difference between revisions of "EventBob"
From Sega Retro
Scarred Sun (talk | contribs) |
|||
(20 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<span style="display:none;"><includeonly>{{#cargo_store: | <span style="display:none;"><includeonly>{{#cargo_store: | ||
_table = events | _table = events | ||
− | | name={{#titleparts:{{PAGENAME}}}} | + | | name={{FormatSQL|{{#titleparts:{{PAGENAME}}}}}} |
| startdate={{stripref|{{#sub:{{{startdate|}}}|0|10}}}} | | startdate={{stripref|{{#sub:{{{startdate|}}}|0|10}}}} | ||
| enddate={{stripref|{{#sub:{{{enddate|}}}|0|10}}}} | | enddate={{stripref|{{#sub:{{{enddate|}}}|0|10}}}} | ||
− | | location={{{location|}}} | + | | location={{stripref|{{{location|}}}}} |
− | | attendance={{stripref|{{{attendance|}}}}} | + | | attendance={{stripref|{{{attendance|}}}}}{{ |
+ | #if:{{{relatedto|}}}|{{RelationStore|{{FormatSQL|{{#titleparts:{{PAGENAME}}}}}}|{{{relatedto|}}}|event}}|}} | ||
}}</includeonly><noinclude>{{#cargo_declare: | }}</includeonly><noinclude>{{#cargo_declare: | ||
_table = events | _table = events | ||
Line 13: | Line 14: | ||
| location=text | | location=text | ||
| attendance=integer | | attendance=integer | ||
+ | | organizer=text | ||
+ | | licensor=text | ||
}}</noinclude></span> | }}</noinclude></span> | ||
<div itemscope itemtype='http://schema.org/Event'> | <div itemscope itemtype='http://schema.org/Event'> | ||
Line 46: | Line 49: | ||
| headline=yes | | headline=yes | ||
| align=center | | align=center | ||
+ | }} | ||
+ | {{BobRowPlus | ||
+ | | if={{{game|}}} | ||
+ | | title=Game | ||
+ | | content=''[[{{{game|}}}]]'' ([[{{Code2Format|{{{console|}}}}}]]){{#cargo_store: | ||
+ | _table = gameevents | ||
+ | | game={{{game|}}} | ||
+ | | event={{#titleparts:{{PAGENAME}}}} | ||
+ | | console={{{console|}}} | ||
+ | | ref= | ||
+ | }} | ||
}} | }} | ||
{{BobRowPlus | {{BobRowPlus | ||
| if={{{startdate|}}} | | if={{{startdate|}}} | ||
| title=Date | | title=Date | ||
− | | content=<span itemprop="startDate">{{{startdate}}}</span> {{#if:{{{enddate|}}}|& | + | | content=<span itemprop="startDate">{{{startdate}}}</span> {{#if:{{{enddate|}}}|– <span itemprop="endDate">{{{enddate}}}</span>}} |
}} | }} | ||
{{BobRowPlus | {{BobRowPlus | ||
| if={{{location|}}} | | if={{{location|}}} | ||
| title=Location | | title=Location | ||
− | | content=<span itemprop="location" itemscope itemtype="https://schema.org/Place">{{{location|}}}</span> | + | | content=<span itemprop="location" itemscope itemtype="https://schema.org/Place">{{CommonEventLocation|{{{location|}}}}}</span> |
− | }} | + | }} |
− | {{BobRowPlus | + | {{BobRowPlus |
− | | if={{{ | + | | if={{{attendance|}}} |
− | | title= | + | | title=Attendance |
− | | content= | + | | content={{{attendance|}}} |
}} | }} | ||
{{BobRowPlus | {{BobRowPlus | ||
Line 67: | Line 81: | ||
| content=<span itemprop="organizer">{{{organizer|}}}</span> | | content=<span itemprop="organizer">{{{organizer|}}}</span> | ||
}} | }} | ||
+ | {{BobRowPlus | ||
+ | | if={{{licensor|}}} | ||
+ | | title=Licensor | ||
+ | | content=<span itemprop="licensor">{{{licensor|}}}</span> | ||
}} | }} | ||
+ | {{BobRowPlus | ||
+ | | if={{{prev|}}}{{{next|}}} | ||
+ | | title= | ||
+ | | content={{BobPrevNext|{{{prev|}}}|{{{next|}}}}} | ||
+ | {{BobPrevNext|{{{prev2|}}}|{{{next2|}}}}} | ||
+ | {{BobPrevNext|{{{prev3|}}}|{{{next3|}}}}} | ||
+ | {{BobPrevNext|{{{prev4|}}}|{{{next4|}}}}} | ||
+ | }} | ||
+ | }}{{#if:{{NAMESPACE}}||{{#ifeq:{{lc:{{{location|}}}}}|online|[[Category:Online events]]|{{#vardefine:country|{{CountryCheck|{{CommonEventLocation|{{{location|}}}}}}}}} | ||
+ | {{#ifeq:{{#var:country}}|unknown|[[Category:Events in unknown countries]]|[[Category:Events in {{#var:country}}]]}}}}}} | ||
</div> | </div> | ||
<div style="display:none;"> | <div style="display:none;"> | ||
Line 88: | Line 116: | ||
| location= | | location= | ||
| attendance= | | attendance= | ||
+ | | organizer= | ||
+ | | licensor= | ||
+ | | prev= | ||
+ | | next= | ||
}} | }} | ||
</pre> | </pre> | ||
+ | |||
+ | Note that some locations can be detected automatically, see [[Template:CommonEventLocation]] for a list. | ||
[[Category:Breakout box templates]]</noinclude> | [[Category:Breakout box templates]]</noinclude> |
Latest revision as of 12:03, 11 October 2023
Usage
This template is to be used on articles about video game events. Place the following at the top of a page:
{{EventBob | logo= | eventimage= | name= | startdate= | enddate= | location= | attendance= | organizer= | licensor= | prev= | next= }}
Note that some locations can be detected automatically, see Template:CommonEventLocation for a list.