Hi all,
I had trouble finding a plugin for displaying Google Calendar events on a page, so I wrote a plugin based on the Twitter timeline plugin and SimplePie. There were a few Magpie-based attempts, but none of them suited my needs (in particular, being able to parse out start / end times, the location, and description fields, which Magpie was skipping because they’re unique to the Google feed).
At any rate, here’s what sample code may look like:
{exp:gcal gcal_id="bn44qj4p2l2usv6avn45v7lb28@group.calendar.google.com" from="February 10, 2007" show_future="true" sort_order="a" limit="5" refresh="120"}
<ul>
<li>
{if description}<a href="{description}">{title}</a>{if:else}{title}{/if}<br />
from {start_time format="%Y-%m-%d %H:%i"} to {end_time format="%Y-%m-%d %H:%i"} <br/>
location: {location} <br/>
<a href="{link}">add to your calendar</a>
</li>
</ul>
{/exp:gcal}
In addition to the plugin file (pi.gcal.php), you’ll also need to place the simplepie.inc file in the same location (included in the attached zip).
This is my first plugin, so I’m calling it 0.5 for now. There are a few outlier parameters Google accepts which I didn’t get around to implementing for now.
Hope this is of use to some.
