22 April 2009 - 7:13pmVersion 0.3

, , , , ,

I’ve just released version 0.3 of the Google Calendar Feed Parser.  This update was a quick one but definitely deserved a new version number.  Since I wrote the plugin I’ve received feedback from many users indicating that PHP’s file_get_contents() would not work on their hosting provider.  A few of these users posted alternative code that used cURL instead and that fixed the problem for everyone.  Today, the author of onigoetz.ch left this comment on my blog about some work he did to the plugin.  Specifically, he mentioned a function called wp_remote_get().  I wasn’t able to find that function in the documentation for WordPress, but searching for it led me to what I think he may have meant: a function called wp_remote_fopen().  This is essentially a wrapper function for retrieving the contents of a file from a URL and will first try using fopen() and, if that fails, fall back on using cURL.

I’ve updated the code to use that function which should come as a relief to many who were forced to hack at the plugin’s code to get it to work on their hosting provider.  A big thanks to onigoetz.ch for making me aware of that function!

6 Comments | Categories: COSI, Programming

19 April 2009 - 2:58amVersion 0.2

, , , , , ,

I just released version 0.2 of my Google Calendar Feed Parser plugin for WordPress. The new version confirms compatibility up to version 2.7.1 of WordPress and also adds one new pseudo-feature.

When I originally wrote the plugin, I had some trouble with the start and end times for events displaying in the correct timezone.  To solve the issue (just for EST), I added a hard-coded number of seconds to each time.  This presented a problem when daylight savings time changed since now all the times were displaying one hour off.

To temporarily fix this problem, I’ve added an option to the administrative interface for the plugin that allows the user to directly set the offset (in seconds) that gets added to the start and end times for each event.  This way, a user can test different values to see which one produces the desired result for their timezone.  I call this a pseudo-feature because I hope to replace it with a more comprehensive timezone configuration section at some point in the future.

Version 0.2 can be downloaded from the WordPress Plugin Directory.  Users with version 0.1 installed should be prompted to upgrade from the plugin section of the WordPress admin interface (I’m excited to see if that just works without any effort on my part).

1 Comment | Categories: COSI, Programming

7 April 2009 - 10:44amUpdate: Google Calendar Feed Parser

, , , , , ,

I was just looking through some old posts and came across this one that was a follow up to my release of the Google Calendar Feed Parser plugin for WordPress.  At that point (about 2 weeks after the release), I’d had my plugin downloaded 50 times.  I thought that was amazing and it felt pretty neat to know that people were actually using something I made.

Inspired by reading that just now, I decided to check and see the status of my plugin as of today… about 10 months since the release.  I’m really excited to report that it has been downloaded 1,315 times.  Maybe this summer I’ll have some free time to do some more work on the plugin (add a few missing features and fix some bugs).

5 Comments | Categories: COSI, General

23 July 2008 - 3:34pmSweet!

, , ,

I was looking at my site’s stats on my Google Analytics account today and I noticed three referrals from a URL I’d never heard of before. Drilling deeper into the report revealed that the referring URL was the “plugins.php” page of this person’s blog. Still not understanding what was going on, I went to this person’s blog and poked around a little and then it hit me… the author of http://burkeism.com/blog is using my Google Calendar Feed Parser plugin! Woo!

What a good feeling it was to see someone actually employing my code on their own website. If you are a Google Calendar Feed Parser user, please leave a comment and let me know. And, if you’re the author of burkeism.com, leave me a comment and let me know how it’s worked for you. And, if you’re a user and you really like my plugin, link to it on your blog so others can find it too!

Edit: Further perusal of my Analytics reports revealed more users of my plugin! I’m psyched. In addition to these referrals from other blog’s “plugins.php” (which are a result of someone clicking on my name in their WP admin panel), I’ve also had 150 referrals from the WordPress Plugins site and my plugin has been downloaded 93 times. Also, a simple search for my plugin (or any derivative thereof, including “google calendar feed”) on Google gets you to my plugin from the first page of results (a search for the exact title “Google Calendar Feed Parser” yields the number one result!).

