Please note!

This is an archived, inactive copy of
"IMD group calendar solution using microformats and Technorati"

Please do not link to this page.


November 14, 2006

IMD group calendar solution using microformats and Technorati

Posted by bopuc at November 14, 2006 07:46 PM

I woke up this morning with, in my head, the first words from an email I had gotten from Scott last night, pleading: "*Desperately* need some kind of shared calendar capability on the [IMD] events page."

"How could I do this?" I thought. The existing events page was already an aggregate of all posts that IMD students and staffers had tagged as "events", so we already had "something". Just not a calendar, and no vCal file...

I spent breakfast researching possibilities:
- create a group on Upcoming and fetch the output from there? No good; it's a separate system, user logins, entry screens etc. I need something integrated.
- hack apart the Drupal "events" module for the calendar display code. Possible. Poked around in there for a few minutes... yeeeeaaahh not so much... drupal modules are pretty deeply integrated with the whole Drupal framework. Not gonna happen.

Let's see if there's anything I can do with Microformats' hCalendar. Neat, they provide a web-based, Javascript enabled hCalendar creator form. Very handy. Zoink!

Since for the IMD blog system I already have a custom Post screen, it was no problem to add a quick link to the above creator and add some instructions: "If you are posting an event, plug the info into this form, then copy and paste the HTML it gives you back into your blog post."

Great, now I have a reasonably easy way for the people to add hCalendar data to their events-related blog posts. Now I need to *do something* with that.

To his great chagrin, Hugh recently showed me Technorati's hReviews service. Maybe they have one for events? Yes sir they do. And what that form is, is essentially a front end for a RESTful hCalendar munging webservice. I feed it an html file full of hCalendar data, it gives me back.. a vCal file.

So, now, every 15 minutes, I fetch that vCal file and feed it to PHPiCalendar and presto: I have a group calendar generated from blog posts.

2 1/2 hours, from initial concept to completion.

(No, switching to Drupal in one afternoon was not only not possible, it was not an option. ;)

Comments