EventCalendar 3.0.3

I’ve released a bugfix version of EventCalendar v3.0. Download it here: eventcalendar30.zip

The main changes are:

  • (Sort of) compatible with WordPress 2.0. A hack to WP is required (see below), and even then the category listing doesn’t work. (thanks everyone)

  • Compatible with iCal 2 (thanks Heather)

  • Now works better with WordPress pages. (thanks David Ellenwood)

  • Added per month header option to event listings. (See readme.txt. Thanks Jeff Morrow for the idea.)

  • Now uses ‘siteurl’ and ‘home’ correctly. (Thanks to Sibo Lin & Rusty Smith for putting me straight.)

  • Fixes incompatibility with PHP5.

Patch for WordPress 2.0

The following patch is required to get the basic functionality running on WordPress 2.0. Patch the file wp-includes/classes.php by adding lines as below. Add the lines starting with ‘+’, but don’t include the ‘+’ itself:

--- wp-includes/classes.php
+++ wp-includes/classes.php
@@ -661,6 +661,18 @@
            } else {
                if (mysql2date('U', $this->posts[0]->post_date_gmt) > mysql2date('U', $now)) { //it's future dated
                    $this->is_preview = true;
+                   /* DIRTY FUTURE-POSTS HACK FOR EC3 */
+                   if (function_exists('ec3_get_calendar')) {
+                       global $ec3;
+                       $ec3_post_0_is_event = intval($wpdb->get_var(
+                           "SELECT COUNT(0) FROM $wpdb->post2cat WHERE post_id="
+                           .$this->posts[0]->ID." AND category_id=$ec3->event_category"));
+                       if ($ec3_post_0_is_event) {
+                           $this->is_preview = false;
+                       }
+                   }
+                   if ($this->is_preview)
+                   /* DIRTY FUTURE-POSTS HACK FOR EC3 */
                    if (!current_user_can('edit_post', $this->posts[0]->ID)) {
                        $this->posts = array ( );

Mailing List

If you have any questions or comments, then please subscribe to the mailing list.

Comments Feed · TrackBack

  1. Phil said,

    31 January, 2006 @ 19:50

    Just what I was waiting for! Everything seems to work perfectly.

    Thanks! -Phil

  2. Joan said,

    31 January, 2006 @ 21:31

    Hi, I’ve got the calendar installed, but am not sure exactly how to format the calendar page to get it to show up/edit. Not sure what I’m missing, but any help is appreciated. Thanks so much, Joan http://characterdriven.org/wordpress/

  3. Joan said,

    31 January, 2006 @ 23:50

    Nice site, Phil.

  4. Thomas said,

    1 February, 2006 @ 08:57


    I think this is great plugin. I am new to php and WP. I tryed to insert the script above like you show us here, bit i don’t know where, i tryde that and the website whent bezerk. Im trying to insert the Event Calender and this website http://www.arken-regnbagen.se/ whre mykid is going. It is a kinder garden in Stockhplm, Sweden.

    Best Regards Thomas Krajewski

  5. Lee said,

    2 February, 2006 @ 00:27

    Hi –

    We’ve got a couple events where the dates are to be determined but we want them to be displayed. Is there as way to surpress the dates or just simply leave the date off all the events posts? Thanks,


  6. alex said,

    2 February, 2006 @ 10:29

    Joan: You’ve not correctly installed the plugin. Version 3.0 expects the file eventcalendar3.php to be in the plugins directory. You’ve made a new directory for it. The nest way to install is to unzip directly into your plugins directory.

    Here’s an example of someone who’s set it up correctly:


  7. alex said,

    2 February, 2006 @ 10:31

    I’m closing this entry to comments. If you have a support question, please ask it on the mailing list.

  8. Kimmo Helistö » Arkisto » Kalenteri pätsätty said,

    23 September, 2006 @ 08:19

    […] Sano, teinpä seuraavan ohjeen mukaan: http://blog.firetree.net/2006/01/31/eventcalendar-303/ – kattotaan, tuleeks tästä yhtään mitään. […]

  9. ldkBlog » Blog Archiv » Problem mit EventCalendar behoben said,

    15 November, 2006 @ 20:27

    […] Mit diesem “Patch für WordPress 2.0″ konnte dies behoben werden. […]