Create and display a calendar using tracker data

# Plugin Tracker Calendar

This wiki plugin was added in Tiki10 to allow managing tracker items as resources in a calendar view: i.e. it uses "Resource View" fork by Jarno Kurlin of FullCalendar jQuery plugin (original by Adam Shaw) to render the content of a tracker. There is a profile called "Tracker_as_Calendar_12" (included in the Profiles Wizard since Tiki12 ) to let users learn by playing with a working instance of it properly set up with demo data.

## Requirements

TrackerCalendar wiki-plugin requires "Format to use for tracker field keys" on Admin > Search panel to be set to "Permanent Name", otherwise it will not show the tracker items in the calendar.

The wiki-plugin is not using the Tiki feature Calendar, so you don't need to have Tiki's "Calendar" feature enabled for this plugin to display data in a calendar view.

## History

Latest released version of Jarno Kurlin's FullCalendar fork is v1.6.4.1 (2014-01-12).

In Tiki there is:

version 1.6.1.6 (12/3/13)
v1.5.3 of (original) FullCalendar by Adam Shaw

## Parameters

Introduced in Tiki 10. Required parameters are in bold.
Preferences required: wikiplugin_trackercalendar, calendar_fullcalendar
Parameters Accepted Values Description Default Since
begin word Permanent name of the field to use for event beginning 10.0
end word Permanent name of the field to use for event ending 10.0
coloring word Permanent name of the field to use to segment the information into color schemes. 10.0
colormap text Colormap to be used when segmenting the information using the coloring field. Each map is composed of value and color separated with a comma, use pipes to separate multiple colormaps: 1,#6cf|2,#6fc 18.0
resource word Permanent name of the field to use as the resource indicator 10.0
maxHourOfDay text Last time slot that will be displayed for each day, e.g. 24:00:00 24:00:00 19.1
minHourOfDay text First time slot that will be displayed for each day, e.g. 07:00:00 07:00:00 19.1
dDay int Choose the default day (dd) to use for the display 0 12.1
dMonth int Choose the default month (mm, as numeric value) to use for the display. Numeric values here are 1-based, meaning January=1, February=2, etc 0 12.1
dYear int Choose the default year (yyyy) to use for the display 0 12.1
fDayofWeek int Choose the day that each week begins with, for the tracker calendar display. The value must be a number that represents the day of the week: Sunday=0, Monday=1, Tuesday=2, etc. Default: 0 (Sunday) 0 12.1
weekends (blank)
y
n
Display Saturdays and Sundays (shown by default) y
slotDuration text Frequency for displayting time slots, e.g. 00:30:00 (defaults to the calendar_timespan preference) 00:30:00 19.1
aday (blank)
y
n
Display the option to change the view to agenda by days y 12.1
amonth (blank)
y
n
Display the option to change the view to agenda by months y 12.1
aweek (blank)
y
n
Display the option to change the view to agenda by weeks y 12.1
dView (blank)
month
agendaWeek
timelineMonth
timelineWeek
timelineDay
Choose the default view for the Tracker Calendar month 12.1
external (blank)
y
n
Follow external link when event item is clicked. Useful for supporting links to pretty tracker supported pages. n 12.4
rday (blank)
y
n
Display the option to change the view to resources by days y 12.1
rmonth (blank)
y
n
Display the option to change the view to resources by months y 12.1
rweek (blank)
y
n
Display the option to change the view to resources by weeks y 12.1
trackerId int Tracker to search from 0 10.0
url url Complete URL, internal or external. 12.4
addAllFields (blank)
y
n
If Yes (y) all fields in the tracker will be added to the URL, not just the itemId y 12.4
trkitemid (blank)
y
n
If Yes (y) the item id will be passed as itemId, which can be used by Tracker plugins. Will be passed as itemid if No (n) n 12.4
useSessionStorage (blank)
y
n
If Yes (y) copy all the field values into window.sessionStorage so it can be accessed via JavaScript. y 12.4

## Parameters: Extended

When clicking a calendar item the default action is to open an edit window to change the data values. Setting the "Extended" parameter to "yes" indicates that the standard data entry window should be bypassed and navigation should move to the page specified in the "url" parameter. The URL parameter becomes visible when Extended is set to "yes."

### Passing Values

Several values are passed to the page indicated by the "url" parameter. These values are passed both as Wiki Argument Variables for use in the Wiki page and JQuery "sessionstorage" values for easy retrieval via Javascript embedded in the Wiki page. In addition to the values listed in the below table, tracker values for the ItemIds listed in the "List Detail Popup" field will also be passed with the "Item Name" acting as the variable name for the passed value. All spaces in item names are replaced with underscores when used as variable names.

