Hi
I am using DaviCAL with CardDavMATE and CalDavZAP. Is there any way to sync contacts birthdays with calendar?
Vasyl
Hi Vasyl,
there is no such thing as "birthday calendar" specified in RFC (at least I don't know about it).
There are 2 ways to implement this feature: - server side (server extracts the BDAY attribute from vCards and creates events in a calendar collection /performed only when vCard is created or modified/) - client side (CalDAV client needs to download ALL vCards /contacts/, extracts the BDAY attribute and show the date as an event)
We can implement only the second version but it is a VERY BAD idea to download a ton of contacts if we need only one attribute (JavaScript performance, network bandwidth, ...).
JM
On 28 Nov 2014, at 19:57, Vasyl Olenchenko olenchenko@gmail.com wrote:
Hi
I am using DaviCAL with CardDavMATE and CalDavZAP. Is there any way to sync contacts birthdays with calendar?
Vasyl
Hi Jan.
OK, I understand. Maybe you know/seen someone implemented it on server side (DaviCAL would be great, but other server software is OK). Some examples or instructions would really help.
Once again, thanks for your help.
Vasyl
On 29.11.2014 1:14, Ján Máté wrote:
Hi Vasyl,
there is no such thing as "birthday calendar" specified in RFC (at least I don't know about it).
There are 2 ways to implement this feature:
- server side (server extracts the BDAY attribute from vCards and creates events in a calendar collection /performed only when vCard is created or modified/)
- client side (CalDAV client needs to download ALL vCards /contacts/, extracts the BDAY attribute and show the date as an event)
We can implement only the second version but it is a VERY BAD idea to download a ton of contacts if we need only one attribute (JavaScript performance, network bandwidth, ...).
JM
On 28 Nov 2014, at 19:57, Vasyl Olenchenko olenchenko@gmail.com wrote:
Hi
I am using DaviCAL with CardDavMATE and CalDavZAP. Is there any way to sync contacts birthdays with calendar?
Vasyl
Hi Vasyl,
On 29 Nov 2014, at 08:01, Vasyl Olenchenko olenchenko@gmail.com wrote:
Hi Jan.
OK, I understand. Maybe you know/seen someone implemented it on server side (DaviCAL would be great, but other server software is OK). Some examples or instructions would really help.
I don't know about anyone who implemented this functionality but if you want to implement it in DAViCal then:
- create a plsql function + "after insert or update or delete" trigger on the caldav_data table (which calls your plsql function) - extract the BDAY attribute from the VCARD (if the data type is VCARD) - choose the destination collection from the collection table (where you want to put the birthday event) - create a VCALENDAR/VEVENT text object (which represents the birthday event) - put it into the destination collection (caldav_data table + calendar_item table) - after putting the data into the 2 tables call the write_sync_change plsql function (required by sync-collection report/sync-token synchronization)
JM