10842 Posts in 2513 Topics by 1792 members
|Go to End|
25 April 2009 at 9:23am Last edited: 25 April 2009 9:26am
I was wondering if it's possible to display a Google Calendar feed on a calendar grid in a SilverStripe site.
I am coming from the MODx CMS where they have a Google Events snippet that uses SimplePie to reformat the XML feed into the necessary HTML for a calendar table or just about any other markup you want.
An example of it is here http://test.ebenezerbaptist.com in the "Upcoming Events" sidebar container. I used jQuery to display the events one at a time. The snippet also has a preset calendar table that can be used for a full sized month view (which I haven't styled and therefore haven't embeded yet).
Does anyone know if something similar can already be done, if not does anyone want to work on something that will do this? Either a new module or perhaps modifying the current Event Calendar module to accept Google Calendar feeds.
26 April 2009 at 1:44pm Last edited: 26 April 2009 1:46pm
The current development effort in the EventCalendar project is to add this feature, so you're in luck. It will also accept one-time imports of ICS files for those who are migrating calendars. So stay tuned!
The hard part has been finding a reliable ICS parser for PHP. Anything you could send my way would certainly help out a lot.
26 April 2009 at 3:57pm Last edited: 26 April 2009 4:27pm
You said a reliable parser. What have you tried already?
For example could the iCal parser in PHP iCalendar not be integrated?
30 April 2009 at 2:25am
PHP iCalendar does not use a standalone parser. When I took a look at it, it had a bunch of different contingencies and it just didn't look like anything modular that I could port over to the EventCalendar. I've also looked at ICSReader, but the problem is it splits the file into lines, so events with multi-line descriptions break, because it thinks everything after the first line of that description is a new property. I've tried rewriting the regex, but it's way beyond me.
Any help you could offer would be appreciated!
30 April 2009 at 3:23am Last edited: 30 April 2009 3:26am
Would the information here help you?
The page discusses php and pearl methods for parsing.
I also came across this discussion on the parser for phpiCalendar. It is discussing plans for v3.0 I think.
30 April 2009 at 3:28am
Great! Thank you! I must have an old version of PHP iCalendar.
I like this comment on the Parser class:
"please be careful with the explode with spezial characters. a ":" or ";" may also occure in the DESCRIPTION: part."
|Go to Top|