Setting up a calendar server with Plone 2
Objective
Use Plone 2 and a few open source components to build an iCalendar server.
What is iCalendar
Short answer : iCalendar is a standard text file format for calendar files.
Long answer : Internet Calendaring and Scheduling Core Object Specification (iCalendar) - read the RFC 2445 ;)
What is PloneiCalendar
PloneiCalendar is a simple product designed by Ingeniweb to handle calendar files in Plone.
It is based on the iCalendar file format. iCalendar can be used to transport personal calendaring information between applications of your choice whether they are personal information managers, email systems or web browsers.
Once an iCalendar is created in plone, you can share it with other users or groups, keep it private or modify it by using standard calendar applications like mozilla calendar or ical.
The iCalendar view allows user to view the calendar by launching the default application for calendar files or download the file.
What you need
Server side :
- Plone 2 on Zope 2.7
- PloneiCalendar
Client side :
- Mozilla Calendar
or
- Apple iCal
(or Ximian Evolution or KOrganizer or whatever - may be even Outlook ;) )
Starting a webdav server
To allow webdav transaction in zope you will have to put these line in zope.conf :
<webdav-source-server>
address myical-dav.domain.com:8090
force-connection-close off
</webdav-source-server>
DNS & Apache configuration
Assuming you have 2 hosts declared in your DNS for your box :
- myical.domain.com
and
- myical-dav.domain.com
Configure your Apache, so that, to access your website, one use this link :
myical.domain.com 8080
and use the webdav server, one have this :
myical-dav.domain.com to port 8090
Installation
Plone 2 :
Install Plone2.
PloneiCalendar :
Untar the product in the Product folder of zope.
Install PloneiCalendar. The installation is fully automatic, use the quickinstaller tool.
Settings
To return a correct link to webdav server, you have to customize the ics_url.py python script in iCalendar skin. In portal_skins/ploneicalendar/ics_url.py click on customize.
Original script is :
from string import replace
url = context.absolute_url()
return replace(url, 'http', 'webcal')
Replace it by :
from string import replace
url = context.absolute_url()
url = replace(url, 'http', 'webcal')
return replace(url, 'myical.', 'myical-dav.')
This will return an url like that :
webcal://mycal-dav.domain.com/
What does the installation do
At the installation of the product, two roles are created : LocalReader and LocalWriter.
These roles will be used as local roles, to allow access to icalendar products in plone.
How does it work
It works like a classic file in plone.
Go in the user folder. Add an iCalendar.
Fill in the form :
Give a title, it will be the name of your iCalendar.
Give a short description.
Upload an existing ics file (if any)
Note that all fields are optionnal. If no title is given, a random id is generated. If no ics file is given, the product proposes an virgin ics file.
Share my Calendar
You can share your iCalendar. Click on sharing. This screen is showing the users or the groups that have local permissions on your iCalendar.
Permissions :
- LocalReader can only see an icalendar but cannot modify it.
- LocalWriter can see and modify an icalendar.
Note that when you create an icalendar, you are shown in sharing view as LocalWriter.
You can choose to assign local roles to group or to users.
NB : This screen is NOT the sharing tab of Plone 2; it's a simplified and specialiserd version for PloneiCalendar
View my iCalendar
There are several ways to see an iCalendar.
Plone :
In iCalendar View, the link "Click here to view the file". It launches the default application to see calendar files.
Use an application :
If you are on Apple, use ical else you can use Mozilla Calendar. The two applications are the same, at the difference that mozilla calendar can read and write on a calendar, and iCal can only read or write on it.
Modify my icalendar
To modify your iCalendar, you must have LocalWriter role (read : you must own this calendar or be allowed by its owner to write into it)
- with Mozilla Calendar :
Click to view the iCalendar and modify it. Do not forget to publish it.
- with iCal :
You have to subscribe to an iCalendar (with its webdav url).
Future - Roadmap
Next version of PloneiCalendar will integrate a parser and display calendar-based content directly into Plone. Any volunteers welcome !

