Help:Eventcalendar format
Eventcalendar format | |
---|---|
An event calendar with different views of displaying days and events | |
Scenarios, examples, demos | |
Example: | Demo:Event calendar, SMWCon Fall 2012/Calendar |
Image collection | |
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. |
Yes |
Authors: | James Hong Kong |
Categories: | time |
Group: | events , interaction , smwapi , ajax |
Class: | SRFEventCalendar |
Folder: | Commit history Folder tree |
Table of Contents | |
↓ INFO ↓
The result format eventcalendar the jquery.fullcalendar plugin to generate an event calendar with different views ('month', 'basicweek', 'basicday', 'agendaweek', 'agendaday' ) to choose from.
Parameters
General
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 |
Available values for the parameters:
-
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
Usage
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 |
Styling
A property can describe a color or icon and be assigned to an individual event.
- Icon
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 |?Event=title ...
- Height
/* Event calendar help class */ .smw-eventcalendar { width:100%; height:350px; }
{{#ask: ... |class=smw-eventcalendar ... }}
Calendar start
"current" (default) determines the initial calendar start as the current year/month/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.
SRF 1.9
Changes deployed with SRF 1.9 are far reaching both internally and visual therefore it might happen that some "glitches" sustained after testing but we don't expect major interruptions.
If I have time I will write some more otherwise this is a wiki, please help to enhance the documentation.
Filtering option
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.
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.
{{#ask ... |?Has Location |format=eventcalendar |legend=top
User preferences
Event calendar user preferences are described here.
Examples
- Event calendar (Example where events are being specified using subobjects)
- Event calendar/Create events using a form (Demonstrates how events can be are created using Semantic Forms.)
- Pierro78/EventCalendar (Example where events are being specified using subobjects)
- SMWCon Fall 2012/Calendar demonstrates how events are handled on a page to page basis