Customizing Zap Calendar
There are a number of ways to customize Zap Calendar to tailor it to a customer's specific needs. This article describes these methods and how to ensure these customizations will stay after a Zap Calendar update.
Themes provide a way to customize the display of the calendar in the front end. Zap Calendar contains a number of themes with different color schemes to fit many site designs. Each theme is contained in its own folder in the "components/zap_calendar/themes" folder. This folder contains the cascading style sheet (CSS) file and associated image files needed to display the theme.
Don't Modify Existing Themes
The danger in modifying an existing theme is that when the next Zap Calendar update is done, the changes made to the theme will be overwritten by the update. Instead, it is best to create a new theme. To create a new theme, create a new folder with the theme name in the "components/com_zcalendar/themes" folder. It is probably easiest to copy an existing theme that may be similar to your custom theme into the newly created theme folder. Custom theme folders will not be overwritten when a Zap Calendar update is performed (the theme will be removed if the component is removed from the site). You can modify the theme.css file to alter the color scheme of the calendar. To make more extensive changes to the theme, you may want to refer to the common.css file located in the "components/com_zcalendar/assets/css/" folder to override the CSS settings made in that file.
Forms provide a way to customize the output of Zap Calendar. Forms provide a way to modify the HTML, the output data, or both. For example, you can modify the display of an event's time within a month calendar to include both a start time and end time (the default form shows only the start time). Forms are located in the "components/com_zcalendar/forms" folder. If you have installed one of Zap Calendar's language file, you may see your language specific forms under your language folder. Otherwise, the forms will be listed in the "en-GB" subfolder. Some Zap Calendar plugins install forms to allow customization of plugin output. These forms can be found in the "plugins/zapcalendar" folder.
The forms that are available for customization are:
|approveremail.tpl||E-mail sent to administrator when new events need to be approved|
|emailurl.tpl||E-mail send form, used by the share event feature (used by guest)|
|emailurluser.tpl||E-mail send form, used by the share event feature (used by registered user)|
|eventfeed.tpl||Event feed, used by RSS|
|eventfeed_simple.tpl||Simple event feed format, used by RSS|
|eventlink.tpl||Used when displaying an event title within monthly, weekly, daily calendars and upcoming events and lists|
|shareurl.tpl||Share URL window|
|showdailyitem.tpl||Show event within day calendar|
|showevent.tpl||Full event listing|
|subscribe.tpl||Subscribe popup window|
|upcomingitem.tpl||Single event in an upcoming events listing (see below)|
|upcomingitem_fancy.php.tpl||Single event in an upcoming events listing, fancy format (see below)|
Don't Modify the TPL Files
As with themes, there is a danger in losing customizations during a Zap Calendar update if the TPL file is modified. Instead, copy the TPL file to a FRM file and modify the FRM file. For example, copy the "eventlink.tpl" file to "eventlink.frm" file and modify that one. Zap Calendar will automatically look at the .frm file first.
Upcoming Item Forms
The administrator has the ability to switch formats for the upcoming item listing. The form name must be in one of two formats in order to be used by Zap Calendar:
Where "%FORM%" is the form name you wish to use when specifying the name in the view settings. Zap Calendar comes with two upcoming item forms, "upcomingitem.tpl" and "upcomingitem_fancy.php.tpl". In the Zap Calendar view settings, you would select these by specifying the form names, "" (blank) and "fancy", respectively. The fancy form is written in PHP, an option for creating forms where the text based forms may not be sufficient. Just like with text forms, PHP forms should be copied and not modified if changes are needed. So, for this PHP form, it would be copied to the name "upcomingitem_fancy.php.frm" and modified from there.
Foreign Language Forms
Forms are stored by language in the forms folder. The foreign languge form will be used if Joomla is configured to be used in another language. If the foreign language version of the form is not available, then the english version will be used by default.
Add-ons provide another method of customizing Zap Calendar. There are dozens of add-ons available for Zap Calendar that can add functionality and enhance its display.