Can anybody tell me if calendar is supposed to work with caldav? Or if there is a way to get this functionality out of drupal that I am just missing?

CommentFileSizeAuthor
#8 add_CalDAV_calendar_in_thunderbird.png94.47 KBklonos
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JayKayAu’s picture

Title: caldav? » CalDAV?

+1

Yeah, I'd be really interested in CalDAV syncing if it were to be done as well (in particular, with Google Calendar).

alienseer23’s picture

I'm no coder, even though I can hack into a bit of code form time to time to get a tweak out of a module, but I do know there are some php classes and libraries out there form caldav already. The caldav server I run for myself is php, but it offers no web-based actual calendar system, just the dav backend.

As a matter of fact, there isn't one single functional caldav enabled web-calender out there, unless you bundle in the server with something like Zimbra, Bedework, or the Cosmo server. I think that this functionality in Drupal would be absolutely perfect, it makes sense that it should be there. I really wish I knew how to implement it myself!

alienseer23’s picture

Status: Active » Closed (won't fix)
klonos’s picture

Title: CalDAV? » Add CalDAV support.
Version: 5.x-2.7 » 7.x-3.x-dev
Status: Closed (won't fix) » Active

I realize this one's been closed for some time now (by the same person that initially opened it), but I'd really want to hear what the maintainers of this project think about it - even if it is beyond the scope of this module and should better be implemented as a separate project. Could it be possible at all?

klonos’s picture

...DAViCal mentions a few web-based clients in its known clients list. So I guess it is possible to access CalDAV data over php and there is some code available to begin with or to be based on.

KarenS’s picture

We can leave it open as a feature request. I have no plans to do anything with it unless someone provides a patch or more information about how it works.

klonos’s picture

I can get more in details if you want me to Karen, but here is some info in short (some of it a simple copy-paste from google, wikipedia and elsewhere):

- Calendaring Extensions to WebDAV, or CalDAV, is an Internet standard allowing a client to access scheduling information on a remote server... http://en.wikipedia.org/wiki/CalDAV

- DAViCal is an open source calendaring server that uses the CalDAV format compatible with multiple calendaring clients (is basically a server for calendar sharing)... http://www.davical.org

...So basically a most common use case scenario is that a group of people that want to share calendars/appointments/events would setup a server that supports CalDAV (DAViCal is one such server, but there are others too), then use a client to create/edit/publish/share/ this calendaring info.

The good thing about it is that most of the well known email clients out there support this standard and the use of CalDAV servers' calendars. So the people that have access rights to a CalDAV server/calendar can use the comfort of their favorite UI that they are familiar with for receiving email in order to also make notes of upcoming events, keep track of todos and appointments etc and add reminders for them. All that plus the benefit of that info being sharable with others.

If we were to support connection/subscription to CalDAV servers and pulling of data in order to display it in a calendar on a drupal website, then site owners for example could use their email client on their PC or smartphone to publish events on their site. If support for also pushing data to the CalDAV server was to be added, then site users could add info (such as birthdays for example) that would be visible to the site owner's email client.

So, basically yeah... we would be providing people the choice to either use their email client to do calendaring on their website or alternatively use their website interface. The thing behind it though would be that instead of storing calendar data of a website in our own "proprietary" db/way, we would be using an internet standard.

Hope that is clear enough. Let me know if you need more info on specifics.

klonos’s picture

...here's how it's done in Thunderbird by the way.

klonos’s picture

...now that I think about it, we can go two different ways:

1. Add support of connecting to 3rd party CalDAV servers and importing/syncing data. This includes the risk of people asking support for every CalDAV server out there.

2. Make it so that the Calendar module behaves as a CalDAV server itself (stores data according to the CalDAV standard + exposes that data in a url that people would direct their clients to).

...I wouldn't know about the technicalities involved in these two ways though... or if they are possible at all.

JayKayAu’s picture

Yes, I think that having calendar act as a CalDAV client would be a good first step.. Making Drupal a CalDAV server is probably overkill for the moment.

The use case we had is someone who wanted to add events to their Drupal website by putting things into their desktop calendar app.

One way to start is thinking about how to build a CalDAV bridge between Calendar and http://drupal.org/project/webdav or the Services module.

toddgeist’s picture

Check out SabrDAV
http://code.google.com/p/sabredav/

It should be possible to wire that up to Drupal.

SabreDAV allows you to easily add WebDAV support to a PHP application. SabreDAV is meant to cover the entire standard, and attempts to allow integration using an easy to understand API.

Feature list:

Fully WebDAV compliant
Supports Windows XP, Windows Vista, Mac OS/X, DavFSv2, Cadaver, Netdrive, Open Office, and probably more.
Passing all Litmus tests.
Supporting class 1, 2 and 3 Webdav servers.
Locking support.
Custom property support.
CalDAV (tested with Evolution, iCal, iPhone and Lightning).
CardDAV (tested with OS/X addressbook, the iOS addressbook and Evolution).
Over 97% unittest code coverage.

tgeller’s picture

I've been working on connecting a CalDAV server (probably SabreDAV) to my Drupal site. I figured it would be fairly easy through Feeds, possibly with a script to export the data into a Feeds-compatible format (RSS, CSV) as needed.

I haven't gotten very far on the project yet, but I'm very attracted to the idea of being able to pull the data into Drupal through this module. No hacked-together code!

I was only looking at making my Drupal site *read* the CalDAV data -- that, I think, is the highest priority. (I can use iCal on the Mac as my primary client to make changes.) Second priority would be to allow the Drupal site to *write* to the CalDAV server. I wouldn't let that second priority stand in the way of releasing the first, though.

Wish I had the chops to make it happen! I'd be very happy to do real-world testing if you can get it to that point.

tgeller’s picture

P.S. See http://trac.calendarserver.org/ for some good links re: CalDAV and CardDAV.

KarenS’s picture

Project: Calendar » Date iCal
Version: 7.x-3.x-dev »
Component: Miscellaneous » Code

I decided to set Date iCal up as a new project. It can be expanded to include a Feeds parser for importing ical items and add some features to make it easier to import/export ical feeds. Plus it could have another maintainer that is someone interested in doing more work on the iCal standard. I will be deprecating the Calendar iCal module in favor of that one.

Moving this issue there.

coredumperror’s picture

Version: » 7.x-2.x-dev

If any people are still interested in CalDAV support, please comment here to get my attention. I can't guarantee that I'll have time to implement it any time soon, though.

tgeller’s picture

I'm still very interested.

How much of your time do you think it would take to work out?

coredumperror’s picture

I have no idea. I've been working on Date iCal during work time, since my company's website needs iCal functionality. But since Date iCal 7.x-2.x is essentially done now, I've been assigned to create another new feature of our site.

So, I may be able to work in a few hours here and there, but I won't be able to dedicate my time to Date iCal like I have been over the past weeks.

So, if you want CalDAV support, it would help me immensely if you could do the research for me on how to actually implement it. I'd never even heard of CalDAV before reading this ticket.

sonicthoughts’s picture

Would definitely like CalDAV if possible - Google Calendar is quite popular. I'm not a programmer but did a little homework wich may be helpful :
Drupal sandbox: http://drupal.org/sandbox/CashWilliams/1270908 (could be jackpot! may be interested in a collaboration?)
http://www.dcaldav.com/ -not sure about licensing but worth asking....
http://code.google.com/p/sabredav/ - lots of resources for PHP dev.
Some discussion on implementation: http://stackoverflow.com/questions/2378418/building-a-caldav-server-in-p...
http://en.wikipedia.org/wiki/Webcal
http://caldav.calconnect.org/implementations/clients.html -list of clients
http://caldav.calconnect.org/
https://datatracker.ietf.org/doc/rfc4791/
http://www.calconnect.org/

Found this page as a good overview of what it is relative to iCAL:

Internet Calendar Subscriptions

An Internet calendar subscription is simply an iCalendar data file made available on a web server. However, rather than using a web browser to download the calendar data, calendar clients can instead use the URL to the calendar data on the web server to download the calendar data themselves. Additionally, the clients can check the web server on a regular basis for updates to the calendar data, and then update their own cached copy of it. This allows calendar data that changes over time to be kept synchronized.
CalDAV

CalDAV is a calendar access protocol and is defined in RFC 4791 [6]. The protocol is based on WebDAV which is an extension to HTTP that provides enhanced capabilities for document management on web servers.

CalDAV is used in a variety of different environments, ranging from very large internet service providers, to large and small corporations or institutions, and to small businesses and individuals.

CalDAV clients include desktop applications, mobile devices and browser-based solutions. It can also be used by "applets", for example, a web page panel that displays a user's upcoming events.

One of the key aspects of CalDAV is its data model. Simply put, it defines a "calendar home" for each calendar user, within which any number of "calendars" can be created. Each "calendar" can contain any number of iCalendar objects representing individual events, tasks or journal entries. This data model ensures that clients and servers can interoperate well.

In addition to providing simple operations to read, write and delete calendar data, CalDAV provides a querying mechanism to allow clients to fetch calendar data matching specific criteria. This is commonly used by clients to do "time-range" queries, i.e., find the set of events that occur within a given start/end time period.

CalDAV also supports access control allowing for features such as delegated calendars and calendar sharing.

CalDAV also specifies how scheduling operations can be done using the protocol, rather than, for example, sending scheduling messages via email. Whilst it uses the semantics of the iTIP protocol, it simplifies the process by allowing simple calendar data write operations to trigger the sending of scheduling messages, and it has the server automatically process the receipt of scheduling messages. Scheduling can be done with other users on the CalDAV server or with calendar users on other systems (via some form of "gateway").

tgeller’s picture

Awesome research, @sonicthoughts!

The motivation: With CalDAV support, a Drupal site can replace functionality in Google Calendar and iCloud. That's personally important for people (like me) who want to be able to sync to a server, but don't want their personal data on someone else's metal, where it's likely to be sold, scraped, lost, etc..

coredumperror’s picture

Full disclosure: this looks too ambitious for me, considering the small amount of time I'll be able to work on Date iCal in the future. If anyone would like to be added as a co-maintainer for Date iCal to create this kind of functionality, I'd be happy to add you.

Also, it may make more sense to implement CalDAV as a separate module, since it may be slightly out of scope for Date iCal. Having it interface with Date iCal could work, though.

coredumperror’s picture

Status: Active » Closed (won't fix)

This is definitely too much work for me to do on my own.

If anyone would like to develop this functionality themselves, though, I'd be more than happy to help integrate it into Date iCal.

klonos’s picture

Status: Closed (won't fix) » Postponed

...postponed then ;)

Anybody’s picture

Component: Code » iCal Import
Issue summary: View changes

This feature is still very very interesting and exciting to Drupal I think. I'd also be interested to use and provide SOME implementation support, but my time is also limited so I can't do it all on my own.

Is there already another module which solves this problem or has reached a first step already?

coredumperror’s picture

There's an old sandbox module here which might have some useful info. And the dCaldav project looks very promising as well, though it's a Drupal 6 module, and apparently licensed in such a way as to be difficult to make use of for this purpose. Then there's the DaviCal wiki, which might have some useful info in its CalDAV Clients list.

jmcejuela’s picture

I created this module to read & write to CalDAV servers. You can create for example drupal nodes/pages with the information of your calendar events.

Hope you find it useful!