Harper Reed: Tech, Mobile, Yo-yoing and Death Metal

Harper Reed: Software, PHP, MySQL, XMPP, Hacking, Baphomet

gcal: google calendar wordpress plugin

I have released my first wordpress plugin. It allows a user to take the public shared calendar feed from goodle calendar and display it in a useful fashion on their wordpress blog.

You can see the result of the plugin here: my calendar

you can download it here: gcal.tar.gz

read about it more here: plugin page

Let me know if you have any suggestions or any bugs. Feel free to leave comments or email me at harper @ nata2.org.

Awesome.

12 Responses

  1. Victor

    May 10th, 2006 at 3:54 am

    1

    Really sweet gcal plugin, I had it working for a while, and it still works, just not all of my upcomging events show anymore. I’m just starting to play around with wordpress. Any ideas? THanks

    http://www.vrdt.net/vtan/index.php/

  2. Victor

    May 11th, 2006 at 11:05 am

    2

    Just wanted to let you know that I got it working again. I had to reinstall the plugin and clear out gcal records in the mysql database, but now my dates are showing a day behind of the actual event. Ex. A birthday that is May 21, will show for May 20th. It seems that an all day event in gcal would be inputted as 2006-05-21 to 2006-05-22 with no time value attached to it, not sure why it would be a day behind. If you have a non-all-day event with a time value, it works great. Are you having the same problem? If not, how would I go about fixing it? Thanks

  3. harper

    May 11th, 2006 at 7:44 pm

    3

    I will take a look at it.

    i did notice the all day event bug and i think i need a way to style the output so it isn’t so boring. but yea. it barely works ;)

  4. dm

    May 19th, 2006 at 11:50 pm

    4

    I know this plugin is still under development but I cannot get it to pull *any* of my data from Google.

    see here:
    http://thewitnessexchange.net/?p=565

    Also, I tried the sidebar code as well and, strangely, only one item showed.

    Everything is properly ’shared’ and I am stumped as to how to fix this! Please help! This plugin looks sweet and I’d love for it to become my only calendar on my blog!

    Please contact me with any questions and many thanks in advance!

    dm@twx

  5. wes

    May 23rd, 2006 at 2:32 pm

    5

    I am looking for something much like this for a new website I’m putting together… great job!

    I tried gcal, it kind of worked… had some trouble with getting all the events to show… but my main problem is that it broke my lightbox. I am using lightbox to view photos on the site and this quit working altogether… don’t know what the problem is. Any ideas?

  6. tjwood

    June 5th, 2006 at 7:42 pm

    6

    Hi, the plugin sounds cool, but I can’t quite get it to work…
    I followed the installation instructions as far as “Go to the options->gcal”.

    My Options->gcal link points to /wp-admin/gcal/gcal.php. When infact gcal.php is in /wp-content/plugins/gcal.php. But if I type in that URL directly I get “Fatal error: Call to undefined function: is_plugin_page() …”

    Any suggestions?

  7. Loopion

    June 8th, 2006 at 8:47 pm

    7

    Hi !

    I can’t see my upcoming.

    http://bi.emmanuelpays.com/calendrier/

    and here is my Public RSS :

    http://www.google.com/calendar/feeds/s7tf3fcqkset8i9ptlukib7om0@group.calendar.google.com/public/basic

    Do you how to resolve this bug ?

    Thx to E-mail me.

  8. seiyuu3 test » Blog Archive » Added the Upcoming events thingy on the side.

    June 29th, 2006 at 1:15 pm

    8
  9. CogDogBlog » Barking » In Search of Google Calendar Plugin

    December 1st, 2006 at 6:43 pm

    9

    [...] * gCal plugin – has a nicer WP interface, but I could not get it do see more than one past events [...]

  10. Russell

    December 12th, 2006 at 3:25 pm

    10

    What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?
    Thanks.

  11. Mean Dean

    January 2nd, 2008 at 4:27 am

    11

    I’m trying to download your excellent plugin – but getting a “server not found” error.

    Not sure if it is’ my side or yours. I’ll wait till I get into the office to recheck – but you might wanna see if your end is also up’n running.

    Tanx!

  12. flo

    January 11th, 2008 at 4:30 am

    12

    would be nice if you can upload the file again!

    greets

gcal: google calendar wordpress plugin

gCal Plugin
display your shared google calendar events on wordpress find newest version at: http://www.nata2.org/stuff-i-do/gcal-google-calendar-wordpress-plugin/

Copyright (c) 2006 Harper Reed
http://www.nata2.org
harper@nata2.org

Get It:

You can see the result of the plugin here: my calendar

you can download it here: gcal.tar.gz

Notes:

This is broken. relaly broken. i swear google changed something. because it onced worked. no idea.

Inspiration from FlickrRss, Adsense-deluxe and Falbum – nice work guys
I looked a gcalendar widget quite a bit. it was nice.
I am using the calendar script from Benjamin Kuz * http://ben.nullcreations.net

Usage/Installation:

  • Basically install the plugin by placing the gcal dir in the plugin directory.
    • Try not to rename the dir (i shoudl fix that).
  • Optionally copy the included wp-includes/rss-includes.php
  • This solves a problem with the magpie version
    • (thanks http://ottodestruct.com/blog/2006/04/18/google-calendar-widget/)
  • Go to the options->gcal
    • Configure the shit out of it.
    • really all you need is your public xml link from the shared google calendar
    • Place the appropriate code in your template or page

Code:

Upcoming events list (great for sidebars):

get_gCalUpcomingEventList()

This function can take the following arguments:

  • string $feed,
  • int $num_items,
  • string $dateformat,
  • string $dateseparater,
  • int $titlelength,
  • string $before,
  • string $after

Calendar in a page or entry:

< !--gCalendarMonth-->

This is stylable by CSS included in the gcal dir

Blog view of upcoming and past events:
< !--gCalendarBlog-->

Future:

This obviously needs some work. but is a good start for a days worth of hacking. Please let me know about bugs and what not.

LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html


RSS feed for comments on this post

Leave a reply

Hi. My name is Harper. I am an engineer involved in social networks and the open source software. I am very happily employed as the CTO of the awesome skinnyCorp/Threadless in Chicago, IL. We make some really cool stuff. This is obviously my blog. I write about everything from being a professional yoyoer to hacking the newest Internet appliance. Be sure and check out my homepage at harperreed.org. If you are so interested, my resume is located here. I love getting emails and what not so feel free to contact me through here.

Be sure and take a gander at my photos.

If you want to contact me click here to start a chat.