Difference between revisions of "Template:Event"

From Wikimedia Australia
Jump to navigation Jump to search
(times)
 
(39 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>{{#cargo_declare: | _table = events
 
<noinclude>{{#cargo_declare: | _table = events
| location = Wikitext
 
 
  | start_date = Datetime
 
  | start_date = Datetime
 
  | end_date = Datetime
 
  | end_date = Datetime
 
  | timezone = Number
 
  | timezone = Number
 +
| region = String
 +
| location = Wikitext
 +
| coordinates = Coordinates
 +
| short_description = Wikitext
 
  | description = Wikitext
 
  | description = Wikitext
 +
| keywords = List (,) of String
 
  | link = URL
 
  | link = URL
  | apg_funding = Number
+
  | attendee_count = Number
 +
| wmau_cost = Number
 
}}</noinclude><includeonly>{{#cargo_store: _table = events
 
}}</noinclude><includeonly>{{#cargo_store: _table = events
| location = {{{location|}}}
 
 
  | start_date = {{{start_date|}}}
 
  | start_date = {{{start_date|}}}
 
  | end_date = {{{end_date|}}}
 
  | end_date = {{{end_date|}}}
 
  | timezone = {{{timezone|}}}
 
  | timezone = {{{timezone|}}}
 +
| region = {{{region|{{{state|}}}}}}
 +
| location = {{{location|}}}
 +
| coordinates = {{{coordinates|}}}
 +
| short_description = {{{short_description|}}}
 
  | description = {{{description|}}}
 
  | description = {{{description|}}}
 +
| keywords = {{{keywords|}}}
 
  | link = {{{link|}}}
 
  | link = {{{link|}}}
  | apg_funding = {{{apg_funding|}}}
+
  | attendee_count = {{{attendee_count|}}}
}}</includeonly><!--
+
| wmau_cost = {{{wmau_cost|}}}
 +
}}</includeonly>{{#default_form:event}}<!--
  
 
Supress the page title so we can redisplay it within the header box.
 
Supress the page title so we can redisplay it within the header box.
 
-->{{DISPLAYTITLE:<span style="font-size:12pt; font-weight:lighter">{{FULLPAGENAME}}</span>}}<!--
 
-->{{DISPLAYTITLE:<span style="font-size:12pt; font-weight:lighter">{{FULLPAGENAME}}</span>}}<!--
 +
 +
Add region nav bar
 +
-->{{navigation header | title = {{{region|}}}
 +
|prev = {{#cargo_query:
 +
  | tables            = events
 +
  | fields            = CONCAT('[[',_pageName,']], ',DATE_FORMAT(start_date, '%e %M %Y'),'')=prev_event
 +
  | where            = _pageID != '{{PAGEID}}' AND region = '{{{region|{{{state|}}}}}}' AND start_date IS NOT NULL AND start_date < '{{{start_date}}}'
 +
  | order by          = start_date DESC
 +
  | limit            = 1
 +
  | default          =
 +
  | more results text =
 +
}}
 +
|next = {{#cargo_query:
 +
  | tables            = events
 +
  | fields            = CONCAT('[[',_pageName,']], ',DATE_FORMAT(start_date, '%e %M %Y'),'')=next_event
 +
  | where            = _pageID != '{{PAGEID}}' AND region = '{{{region|{{{state|}}}}}}' AND start_date IS NOT NULL AND start_date > '{{{start_date}}}'
 +
  | order by          = start_date ASC
 +
  | limit            = 1
 +
  | default          =
 +
  | more results text =
 +
}}
 +
}}
 +
<br />
 +
<!--
  
 
Start the box.
 
Start the box.
Line 27: Line 61:
 
<div itemscope itemtype="http://schema.org/Event" style="border:1px solid #bbb; background-color:#efefef; padding:0.3em; text-align:center; margin:0"><!--
 
<div itemscope itemtype="http://schema.org/Event" style="border:1px solid #bbb; background-color:#efefef; padding:0.3em; text-align:center; margin:0"><!--
  
   Date:
+
   Start time and state:
   --><time itemprop="startDate" content="{{#time: c | {{{start_date|}}} }}">{{#time: l, j F Y | {{{start_date|}}} }}</time><!--
+
   --><time itemprop="startDate" datetime="{{#time: c | {{{start_date|}}} }}"><!--
  Start time:
+
    -->{{#time: l, j F Y, g:i a | @{{#expr: {{#time:U| {{{start_date|}}} }} + (60*60*{{{timezone}}}) }} }}<!--
  --><br />from <time title="AWST" style="cursor:help; border-bottom:1px dashed #bbb">{{#time: g:i a | @{{#expr: {{#time:U| {{{start_date|}}} }} + (60*60*8  ) }} }}</time> / <!--
+
  --></time> <!--
        --><time title="ACST" style="cursor:help; border-bottom:1px dashed #bbb">{{#time: g:i a | @{{#expr: {{#time:U| {{{start_date|}}} }} + (60*60*9.5) }} }}</time> / <!--
 
        --><time title="AEST" style="cursor:help; border-bottom:1px dashed #bbb">{{#time: g:i a | @{{#expr: {{#time:U| {{{start_date|}}} }} + (60*60*10 ) }} }}</time><!--
 
  
 
   End time:
 
   End time:
 
   -->{{#if: {{{end_date|}}}<!--
 
   -->{{#if: {{{end_date|}}}<!--
     -->| <br /><time itemprop="endDate" content="{{#time: c | {{{end_date|}}} }}">to</time> <!--
+
     -->| to <time itemprop="endDate" datetime="{{#time: c | {{{end_date|}}} }}">{{#time: g:i a | @{{#expr: {{#time:U| {{{end_date|}}} }} + (60*60*{{{timezone}}}) }} }}</time><!--
  --><time title="AWST" style="cursor:help; border-bottom:1px dashed #bbb">{{#time: g:i a | @{{#expr: {{#time:U| {{{end_date|}}} }} + (60*60*8  ) }} }}</time> / <!--
 
        --><time title="ACST" style="cursor:help; border-bottom:1px dashed #bbb">{{#time: g:i a | @{{#expr: {{#time:U| {{{end_date|}}} }} + (60*60*9.5) }} }}</time> / <!--
 
        --><time title="AEST" style="cursor:help; border-bottom:1px dashed #bbb">{{#time: g:i a | @{{#expr: {{#time:U| {{{end_date|}}} }} + (60*60*10 ) }} }}</time><!--
 
 
   -->}}<!--
 
   -->}}<!--
 +
 +
  Region (used to be called 'state'):
 +
  --> ({{{region|{{{state|<span class="error">Please set 'region' parameter.</span>}}}}}})<!--
  
 
   Event title (page name):
 
   Event title (page name):
Line 46: Line 78:
  
 
   Location:
 
   Location:
   --><p class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place"><!--
+
   -->{{#if: {{{location|}}} | <p class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place"><!--
 
     -->Location: <span itemprop="name">{{{location}}}</span><!--
 
     -->Location: <span itemprop="name">{{{location}}}</span><!--
 +
  --></p>}}<!--
 +
  --><p><!--
 +
    -->Share link: <span itemprop="url" class="plainlinks">{{#if: {{{link|}}} | {{{link}}} | {{canonicalurl:{{FULLPAGENAMEE}} }} }}</span><!--
 +
    --> – or {{#cargo_query: tables=events |where=_pageId={{PAGEID}} |format=icalendar |link text=download calendar item (.ics) |fields=_pageID,_pageName,start_date=start,end_date=end,location,CONCAT('More information: https://wikimedia.org.au/wiki/Special:Redirect/page/',_pageID)=description |icalendar name={{FULLPAGENAME}} |filename=Wikimedia Australia event.ics }}<!--
 
   --></p><!--
 
   --></p><!--
   --><p>Share link: <span itemprop="url" class="plainlinks">{{{link| {{canonicalurl:{{FULLPAGENAMEE}} }} }}}</span></p><!--
+
   --><div itemprop="description" style="font-size:larger">{{{short_description|{{{description|}}}}}}</div><!--
   --><div itemprop="description">{{{description|}}}</div><!--
+
 
--></div><noinclude>{{documentation}}</noinclude>
+
  Keywords:
 +
  -->{{#if: {{{keywords|}}} | <span style="font-variant:small-caps; font-size:smaller">Keywords: {{#arraymap:{{{keywords|}}}|,|QQQ|[[QQQ]][[Category:QQQ]]|&#32;&middot;&#32;}}</span> }}<!--
 +
 
 +
  Coordinates map:
 +
  -->{{#if: {{{coordinates|}}} <!--
 +
    --> | <div style="text-align:center; margin:1em;">{{#cargo_display_map: | point = {{{coordinates}}} | zoom = 14 | height = 200px | width = 100% }}</div> <!--
 +
   -->}}<!--
 +
 
 +
  Description (long; only shown if short desc is given):
 +
  -->{{#if: {{{short_description|}}} | <div style="text-align:left; max-width:66ex; margin:auto;">{{{description|}}}</div> }}<!--
 +
 
 +
--></div><!--
 +
 
 +
Report:
 +
-->{{#if: {{{report|}}} |
 +
 
 +
<h2>Report</h2>
 +
 
 +
{{{report}}}
 +
 
 +
* Attendee count: '''{{{attendee_count|unknown}}}'''
 +
* Cost to Wikimedia Australia: '''{{{wmau_cost|no cost}}}'''
 +
 
 +
}}<!--
 +
 
 +
Metrics:
 +
-->{{#if: {{{event_metrics|}}} |
 +
 
 +
<h2>Event Metrics</h2>
 +
 
 +
{{{event_metrics}}}
 +
}}<!--
 +
 
 +
Categories:
 +
-->[[Category:Events in {{#time: Y | {{{start_date|}}} }}]]<!--
 +
-->[[Category:Events in {{#time: Y | {{{end_date|}}} }}]]<!--
 +
-->[[Category:Events in {{{region|{{{state|}}}}}}]]<!--
 +
--><noinclude>{{documentation}}</noinclude>

Latest revision as of 06:54, 14 April 2021

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


Event
(Please set 'region' parameter.)
Event

Share link: – or download calendar item (.ics)

[edit] Template-info.svg Template documentation

Create a new event:

See also