There are some limitations with Google Calendar:
- When you create an event you cannot add custom fields. There's no field for a brief description (teaser) or image.
- When I asked Google how to add additional fields they recommended using the API and writing a custom application that uses the google calendar database as a backend. Unfortunately I don't have the time or the resources to do that right now.
How did I do it?
To get around this I added the subject and the image to the description but google likes to strip out the html tags. I created a new event on my calendar and in the description box I typed:
This is my description of the event. It can be as long as I need. This is where I would type all the details that would show up after someone clicks the link.
Subject: This is my teaser
I parsed the xml file created by google and extracted the image and subject from the description. I wrapped the image and subject in the proper html tags when I displayed the content on my webpage.
Here is what the Google Calendar XML file looks like: http://www.google.com/calendar/feeds/jazzerup%40gmail.com/public/basic
I found a free ASP script to display RSS/XML feeds - ByteScout (Big thanks to ByteScout for sharing your code with the world)
Download my modified version
I used regular expressions to extract the subject and image. Please note I'm awful at Regular Expressions but I found this great site where people share their completed expresssions: http://regexlib.com/
To install this code you'll need to change the URLToRSS = http://www.google.com/calendar/feeds/jazzerup%40gmail.com/public/basic
to your Google Calendar XML Address.
How do I find my Google Calendar XML Address?
It's a little tricky to find your XML Address
Step 1: Open your Google Calendar: http://www.google.com/calendar
Step 2: Click on "Settings" in the upper right hand corner.
Step 4: Under "Sharing" click on "Sharing:Edit Settings"