A few things I learnt

notes on whatever and more…

iCal 4 WP

What is iCal4WP?

iCal4WP (iCal for WordPress) is a plugin for the popular Wordpress blog system that allow you to create calendars in any WP category. It can list events in the standard Wordpress sidebar as well as generate iCal format feeds that you can add in your calendar application such as Apple iCal, Google Calendar or any other calendar software supporting iCal standard format. Feeds can be generated for one particular category or for all in one. [It allows you as well to do some simple geopositionning to show on a map the location of your event]. See the complete list of features below for more details and the todo list for next version plan. This Wordpress plugin is released under the GPL license. I bet you want to see it in action? It’s fair enough! You can simply check on the left sidebar on this website. You will only see the blog side, I cannot open the backend. But you have some screenshots below.

Features

Event Creation

» Event details (location, date and time, all day event…) form directly accessible in the ‘Write Post’ page iCal Create Event Form » You can set some repeating rules (daily, weekly, monthly and yearly) with a great level of detail, iCal4WP Repeat Options » Events can be in any category, the plugin only search for post with iCal meta data available, » You can specify whether you want the event to show up or not in the blog as a normal post or stay only as an event.

Events and calendars subscription/listing

» A List of events can be integrated in the standard Wordpress sidebar.

iCal4Wp Events List

» It Can generate one single iCal format feed and/or one iCal format feed per category to create specific calendar per category/topic (such as Sport, Culture…).

iCal4WP Calendar Feeds

» iCal feeds are Apple iCal (Apple iCal Icon with webcal:// protocol) and Google Calendar (Google Calendar Icon) compatible. When the post is shown it will list event details in a hCalendar microformat way. hCalendar microformat in iCal4WP

Administration

As a Wordpress plugin, ical4wp, offers you an admin panel in the Options main menu of your Wordpress admin interface.

iCal4WP AdminiCal4WP Widget

and on top of this you have 2 widgets if you are using the Widget plugin.

Geopositionning

» As an option (if you provide a Google Maps Key) you can use Google Maps to show the location of the event, as well as a Google Earth kmz file can be downloaded. » A Google Earth Network Link can also be generated automatically to keep all places put in the blog in one organized file to view in Google Earth. » Geopositionning is still alpha and not everything is yet implemented, I am working on it!

Download & Install

You can simply download the version Beta 2 zip file and:

  • unzip it in your Wordpress’ plugins directory ({WORDPRESS HOME}/wp-content/plugins/ )
  • Go to your ‘Plugins‘ section in Wordpress backend web interface and activate the plugin
  • Go to ‘Options->iCal4WP‘ to configurate the basic option of the plugin
  • Enjoy it!

It is still beta because some features are not yet fully working, such as geopositionning. If you want to list all coming events on your sidebar you have now 2 ways: the simpler one is to use the widget plugin (http://automattic.com/code/widgets/), it is then just a matter of drag-n-drop! The second way is to insert things manually in your theme sidebar.php file:

<h2 class="ical_list_events_title"><?=ical_list_events_title()?></h2><?php if (function_exists('ical_list_events')){ ical_list_events(); }?>

To make a list of all your calendars, including:

  • One iCal format calendar including all upcoming events,
  • One calendar per category (e.g. Sport, Culture…) if a category has at least one event with the end date in the future.
<h2 class="ical_list_calendars_title">< ?=ical_list_calendars_title()?></h2><?php if ( function_exists('ical_list_calendars') ) { ical_list_calendars(); } ?>

Background

This plugin has been developed because I could not find exactly what I wanted with those already available in the Wordpress community. It is inspired by others plugins such as WP-iCal and EventCalendar3, and I want to thanks them for their work that help me a lot. I wanted the iCal feed from WP-iCal (the only one that was working out-of-the-box) and its approach to add meta data to each post that are events but I wanted more, such as geopositionning and integration with Wordpress category. Beside all this, I wanted to use as much as possible the API (…still difficult to find documentation for some “hook” and code) from Wordpress:

  • not to write my own SQL code when I do not have to.
  • store post meta data in one array/object rather than writing one meta row for each which is a waste of database as well as writing/reading time (although very minor in such type of code)…but complexify a little bit some process.

Resources

I want as well to mention some wonderful peace of code that I use in this plugin: Javascript library Prototype and Scriptaculous as well as Google Maps API, not to mention Google Calendar for inspiration.

Known issues, Bugs and Whishlist

I have started to use Flyspray to follow-up bugs and feature request, you can access it at Flyspray for iCal4WP. You can submit bugs and feature request now! You can also join the brand new forum.

  • I still cannot find a way to add directly in Google Calendar althought I am pretty sure it is possible. Any idea?
  • list of events is not ordered correctly by date [BIG BUG!], specially for event with repeat options, thanks Roger!
  • I just discovered that some type of repeating events do not work with Google Calendar although it works with iCal…I love standards!!!

Donate!

You want to support this plugin and speed up the development? Do not hesitate to show your support with a Paypal donation!