[Davical-general] bugfix + 2 new features

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Davical-general] bugfix + 2 new features

Ján Máté-2
Hi all,

I just added one additional fix for DAViCal (delete the collection properties during the collection removal) + 2 new features.

These features are mostly needed if you want to support iOS/OS X but many other vendors use them too (support in CalDavZAP is coming).

Short explanation:
Maybe you noticed that if you create a calendar (in Calendars.app) or todo (in Reminders.app) collection, these collections are used only for events or todo but NOT both. The reason is that Apple stores a special 'urn:ietf:params:xml:ns:caldav:supported-calendar-component-set' property (DAViCal "property" table) and sets it to '<comp name="VEVENT" xmlns="urn:ietf:params:xml:ns:caldav"/>' or '<comp name="VTODO" xmlns="urn:ietf:params:xml:ns:caldav"/>'. The problem is that in DAViCal you cannot create an event/todo only collection - so I extended my previous patch (see http://repo.or.cz/w/davical.git/commitdiff/be5227f0cac1a467770cdbb8544e5491799ac06d and http://wiki.davical.org/w/Configuration/settings/default_collections) with 2 new options:
1.) 'calendar_components' - it allows you to set the supported-calendar-component-set for newly created collections (see below)
2.) 'default_properties' - it allows you to set ANY custom property for newly created collections (see below)

Example usage - create one collection for events, one for todo and one addressbook + set default colors for event & todo collections (used by iOS/OS X):

DAViCal GIT + fixes: http://www.inf-it.com/fixes/DAViCal_GIT-2013-04-01.zip (see below if you want to apply the new patches only)

From the readme.txt

    fix to delete the collection properties during the collection removal
        !!! NOTE: you also need to update your database! For quick fix see: http://www.inf-it.com/fixes/caldav_functions-fix.sql
    extended the $c->default_collections option - added 'calendar_components' and 'default_properties'
        // 'calendar_components' sets the 'urn:ietf:params:xml:ns:caldav:supported-calendar-component-set' property for
        //  the calendar collection (used to distinguish between different type of calendar collections, for example: todo and event calendars)
        //   the value must be a non-empty array; allowed values: 'VEVENT', 'VTODO', 'VJOURNAL', 'VTIMEZONE', 'VFREEBUSY', 'VPOLL', 'VAVAILABILITY'
        //   for example:
        //    array('VEVENT')
        //    array('VTODO')
        //    array('VEVENT', 'VTODO')
        //    null or undefined => all default calendar components are supported - see $c->default_calendar_components
        //    NOTE: if you want to change the value of this property later, you need to do it directly in the database ("property" table) or in the client software!
        // 'default_properties' sets custom properties for the collection in the "property" table
        //  the value must be a non-empty associative array of key => value pairs (key = property name, value = property value)
        //  for example (set the calendar color property used by Apple and other clients):
        //   'default_properties'=>array('http://apple.com/ns/ical/:calendar-color'=>'#ff0000'),
        //    null or undefined => no property is stored in the database
        //    NOTE: if you want to change the value of this property later, you need to do it directly in the database ("property" table) or in the client software!


Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
Davical-general mailing list
[hidden email]

smime.p7s (6K) Download Attachment