Difference between revisions of "EventBob"

From Sega Retro

m (Dates ranges are marked with en dashes; not sure how I missed this before)
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
<span style="display:none;"><includeonly>{{#cargo_store:
 +
_table = events
 +
| name={{#titleparts:{{PAGENAME}}}}
 +
| startdate={{stripref|{{#sub:{{{startdate|}}}|0|10}}}}
 +
| enddate={{stripref|{{#sub:{{{enddate|}}}|0|10}}}}
 +
| location={{{location|}}}
 +
| attendance={{stripref|{{{attendance|}}}}}
 +
}}</includeonly><noinclude>{{#cargo_declare:
 +
_table = events
 +
| name=text
 +
| startdate=text
 +
| enddate=text
 +
| location=text
 +
| attendance=integer
 +
}}</noinclude></span>
 +
<div itemscope itemtype='http://schema.org/Event'>
 +
<meta itemprop="name" content="{{PAGENAME}}">
 +
<meta itemprop="image" content="{{filepath:{{{eventimage}}}}}">
 
{{BobTablePlus|
 
{{BobTablePlus|
 
{{BobRowPlus
 
{{BobRowPlus
| if={{{logos|}}}
+
| if={{{logo|}}}
 +
| content=[[File:{{{logo}}}|320x100px]]
 
| align=center
 
| align=center
| content={{{logos|}}}
 
 
}}
 
}}
 
{{BobRowPlus
 
{{BobRowPlus
 
| if={{{eventimage|}}}
 
| if={{{eventimage|}}}
 
| align=center
 
| align=center
| default=[[File:Notavailable.svg]]
+
| default={{#ifeq:{{{noeventimage|}}}|yes||[[File:Notavailable.svg]]}}
 
| content={{#if: {{{eventimage2|}}}
 
| content={{#if: {{{eventimage2|}}}
 
| {{tabs
 
| {{tabs
Line 19: Line 37:
 
| tabliststyle=margin:2px;
 
| tabliststyle=margin:2px;
 
}}
 
}}
| [[File:{{{eventimage}}}|320x240px]]
+
| {{#ifeq:{{{noeventimage|}}}|yes||[[File:{{{eventimage}}}|320x240px]]}}
 
}}
 
}}
 
}}
 
}}
Line 32: Line 50:
 
| if={{{startdate|}}}
 
| if={{{startdate|}}}
 
| title=Date
 
| title=Date
| content={{{startdate}}} {{#if:{{{enddate|}}}|&mdash; {{{enddate}}}}}
+
| content=<span itemprop="startDate">{{{startdate}}}</span> {{#if:{{{enddate|}}}|&ndash; <span itemprop="endDate">{{{enddate}}}</span>}}
 
}}
 
}}
 
{{BobRowPlus
 
{{BobRowPlus
 
| if={{{location|}}}
 
| if={{{location|}}}
 
| title=Location
 
| title=Location
| content={{{location|}}}
+
| content=<span itemprop="location" itemscope itemtype="https://schema.org/Place">{{{location|}}}</span>
 +
}}
 +
{{BobRowPlus
 +
| if={{{attendance|}}}
 +
| title=Attendance
 +
| content={{{attendance|}}}
 
}}
 
}}
 
{{BobRowPlus
 
{{BobRowPlus
| if={{{attendance|}}}
+
| if={{{organizer|}}}
| title=Attendance
+
| title=Organizer
| content={{{attendance|}}}
+
| content=<span itemprop="organizer">{{{organizer|}}}</span>
 +
}}
 
}}
 
}}
}}<noinclude>
+
</div>
 +
<div style="display:none;">
 +
{{#seo:
 +
|image={{filepath:{{{eventimage}}}}}
 +
|site_name=Sega Retro
 +
|locale=en_GB
 +
}}</div>
 +
<noinclude>
 
==Usage==
 
==Usage==
 
This template is to be used on articles about video game events. Place the following at the top of a page:
 
This template is to be used on articles about video game events. Place the following at the top of a page:
Line 50: Line 81:
 
<pre>
 
<pre>
 
{{EventBob
 
{{EventBob
| logos=
+
| logo=
 
| eventimage=
 
| eventimage=
 
| name=
 
| name=
Line 57: Line 88:
 
| location=
 
| location=
 
| attendance=
 
| attendance=
 +
| organizer=
 
}}
 
}}
 
</pre>
 
</pre>
  
 
[[Category:Breakout box templates]]</noinclude>
 
[[Category:Breakout box templates]]</noinclude>

Revision as of 11:44, 9 January 2021

This template defines the table "events". View table.

Notavailable.svg
EventBob

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=
}}