Event Calendar macro

Release 1.1 - ...

The Event Calendar macro gives you a flexible calendar that can be embedded to show upcoming events. Users that have sufficient right can add, edit and remove events in the calendar. Users without those rights can only view the events. The event calendar has a mode 'full' that fills the entire page, a mode 'compact' that allows you to embed the calendar in a sidebar in your webpage and a mode 'overview' that lists the upcoming events.

The event calendar can used by simply calling the viper sml_eventcalendar().

Example

The image below shows an example of the Event Calendar, using the mode 'full'.

Event Calendar example

Parameters

Name Type Default Description
date date (today) The date that the calendar show on startup. The dates you can enter are limited to the dates visible in the month dropdown.
mode string full Tells the smartlet that the calendar must  be shown in the mode 'full', 'compact' or 'overview'. The modes 'full' and 'compact' show a calendar where the mode 'compact' uses a lot less space than the 'full' mode. The mode 'overview' just lists the upcoming events without showing an actual calendar.

ContentAccess

The following access type levels apply to the Event Calendar smartlet. Access only needs to be applied to the Smartlet item itself. If your site requires different sets of rights for different parts of the site, copy the Event Calendar folder and apply different Content Access to the copy.

 

Access Type Level Description
EventCalendarView User may view eventcalendar items.
EventCalendarEditPrivate User may add/edit events (only private).
EventCalendarEditPublic User may add both private and public events.
EventCalendarModerate User may edit public events added by others.

Technical details

The Event Calendar Smartlet uses the tables swtEventCategory and swtEvents, as well as the database view vwswtEvents.

The table swtEventCategory contains the event categories the user can choose from when creating an event. Of course, you can add your own categories. Within the table swtEvents, the actual events are stored.

The view vwswtEvents includes, besides (almost) all the columns of the swtEvents table, the name of the event category (CategoryName) as well as the fullname of the owner of the event (OwnerName).

The Calendar SXML macro is used internally to render the calendar.