Template:Calendar/doc

From OpenStreetMap Wiki
Jump to: navigation, search

How to update the calendar

The above calendar box appears in many pages (most notably the Main Page and Current Events page).

When an event is past and you remove it from this table, please add it to the Template:PastEvents table.

Two templates are used for this. Template:Calendar2 contains the framing, background colors, etc. and Template:Calendar (this one) contains the dates and events. If you click 'edit' you'll see a table following this format (rows are ordered by date):

|-class="h-event"
| {{Cal|conference}} || {{Dm|y=year|Month Day|Month Day}} || <span class="p-name"><big>'''[URL International event name]'''</big> {{SmallFlag|float=none|Event name|Event-logo.png}}, description, [[Country]]</span> {{SmallFlag|Country}}
|-class="h-event"
| {{Cal|mapevent}} || {{Dm|y=year|Month Day}} || <span class="p-name">[[Page name on this wiki|National event]]</span> {{SmallFlag|Country}}
|-class="h-event"
| {{Cal|social}} || {{Dm|y=year|Month Day|Month Day}} || <span class="p-name">Local event, [[City]], [[Country]]</span> {{SmallFlag|Country}} {{SmallFlag|City|Symbol of city.png}}
|-class="h-event"
| {{Cal|pizza}} || {{Dm|y=year|Month Day}} || <span class="p-name">Local event, [//www.openstreetmap.org/?mlat=<lat>&mlon=<lon>#map=<zoom>/<lat>/<lon> City], [[Country]]</span> {{SmallFlag|Country}}

Use one of the following templates to specify the nature of the event:

Icon Code Info
Mapping party {{Cal|mapevent}} for mapping parties (with surveying) or mapathons (without)
Social {{Cal|social}} for informal meetings, or just to have a beer with fellow OSM addicts.
Meeting {{Cal|meeting}} for meetings at a face-to-face location or virtual
Speaking {{Cal|speaking}}
or {{Cal|talk}}
for talks/speaking events with individual or small number of talks on OSM
Conference {{Cal|conference}} for conferences with several talks/panels/workshops on OSM
Pizza {{Cal|pizza}} for hack-a-thons/mapathons involving pizza (or eating other meals, e.g. pasta-parties or brunches)
IRC {{Cal|irc}} for IRC meetings about OSM.
TV {{Cal|tv}} for TV/press appearances. Turn on your TV that day!
Podcast {{Cal|podcast}} for radio/podcast recordings
Info {{Cal|info}} for important dates e.g OSMF election deadlines
MISC {{Cal|misc}} for anything else

Notes:

  • Leading icons for event types are constrained by {{Cal}} within a 24x30px rectangle within which they are centered. This gives some enough margins to allow descriptions to wrap on a couple of lines without excessive vertical margins, to keep the rendered list compact vertically.
  • Dates are autotranslated by {{Dm}} whose parameters are dates (3-letter abbreviated month names in English and day of month). You can specify only date, or two dates for an event spanning several days. You don't need to specify a year.
  • The list of events will wrap into vertical columns (depending on available screen size) to avoid excessively long rows of text and keep it easy to read.

Geolocating and linking events within the information column:

  • Try to geolocate your event, at least the city name.
  • If there's a page for the city on this wiki, link the city name to that page using a wikilink, and make sure that this page displays a map to locate this city.
  • If there's no page for the city on this wiki (and you don't intend to create one), avoid creating a red link to a missing page. Instead use a link to the OSM map such as:
    [//www.openstreetmap.org/?mlat=lat&mlon=lon#map=zoom/lat/lon City] (replace zoom, lat, lon, and City by appropriate values, use the OpenStreetMap map itself to find accurate coordinates and the best-looking zoom level; the mlat= and mlon= parameters after ? will also render a marker on the displayed map, but you could also append way/id or node/id before the ? to reference a way or node by its id on OSM, that will be marked with their informative tags).
  • If the event itself has a link to a page on this wiki, please use a wikilink, and readable non-encoded characters in the wiki page name (or in the possible anchor after the # sign).
  • If a link goes to an external site, and this site supports both HTTP and HTTPS, remove the "http:" or "https:" prefix before "//". Please avoid using any external generic link redirectors (short links), please use the final target of the link (short link redirectors are frequently unsecure or may be blocked by browsers or security suites, and most of them have privacy issues or may add undesired advertizing before reching the final target), or use a short link created and managed by the same domain as the final target.

Usage of flags and other icons within the information column:

  • For placing country flag icons or similar location symbols (such as coat of arms) to the right of the columns, or if the default SVG flag does not exist for this location, please look at the documentation of {{SmallFlag}}. Ideally all these locations used in Calendar events should have a link to an existing page on this wiki (showing the map and a list of most active OSM projects, tools or other community pages related to that location). Order these location templates at end of line: the country first (will be the rightmost one in the display), then the symbol for the region or city.
  • For showing small icons that are only project icons or small logos related to the (big) event but not related to location, don't place them to the left but to the right using "float=right" or inline with "float=none". Avoid logos for something else than big events, and make sure the logo is appriately licenced in a way compatible with this wiki (logos stored in Wikimedia Commons are compatible, provided they also don't abuse the Wikimedia Commons rules).
  • Don't oversize these icons, they MUST remain constrained with height and width BELOW 30 pixels (the default height of icons displayed by the SmallFlag template is 15 pixels, it is largely enough for all flags).

BIG events could be written in bold. You will need to crank up the font size a notch in order for this difference to show up on the Main Page (since font size is reduced there). What is a big event? We've tended to move towards only making events big very occasionally, so we're talking big international OSM gatherings with say more than 20 OSMers attending.

Support for microformats

This template now generates (invisible) microformats2 tags intended to be machine-readable and that should be parseable with external tools to generate custom calendar formats (for example with pin13.net/mf2 to generate JSON data).

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".

  • The event type (first column showing an icon, set by the {{Cal}} template) will internally generate a "p-category" property for the event.
  • Dates specified in the second column by {{Dm|...}} will internally generate "dt-start" and "dt-end" properties. The year must be specified separately due to legacy usage of the {{Dm}} template because the MediaWiki's #time: parser (used internally to parse the specified dates) assumes that the implied year is the current year. Without this year, no microformats will be emitted for these dates.
  • The third column should include its description content within a <span class="p-name">...</span>, excluding the optional small icons for country flags, region/city coast of arms and logos placed after this description.