1 Comment | Categories: COSI, General

21 June 2008 - 9:49pmMy First WordPress Plugin

, , , ,

I just wrote my first WordPress Plugin! You probably just saw my post about it… I decided to do a formal post to document the plugin (which I can use for the plugin’s URL on the WP Plugin site) and then post afterwards to announce it to the masses.

Anyway, it’s called Google Calendar Feed Parser and it does basically what the title implies. You give it the URL for a Google Calendar feed and it parses and displays the feed for use in a sidebar to show upcoming events on your calendar. There are still a lot of improvements that I’d like to work into it, but version 0.1 has some pretty solid core functionality and should work well in any WordPress theme.

Try it out on your blog and let me know what you think. I’m excited about it and I plan to continue working on adding functionality so suggestions are very welcome.

Leave a Comment | Categories: COSI, General, Technology

21 June 2008 - 9:40pmGoogle Calendar Feed Parser

, , , , ,

Update: Version 0.2 was released today (4/19/2009) which allows configuration of a timezone offset that can be customized to force start and end times from the XML feed to be displayed in the desired timezone (see documentation of the option below).

Update: I’ve added a screenshot of the plugin in action on a blog I administer.  You can view it here.

Google Calendar Feed Parser is a WordPress Plugin designed to facilitate incorporating a Google Calendar XML feed into your WordPress blog.  I wrote this plugin after being unable to find an existing plugin to provide similar functionality.  I intend to keep this plugin up to date, compatible with the most recent releases of WordPress, as they occur.  If you have suggestions, comments, advice, etc. or you would like to help me develop the plugin, feel free to leave a comment and I’ll get back to you.  Any help is appreciated (especially since this is my first WordPress Plugin).  Please let me know if you have any timezone related issues, I had some odd problems getting the times to appear properly.

To install Google Calendar Feed Parser:

  1. Download the zip archive and extract it to the wp-content/plugins directory.
  2. Go to the “Plugins” page in the WordPress Admin interface and click the “Activate” link for the Google Calendar Feed Parser.

To configure Google Calendar Feed Parser:

  1. Go to the “Settings” page in the WordPress Admin interface and click the link for the “Google Calendar” page.
  2. Set the URL for the calendar feed and other settings as desired (see below for full explanation of all options).


  1. Feed URL: This is the URL of the feed you wish to incorporate in your blog.  It should be of the form:


    • For a listing of available parameters, see the Google Calendar API documentation. I found the following query string to provide desirable results:


    • Note that the max-results parameter should not be specified here as it will be handled by the setting below.
  2. Static URL: Use this option if you want to have each event link to a single URL (e.g. have each event link to a page where you’ve embedded your Google Calendar).  If you leave this set to “No”, the plugin will use the link provided by the feed for each individual event.
  3. Max Results: Use this to set the maximum number of events to retrieve and display from the calendar.  If left blank, the plugin’s default is 4.
  4. Timezone Offset: Change this value only if you are having issues with times from the feed displaying correctly. The value supplied in this field is a number of seconds added directly to both the start time and the end time for each event. The default for this value, if left blank, is 7200 seconds. Note: In a future release of the plugin, this option will be replaced with a more comprehensive timezone customization feature.

To Use Google Calendar Feed Parser:

  1. Include a call to the function gcal_parse_feed() at the spot where you want the feed to appear.  I use the feed in my sidebar but you could use the feed wherever you want.
  2. Include style rules in your template’s stylesheet to customize the look of the feed.  A single event outputted from the plugin would be of the form:

    <div id=”events”> <div class=”event”> <h3><a href=”http://some-link-here”>Event Title</a></h3> <p id=”event_time”>July 12, 2009 from 9:00pm to 10:00pm</p> </div> …more events here… </div>


If you like this plugin, please consider donating.


Version 0.1 (first):

  • Ability to set feed URL.
  • Choice of whether to use event URL from feed or static URL for each event.
  • Ability to set max-results parameter.

Future Functionality:

  • Ability to customize query string from the Admin interface in WordPress.

90 Comments | Categories: COSI, General, Technology