Use Tabulizer to display a monthly event calendar

In this article you will see how you can use Tabulizer to display a list of events in a monthly calendar. The advantages of using Tabulizer over a specialized extension are the following:

  • Easy of use. It's super easy to publish your events. Just create a regular table where each row will contain the details of a given event and Tabulizer will take care of the rest.
  • Flexibility. The table that contains the events does not need to be static. It can be created dynamically using all the available data sources, i.e. an Excel file, a CSV file, another web page, an RSS feed or a JSON input. These data sources can be combined using a data source merger or provide the same data to multiple instances of the calendar.
  • Distribution or events. This is a really cool and unique feature. Starting with Tabulizer version 6, it's possible to publish your events and other friendly sites "consume" these events and display them using their own preferences, assuming they too have Tabulizer installed. In other words, you can publish your events and other sites, fetch these events, process/filter them, combine them with other events and finally publish them using their styling preferences.
  • Processing of events. All the rules for data formatting and transformation are available to the table events. And if none of the built-in rules is sufficient and you add a modification function for that (note: modification functions require some PHP knowledge).
  • Embed everywhere. The calendar can be placed anywhere on the site, even within an article or another extension.
  • Cost. Why buy another extension/plugin if Tabulizer's simple approach covers all of your needs?

OK, let's see a specific example:

2015-01-21 Latin Party The Ultimate Latin Party in Greece. http://www.golatin.gr
2015-01-16 Milonga One wonderful milonga at Megalo Kafenio.  
2015-01-21 Dance Performance Featuring international stars of Tango, German Cornejo and Gisela Galeassi. http://www.tango-fire.com

The resulting calendar looks like this:

January 2015
MonTueWedThuFriSatSun
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  • MilongaOne wonderful milonga at Megalo Kafenio
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

It is possible to display the calendar is a smaller footprint:

January 2015
MTWTFSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  • MilongaOne wonderful milonga at Megalo Kafenio
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

Or as a list of events:

Fri2015-01-16
  • MilongaOne wonderful milonga at Megalo Kafenio
Wed2015-01-21

Table format

Column Field Notes
1 Event Date The Date should be in a format that can be recognized automatically by Tabulizer. The safest format is YYYY-MM-DD, e.g. 2015-01-21
2 Event Title A short title for the event
3 Event Description A short description for the event
4 Event Link A URL where the visitor can click for more information on that event (optional).

The core of calendar display is the icalmodification functions, that takes as input the table data and displays them as:

  1. A monthly calendar - Normal size
  2. A monthly calendar - Small size
  3. A monthly calendar - List

The ical modification function takes the following arguments:

  • The display mode that can be: normal, small, or list
  • The month to display. This can be an absolute date (e.g. 2015-01-15) or a relative date to the current time (e.g. +1 months).
  • The filtering options to limit the visible events. The two options are the next integer value and the previous integer value. For instance next 3 will display up to three events after the current date, while the previous 0 will hide all past events.

For better versatility it's advised to specify these arguments as user parameters in the ruleset and give specific values when you insert the data source. For instance, here is the recommended argument list if you want to display the monthly events as list:

normal^{user_param_1:text}
or ...
small^{user_param_1:text}
or ...
list^{user_param_1:text}^{user_param_2:text}

When you insert the data source you will have the chance to specify user parameters 1 and 2. E.g.