Variable Description
trackerid The id number of the tracker that was used to create the calendar
itemid The id of the data item that was selected to trigger invocation of the called page
title The value used as the title for the scheduled item selected on the calendar
start The start time of the item selected on the calendar
end The end time of the item selected on the calendar

## Parameter: Tracker item id

It is the default action of the trackercalendar plugin to pass "itemId" in mixed case (camel case) that is meaningful to tracker plugins on the page being opened. Setting this value to "no" gives more control of the tracker plugins to the developer by passing itemid in all lower case which is not meaningful to tracker plugins.
An example for when this would be handy is if the tracker on the page being opened is not the same as the one used to generate the calendar. If the intent were to search a related track by the title of the selected calendar item then "Tracker item id" would need to be "no" to prevent the tracker plugin from trying to automatically present the passed ItemId rather than the result of the title search. If the tracker plugin of the page being opened is the same tracker as was used to create the calendar, the page is just intended to present a greater amount of info from the tracker, setting "Tracker item id" to yes would automatically bring up the correct reference.

## Colormap

Since Tiki18, if you want to ensure a consistent color map, you can pin priorities to values using the parameter colormap, with value and color separated with a comma and using pipes to separate multiple colors.

{trackercalendar trackerId="3" begin="trac_as_cal_start_date" end="trac_as_cal_end_date" resource="trac_as_cal_summary" coloring="trac_as_cal_priority" colormap="1,#6cf|2,#6fc|3,#c6f|4,#cf6|5,#f6c|6,#fc6"}

This way you can pin values of priorities to given colors. If the value is not in the colormap, then it falls back to the next color from the default list.

## Example 1

This feature can be tested easily when you apply the corresponding profile that is a simple showcase for it:

You can edit a wiki page, and look for the Plugin TrackerCalendar through the help icon, and enter the permanent names of the fields that you want to use for the display. In this example, they come from the installation of Profile "Tracker as Calendar" (http://profiles.tiki.org/Tracker_as_Calendar_10). It would look like this:

Click to expand

This is a test for the feature TrackerCalendar:
http://doc.tiki.org/PluginTrackerCalendar

{trackercalendar trackerId="3" begin="trac_as_cal_start_date" end="trac_as_cal_end_date" resource="trac_as_cal_summary" coloring="trac_as_cal_priority"}

Once you populate the tracker with some more data for the appropriate dates for your case, then they would display in a way similar to the following. Once selected Month view, they will display like:

Click to expand

Click to expand

Click to expand

Click to expand

Click to expand

Click to expand

## Example 2

{TRACKERCALENDAR(trackerId="1" begin="begin" end="end" resource="resource" coloring="project")}
{filter content=test me}
{filter content="{ {user}}" field=tracker_field_author}
{TRACKERCALENDAR}

This previous example will list all items from all trackers in the same tiki site (beyond just tracker 1 defined in the params) that have the same fields with permanent names as "begin" and "end", and with field author matching the user viewing the page.

• The permanent name for the user field in this example above is author (not tracker_field_author ), but for the content filter to work you have to prepend the field permanent name with tracker_field_ , thus resulting in this case in field=tracker_field_author  .

## Example 3

{TRACKERCALENDAR(trackerId="1" begin="begin" end="end" resource="resource" coloring="project" aweek="y" aday="n" rweek="y" rmonth="y" rday="n" fDayofWeek="1" dView="resourceMonth")}
{filter field="tracker_field_author" editable="content"}
{filter field="tracker_field_status" editable="content"}
{TRACKERCALENDAR}

Since Tiki 16.3: This previous example looks initially very similar to the Example 2, but some more default parameters are set to choose which options are shown in the calendar navigation top bar, as well as exposing to filter fields on top of the calendar, which will allow the user to select values and filter in real time based.

Click to expand

Please note that you can use the parameters editable="content" or editable="exact" depending on whether you want to allow partial matches with many words, or looking for an match of a full sentence, for instance.

### Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Clean URLs
Communication Center
Compression (gzip)
Content Templates
Contribution
Credit
Date and Time
Debugger Console
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
File Gallery
Forum
Friendship Network (Community)
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Logs (system & action)
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Payment
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Stats
Surveys
Tags
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Trackers
Transitions
TRIM
User Administration including registration and banning
User Files
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Plugin extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC