Difference between revisions of "EventBob"

From Sega Retro

m (Dates ranges are marked with en dashes; not sure how I missed this before)
(14 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
_table = events
 
_table = events
 
| name={{#titleparts:{{PAGENAME}}}}
 
| name={{#titleparts:{{PAGENAME}}}}
| startdate={{stripref|{{{startdate|}}}}}
+
| startdate={{stripref|{{#sub:{{{startdate|}}}|0|10}}}}
| enddate={{stripref|{{{enddate|}}}}}
+
| enddate={{stripref|{{#sub:{{{enddate|}}}|0|10}}}}
 
| location={{{location|}}}
 
| location={{{location|}}}
 
| attendance={{stripref|{{{attendance|}}}}}
 
| attendance={{stripref|{{{attendance|}}}}}
Line 14: Line 14:
 
| attendance=integer
 
| attendance=integer
 
}}</noinclude></span>
 
}}</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 34: Line 37:
 
| tabliststyle=margin:2px;
 
| tabliststyle=margin:2px;
 
}}
 
}}
| [[File:{{{eventimage}}}|320x240px]]
+
| {{#ifeq:{{{noeventimage|}}}|yes||[[File:{{{eventimage}}}|320x240px]]}}
 
}}
 
}}
 
}}
 
}}
Line 47: 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 65: Line 81:
 
<pre>
 
<pre>
 
{{EventBob
 
{{EventBob
| logos=
+
| logo=
 
| eventimage=
 
| eventimage=
 
| name=
 
| name=
Line 72: 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=
}}