Skip to main content

Embedding Google Calendar Events in a Club Web Site

I maintain a web site for a Scottish Country Dancing group, Thistle Society Wigan (http://www.thistlesociety.org.uk/).  As part of this I need to update the list of forthcoming events for the society and this can be quite time consuming. So I wondered if I could find a way to simplify the way events were maintained – or better still make it possible for other group members to update them. Google Calendar fitted the bill.

However, to make it work I needed to a bit of work – to create a Calendar, load the existing events into it and make them appear in the web site. I implemented it in a series of steps, and, of course, encountered a ridiculous number of problems on the way!

The web site is built using XSL transforms applied to XML page and data files by Apache Ant build files and an XML Schema makes editing the data files slightly easier. I chose these technologies as I was very familiar with them having used them in a range of recent client projects.

My first task would be to create a new Google Calendar – a simple enough task using a new email address registered to the group site; calendar@thistlesociety.org.uk.  Next I loaded the XML event data into a throw away C# application (which started out as an event editor) and uploaded it to the Calendar.

And finally, I just needed to present the events on the web site.

As I have also been working on a new WordPress Theme for this blog I decided that I would use my slowly developing PHP skills to implement the content generation. However, after a series of set backs followed by some good advice from colleagues I finally settled on using JavaScript with jQuery and only a small amount of PHP.

I found XAMPP (http://www.apachefriends.org/en/xampp.html) very useful for testing the changes locally – but hit problems because of differences between PHP versions and settings compared with the live site.

In the next few posts I’ll describe each of the steps; highlighting the problems I had on the assumption that others may be having the same problems.

Leave a Reply

Your email address will not be published. Required fields are marked *

*