Template: Event
No edit summary |
(default desc) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 32: | Line 32: | ||
Suppress the page title so we can re-display it within the header box. | Suppress the page title so we can re-display it within the header box. | ||
-->{{DISPLAYTITLE:<span style="display:none">{{FULLPAGENAME}}</span>}}<!-- | -->{{DISPLAYTITLE:<span style="display:none">{{FULLPAGENAME}}</span>}}<!-- | ||
Add page metadata (for sharing on Twitter etc.). | |||
-->{{#seo: | |||
| description = {{{short_description|{{{description|A Wikimedia Australia event.}}}}}} | |||
}}<!-- | |||
Start the box. | Start the box. | ||
Line 48: | Line 53: | ||
Start time and date: | Start time and date: | ||
--><time itemprop="startDate" datetime="{{#time: c | {{{start_date|}}} }}"><!-- | --><div class="tpl-event-dates"><!-- | ||
--><time itemprop="startDate" datetime="{{#time: c | {{{start_date|}}} }}"><!-- | |||
-->{{#time: l j F Y, g:i a | @{{#expr: {{#time:U| {{{start_date|}}} }} + (60*60*{{{timezone}}}) }} }}<!-- | |||
--></time> <!-- | |||
End time (and date if on a different day): | |||
-->{{#if: {{{end_date|}}} | <!-- | |||
-->{{#ifeq: {{#time: Y-m-d | {{{start_date}}} }} | {{#time: Y-m-d | {{{end_date}}} }} <!-- | |||
--> | <!-- | |||
If same day: | |||
--> – <time itemprop="endDate" datetime="{{#time: c | {{{end_date|}}} }}"><!-- | |||
-->{{#time: g:i a | @{{#expr: {{#time:U| {{{end_date|}}} }} + (60*60*{{{timezone}}}) }} }}<!-- | |||
--></time> <!-- | |||
--> | <!-- | |||
If different day: | |||
--><br><em>to</em> <time itemprop="endDate" datetime="{{#time: c | {{{end_date|}}} }}"><!-- | |||
-->{{#time: l j F Y, g:i a | @{{#expr: {{#time:U| {{{end_date|}}} }} + (60*60*{{{timezone}}}) }} }}<!-- | |||
--></time> <!-- | |||
-->}}<!-- end ifeq | |||
-->}}<!-- | |||
Timezone abbreviation: | Timezone abbreviation: | ||
Line 75: | Line 92: | ||
--></abbr><!-- | --></abbr><!-- | ||
-->}}<!-- | -->}}<!-- | ||
--></div><!-- end .tpl-event-dates | |||
--></div><!-- end .tpl-event-name-etc | --></div><!-- end .tpl-event-name-etc | ||
--><div class="tpl-event-image">{{#if: {{{image|}}} |<!-- | --><div class="tpl-event-image">{{#if: {{{image|}}} |<!-- | ||
-->[[{{{image}}}|right|frameless| | -->[[File:{{{image}}}|right|frameless|600x400px]]<!-- | ||
-->}}</div><!-- | -->}}</div><!-- | ||
Line 141: | Line 160: | ||
|prev = {{#cargo_query: | |prev = {{#cargo_query: | ||
| tables = events | | tables = events | ||
| fields = CONCAT('[[',_pageName,']] | | fields = CONCAT('[[',_pageName,']]<br><small>',DATE_FORMAT(start_date, '%e %M %Y'),'</small>')=prev_event | ||
| where = _pageID != '{{PAGEID}}' AND region = '{{{region|{{{state|}}}}}}' AND start_date IS NOT NULL AND start_date < '{{{start_date}}}' | | where = _pageID != '{{PAGEID}}' AND region = '{{{region|{{{state|}}}}}}' AND start_date IS NOT NULL AND start_date < '{{{start_date}}}' | ||
| order by = start_date DESC | | order by = start_date DESC | ||
Line 150: | Line 169: | ||
|next = {{#cargo_query: | |next = {{#cargo_query: | ||
| tables = events | | tables = events | ||
| fields = CONCAT('[[',_pageName,']] | | fields = CONCAT('[[',_pageName,']]<br><small>',DATE_FORMAT(start_date, '%e %M %Y'),'</small>')=next_event | ||
| where = _pageID != '{{PAGEID}}' AND region = '{{{region|{{{state|}}}}}}' AND start_date IS NOT NULL AND start_date > '{{{start_date}}}' | | where = _pageID != '{{PAGEID}}' AND region = '{{{region|{{{state|}}}}}}' AND start_date IS NOT NULL AND start_date > '{{{start_date}}}' | ||
| order by = start_date ASC | | order by = start_date ASC |
Revision as of 09:19, 30 June 2022
This template defines the table "events". View table.
Event
Event
Share link: https://wikimedia.org.au/wiki/Template:Event – or download calendar item (.ics)