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).

Options:

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

    http://www.google.com/calendar/feeds/userID/public/full?param=value&param=value…

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

      ?orderby=starttime&sortorder=ascending&futureevents=true&singleevents=true

    • 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>

Donations:

If you like this plugin, please consider donating.


Changelog:

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

12 June 2008 - 10:13amFirefox 3 Release Date Announced

The release date for Firefox 3 has been announced. On June 17th, Firefox 3 will be released to the masses. Download pledges on spreadfirefox.com have reached 1,095,440 as of 10:10 this morning. To pledge your download and help Mozilla set a world record, click the link on the right and sign up for notification emails.

Leave a Comment | Categories: COSI, General

6 June 2008 - 9:03pmMy résumé

I finished the online version of my résumé today. To view the complete version (with contact information) you’ll have to answer a simple question about me. If you don’t know the answer and you think you should, email me and I’ll decide. Anyway, if you notice any glaring spelling errors please let me know via a comment or an email or something.

Other than that I’ve been working on my church’s website a little lately. As soon as I work out some server issues and get some content up, I’ll post a link here for you to check it out.

1 Comment | Categories: General, Life

6 June 2008 - 9:03pm3 years!

Yesterday was mine and Joelle’s 3 year anniversary. We started dating on June 5th of 2005, the first day of our senior class trip. Now, 3 years later, we’re planning our wedding and our future together. I love her with all of my heart and I can’t wait until we’re married so we can start our lives together!

Leave a Comment | Categories: Life