Create a iCal Feed for Events Calendar
Member Raffi Khatchadourian wonders if we can add new functionality that would enable events to "feed into" external calendar clients instead of the manual export/import scenario we have now.
This is somewhat related to https://redmine.gc.cuny.edu/issues/4423
#1 Updated by Boone Gorges over 6 years ago
- Assignee set to Raymond Hoh
- Target version set to Future release
Ray, I know we've talked about this in the past, but I can't remember where. Pinging you for your thoughts.
It looks as if EO offers the shortcode 'eo_subscribe' for its native calendars. The calendar links themselves are basically generated by `get_feed_link()` or `get_term_feed_link()`. We could do something similarly simple, though the feed URL would be funny. Alternatively, we could build our own feed handler, and serve our own feed, at a more predictable URL, like example.com/groups/mygroup/events/feed/.
The second potential complication is privacy. Events linked to private groups are themselves private. Since feed requests would not be authenticated, they wouldn't include any private events. And BP will natively try to prevent unauthenticated requests to any URL under a private group, including /events/feed, which will make it impossible for anyone to subscribe to a non-public group's feed. We could probably build a system of private keys or something like that (the URL would be /events/feed/?key=abc123) but this is a pretty flimsy layer of privacy.
#2 Updated by Raymond Hoh over 6 years ago
We could probably build a system of private keys or something like that (the URL would be /events/feed/?key=abc123) but this is a pretty flimsy layer of privacy.
I do not think this is flimsy, Google Calendar operates in a similar manner with public and private iCal links.
https://www.google.com/calendar/ical/EMAIL/public/basic.ics (shows only public events for the user)
https://www.google.com/calendar/ical/EMAIL/private-HASH/basic.ics (shows all events for the user)
Maybe we can go with:
example.com/groups/mygroup/events/ical/HASH for private iCal feeds. Similar to Google, we'd need an interface for group admins to reset the private iCal hash.
For users, we'd need to do something similar.
#5 Updated by Raymond Hoh over 6 years ago
Okay, so a first pass of this is ready for testing on cdev.
At the bottom of a user or group events calendar, you will now see a "Subscribe" block.
On a user's calendar page, you will see two iCalendar links: Public and Private.
Private iCalendar links are special as they look like this:
Private iCalendar links consist of both public and private events that the user has posted. Members are also able to reset the hash just in case they want to change the private link for privacy reasons. This can be done on a user's "Events > Manage" page.
On a group's calendar page, you will only see one iCalendar link. If the group is private or hidden, there is an extra "Events > Manage" tab so the group admin can reset the private iCalendar URL.
Let me know what you think once you've had a chance to test.
#7 Updated by Boone Gorges about 6 years ago
- Status changed from New to Resolved
This is very beautiful <3 I think it makes our Events feature dramatically more useful. Going to mark this resolved for 1.9.
Scott and Stephen, I've copied you so that we can be sure this is highlighted in 1.9 release materials.