Help:Eventcalendar format

Jump to: navigation, search
Eventcalendar format
An event calendar with different views of displaying days and events
Scenarios, examples, demos
Example: Demo:Event calendar, SMWCon Fall 2012/Calendar
Further Information
Provided by: Semantic Result Formats
Added: 1.8.0
Removed: still supported
Requirements: none
Format name: eventcalendar
Enabled by default: 
Indicates whether the result format is enabled by default upon installation of the respective extension.
Authors: James Hong Kong
Categories: time
Group: events , interaction , smwapi , ajax
Class: SRFEventCalendar
Folder: Commit history
Folder tree
Table of Contents

The result format eventcalendar makes use of the "jquery.fullcalendar" plugin to generate an event calendar with different views to choose from (see defaultview below).



Parameter Type Default Description
source text empty Alternative query source
limit whole number 50 The maximum number of results to return
offset whole number 0 The offset of the first result
link text all Show values as links
sort list of texts empty Property to sort the query by
order list of texts empty Order of the query sort
headers text show Display the headers/property names
mainlabel text no The label to give to the main page name
intro text empty The text to display before the query results, if there are any
outro text empty The text to display after the query results, if there are any
searchlabel text ... further results Text for continuing the search
default text empty The text to display if there are no query results

Format specific

Parameter Type Default Description
defaultview text month The initial view when the calendar loads
firstday text Sunday The day that each week begins
start text current The initial calendar start (date or datetime values)
legend text none Specifies the position of the legend and assigned filter options
dayview yes/no no Enable the day view by clicking the day number
class text empty Specify an additional cascading style sheet class
theme text basic Select a grid theme
clicktarget text none Define a target page / query string appended to the wiki URL that get's called when clicking on a calendar date. Example: clicktarget=Special:FormEdit/Event?Event[Start Date]=%clickyear%-%clickmonth%-%clickday%%clicktime%&returnto=Eventcalendar.
NoteNote: Available values for the parameters listed above:
  • defaultview: month, basicweek, basicday, agendaweek, agendaday
  • firstday: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
  • start: current, earliest, latest
  • legend: none, top, bottom, tooltip, pane
  • theme: basic, vector

The page used with the clicktarget parameter can be any page in the wiki, e.g. clicktarget=Main Page or clicktarget=Special:FormEdit/Event?Event[Start Date]=%clickyear%-%clickmonth%-%clickday%%clicktime%&returnto=Help:Eventcalendar%2Fformat . For the second example to work the the Extension "Page Forms" must be installed, too.


Data model

It is recommended that an event entity is represented by an subobject to allow individual events to be placed within the same page source and to separate source from data.

An event is specified as a single entity represented by a title, start date, end date (optional), color (optional), icon (optional), and/or description (optional). This data model stipulates that a subject (page) contains one event or in case it contains several events those events are represented as individual subobjects within the same page.

If you want to generate recurring events, please have a look at the #set_recurring_event function.

Column 0 Column 1 Column 2 Column 3 Column 4 Column 5 Column N
Purpose Event Start date/time End date/time Icon Color Description ...
Datatype text/page date date page text text/page ...
Role data (mandatory) data (mandatory) data (optional) data (optional) data (optional) data (optional) ...
Example Lorem ipsum dolor 10 Aug 2012 06:00 10 Aug 2012 14:00 File:event-schedule.jpg #f00, #ff0000, rgb(255,0,0), or red Lorem ipsum dolor ... ...
Note Color properties should be of type text to avoid any potential issues caused by color definitions such as #ff0000


A property can describe a color or icon and be assigned to an individual event.


Icons are expected to be uploaded and available within the wiki itself. The event calendar will not make any transformations of icons and therefore any icon uploaded should have an appropriated size to enable a normal display behavior.

Properties that carry a special meaning can be variable within a query while its identifier remain fixed without the need for extra parameters (Fixed identifiers are title, icon, color) resulting in a query like

 |?Has event icon=icon
 |?Has color=color

Minimum height is 350 px. The class only get's applied for height >= 350 px. See here.

/* Event calendar help class */ 
.smw-eventcalendar {
    width: 100%;
    height: 450px;

Calendar start

The parameter |start is responsible for the initial calendar start of dates shown.

"current" (default setting) determines the initial calendar start as the current year, month or day. "earliest" can be used where planned events are outside of the current month and the calendar display should reflect the earliest event within those selected events. This option allows to show events beyond the current month without having to browse its earliest entity. "latest" can be used analog but reflects the latest event.

Calendar filtering

In case the calendar uses the color option to indicate different typological content (events), a filtering option can be used to filter events through a property (location, type etc.) that is semantically linked by its color.

Calendar legend

The parameter |legend is responsible for the positioning of the portlet that is used to display the content. Available options are "top", "bottom", "tooltip", "pane" or "none".

 |?Has Location

User preferences

Event calendar user preferences are described here.


This documentation page applies to all SMW versions from 1.8.0 to the most current version.

Help:Eventcalendar format en 1.8.0