Template:Calendar/doc: Difference between revisions

From OpenStreetMap Wiki
Jump to navigation Jump to search
(→‎How to update the calendar: better sort the event types)
m (→‎How to update the calendar: the word is spelled "meatspace")
Line 46: Line 46:
| {{Cal|social}} || {{T|Cal|social}} || for informal meetings, or just to have a beer with fellow OSM addicts.
| {{Cal|social}} || {{T|Cal|social}} || for informal meetings, or just to have a beer with fellow OSM addicts.
|-
|-
| {{Cal|meeting}} || {{T|Cal|meeting}} || for meetings in meetspace.
| {{Cal|meeting}} || {{T|Cal|meeting}} || for meetings in meatspace.
|-
|-
| {{Cal|conference}} || {{T|Cal|conference}} || for talks, panels and conferences with multiple presentations.
| {{Cal|conference}} || {{T|Cal|conference}} || for talks, panels and conferences with multiple presentations.

Revision as of 22:36, 8 March 2018

How to update the calendar

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

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.

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 InternationalEventName]'''</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]], [[Country]]</span> {{SmallFlag|Country}}
|-class="h-event"
| {{Cal|social}} || {{Dm|y=year|Month Day|Month Day}} || <span class="p-name">Local event, [[City, disambiguation suffix|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}}
  • Make sure that if an HTML element is opened in any event description (<div...> or <span...>), it is also closed (add the missing </div> or </span> to the end of the entry before the floatting flag icons, if it is not present).

Leading icon for event types

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

  {{Cal|none}} for headings only, not an event.
Mapping party {{Cal|mapevent}} for mapping parties, or other surveys.
Work to do in limited time {{Cal|worktime}} for scheduled works and projects to complete in a limited time (not necessarily for mapping, could be competitions, calls for participations in programming/debugging, improving open datasets, translating, campaigning, lobbying...) with some online presentation, documentation, rules and assistance by organizers.
Pizza {{Cal|pizza}} for hack-a-thons/mapathons involving pizza (or eating other meals, e.g. pasta-parties, or brunches).
Social {{Cal|social}} for informal meetings, or just to have a beer with fellow OSM addicts.
Meeting {{Cal|meeting}} for meetings in meatspace.
Conference {{Cal|conference}} for talks, panels and conferences with multiple presentations.
Speaking {{Cal|speaking}}
or {{Cal|talk}}
for small local talk and presentation events.
IRC {{Cal|irc}} for IRC meetings at the OSM official IRC channel.
TV/Press {{Cal|tv}} for TV/press appearances. Turn on your TV that day!
Podcast {{Cal|podcast}} for radio/podcast recordings.
Info {{Cal|info}} for general (but important) information.
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.

Specifying dates for the event

  • 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 in the first or second parameter, but the year will be specified in a parameter named |y=... (this is needed because the absence of year means only a date in the current year; also required for allowing microformats requiring full dates, see below). The year applied will be the same for both dates.
  • An event spanning through the year end will be detected by the first date being "after" the second date in the current year, in which case the second date will then be assumed to the next year after the year specified in |y=... (there should be no event in the calendar spanning more than twelve months).
  • If you specify two dates, do not specify too long periods: if your event is more than one month long, or includes many events, just post a few events at isolated dates (never more than once a week) only for its opening or for important milestones and deadlines, with a link in the description pointing to a dedicated project page where a complete schedule may be found. Your project should then not jeopardize for long the top of the list of current events, even if it still going on.

Linking and geolocating events within the information column:

  • 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.
  • 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.
  • Try to geolocate your event, at least the city name and the country.
  • If there's a page for the city on this wiki, link the city name to that page using a wikilink (you may need to tweak the target page name to link to, by adding disambiguation suffixes not necessarily visible in the rendered label on the calendar), 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).

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

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.