| The iCal Subscribe Plugin |
|
|
|
| Monday, 18 May 2009 09:12 |
|
Plugin Name: icalsubscribe (available in Pro version only) Purpose: Display and synchronize events retrieved from an external calendar subscription. Event additions, updates or deletions made to the external calendar (Google Calendar, for example) will be synchronized with the Zap Calendar calendar. The plugin supports multiple subscriptions at different refresh frequencies. Using this plugin, Zap Calendar can aggregate calendars from multiple sources to display or to create a single subscription containing the subscribed calendars. Configuration: After the plugin has been installed and enabled, create a new category specifically for the subscription. Zap Calendar requires a single category for each calendar subscription. This subscription category should not be used by users to enter events, so the category should be set to read only. Otherwise, user entered events will be deleted when the subscription is synchronized. From the plugin tab, enter your subscription URL and the frequency it should be updated (every hour, every 4 hours, etc.). To test the subscription, select the "Admin Tools" button from the Zap Calendar main control panel, where you can refresh the subscription manually. Once the category has been setup correctly, add it to your view(s) so that it will be displayed. To refresh the subscriptions automatically, a cron job needs to be configured on your web server. Cron jobs are a way to schedule programs at regular intervals. The Linux command "wget" is used in the cron job to call a Zap Calendar URL for refreshing the subscription. There are a total of 6 cronjobs for each subscription frequency: 1 hour, 2 hours, 4, hours, 6 hours, 12 hours and 24 hours. Below is a sample cron job that you can use for your site. The amperand "&" needs to be entered twice because this character is special in Linux commands. Using it twice overrides the behavior and creates a single ampersand for the URL. Make sure to change "yourdomain.com" with the name of your website domain. Also note the -O option is an upper case letter "O", not a zero. Zap Calendar provides a security feature to prevent attacks on the subscription refresh URL. From the plugin settings, you can specify the IP addresses authorized to refresh the subscription by URL. By default, "127.0.0.1" is enabled, which is the localhost. If you want to allow any host to refresh the subscription, use the IP address "*.*.*.*". (Note: only ip4 addresses are currently supported). ZContent will also provide the cron job service to Pro customers who can not run it on their own servers at no additional charge. Contact Z Content for more details. Sample Cron # ZapCalendar cron jobs
10 */1 * * * wget -O /dev/null "http://yourdomain.com/index2.php?option=com_zcalendar&&plugin=icalsubscribe&&task=cron&&freq=1" >/dev/null 11 */2 * * * wget -O /dev/null "http://yourdomain.com/index2.php?option=com_zcalendar&&plugin=icalsubscribe&&task=cron&&freq=2" >/dev/null 12 */4 * * * wget -O /dev/null "http://yourdomain.com/index2.php?option=com_zcalendar&&plugin=icalsubscribe&&task=cron&&freq=4" >/dev/null 13 */6 * * * wget -O /dev/null "http://yourdomain.com/index2.php?option=com_zcalendar&&plugin=icalsubscribe&&task=cron&&freq=6" >/dev/null 14 */12 * * * wget -O /dev/null "http://yourdomain.com/index2.php?option=com_zcalendar&&plugin=icalsubscribe&&task=cron&&freq=12" >/dev/null 15 6 * * * wget -O /dev/null "http://yourdomain.com/index2.php?option=com_zcalendar&&plugin=icalsubscribe&&task=cron&&freq=24" >/dev/null |
| Last Updated on Thursday, 21 May 2009 13:37 |



