Template:Calendar/event
23–26 Nov | State of the Wiki [1], international wiki-fiddler convention, South Pole, British Antarctic Territory, Antarctica |
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
This template inserts a table row into {{Calendar}} containing basic information about an event.
Usage
Add this template to {{Calendar}}. Do not surround it with HTML or wikitext table syntax.
Basic usage:
{{Calendar/event | type = <!-- see [[Template:Cal]] for valid values --> | date = <!-- for single-day events; see [[w:mw:Help:Extension:ParserFunctions##time]] for valid formats --> | name = | link = | url = | city = | region = | country = }}
Full usage including optional parameters:
{{Calendar/event | type = <!-- see [[Template:Cal]] for valid values --> | date = <!-- for single-day events; see [[w:mw:Help:Extension:ParserFunctions##time]] for valid formats --> | start = <!-- for multiday events; see [[w:mw:Help:Extension:ParserFunctions##time]] for valid formats --> | end = <!-- for multiday events; see [[w:mw:Help:Extension:ParserFunctions##time]] for valid formats --> | major = <!-- yes --> | name = | link = | url = | logo = | description = | city = | citylink = | region = | regionlink = | country = | countrylink = | countryemblem = }}
Notes:
- Only |type = and |name = are required, but |country = and either |link = or |url = are recommended.
- Multi-day events should be relatively short. {{Dm}} doesn't support events that last more than a year, and especially long events would monopolize the top of the calendar. For long events lasting more than a week, consider breaking it up into events for the opening and closing days.
- Use the |major = and |logo = options sparingly. State of the Map and its spinoffs are examples of major conferences.
- Avoid using link shorteners for the |url = parameter. The calendar may appear in e-mails; recipients may hesitate to click on a link that obscures its destination.
- The template guesses wiki pages based on |city = and |region =. If a wiki page about a different place happens to match the specified city or region's name, use |citylink = or |regionlink = to disambiguate.
- The template guesses a flag based on |country =. In the case of Georgia, add |countryemblem = Flag of Georgia (country) to get the flag of the country instead of the U.S. state.
- Module:Flags/MasterData defines all the flag icons supported by {{Flags}}.
Examples
{{Calendar/event | type = conference | start = 2019-09-6 | end = 2019-09-8 | major = yes | name = State Of The Map U.S. 2019 | link = State Of The Map U.S. 2019 | url = //2019.stateofthemap.us/ | city = Minneapolis | citylink = Minneapolis, Minnesota | region = Minnesota | country = United States }} |
| ||||
{{Calendar/event | type = pizza | date = 2019-02-07 | name = Civic Hack Night & Map Night | link = | url = //www.meetup.com/Code-for-San-Jose/events/256761257/ | city = San José | citylink = San José, California | region = California | country = United States }} |
|
Microformats
This template generates (invisible) microformats2 tags intended to be machine-readable and that should be parseable with external tools to generate custom calendar formats. These microformats are recognized in table rows tagged with class="h-event"
, not recognized elsewhere. Note that there's still no support for microformat profiles because MediaWiki does not permit inserting HTML <link>
elements or rel="..."
attributes (it only allows custom data-*="..."
attributes), the profile is assumed to be as described in "http://microformats.org/wiki/h-event".
- |type = generates a "p-category" property for the event.
- |date = (or |start = and |end =) generates "dt-start" and "dt-end" properties.
- |name =, |description =, |city =, etc. generate a
<span class="p-name">...</span>
element.
Implementation notes
The layout of this template is constrained by Template:Calendar as well as by the OSMBC Calendar Parser, which outputs the table included in each week's issue of weeklyOSM (preview).
OSMBC imposes a number constraints on the resulting HTML code (not on the wikitext or rendered webpage), including:
- An event must be marked up with microformats.
- An event's location must contain commas.
- An event's location must appear no more than two lines below the event icon. This means there can be no more than one table cell between the type and description cells, because MediaWiki separates puts each
<td>
element on a separate line. - The line containing an event's location may not contain commas before the location. This means no image can precede the location in the same table cell, because MediaWiki includes commas in the
srcset
attribute of the<img>
tag to supply multiple resolutions of the same image. - The specific categories accepted by {{Cal}} are hard-coded.
{{Cal|talk}}
is not supported. Use{{Cal|speaking}}
instead.
See also
Inserts a table row into the event calendar at Template:Calendar containing basic information about a single event.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type | type | Nature of the event
| String | required |
Date | date | Date of a single-day event
| Date | suggested |
Start date | start | First day of a multiday event
| Date | optional |
End date | end | Last day of a multiday event
| Date | optional |
Major event | major | Is it a major event, the highlight of everyone’s year? | Boolean | optional |
Name | name | Name of the event
| String | required |
Wiki page | link | Name of the wiki page describing the event
| Page name | suggested |
Official website | url | URL of the event’s official website
| URL | suggested |
Logo | logo | File name of the event’s logo; must be uploaded locally or to Wikimedia Commons
| File | optional |
Description | description | Very short description of the event; use sparingly, i.e., for major events
| Content | optional |
City | city | Host city or nearest city; will be linked if an article exists by this name; displays a flag if known
| String | suggested |
City page name | citylink | Name of the host city’s WikiProject page, if it differs from the city’s name (e.g., due to disambiguation)
| Page name | optional |
Region | region | State, province, or other subnational region hosting the event, especially if the city and country are ambiguous on their own; displays a flag or shield if known
| String | optional |
Region page name | regionlink | Name of the state, province, or other subnational region’s WikiProject page, if it differs from the region’s name
| Page name | optional |
Country | country | Host country; displays a flag if known
| String | suggested |
Country page name | countrylink | Name of the host country’s WikiProject page, if it differs from the country’s name (currently unused)
| Page name | optional |
Country emblem | countryemblem | Full, disambiguated name of the host country; if omitted, a flag based on the country’s name will be used if available; to disable, specify “-”
| String | optional |