EventCalendar 3.0 Beta

The release candidate of EventCalendar 3.0 is now available. The main new feature is a piece of JavaScript (AJAX) wizardry that allows you to flip backwards and forwards through the calendar without refreshing the entire page. The ‘Forthcoming Events’ list is also far more flexible. Many many other requested features have been added.


EventCalendar 3.0 has now been released.

Latest version: http://blog.firetree.net/wp-content/plugins/eventcalendar30.zip

Read the latest documentation.

Beta Documentation:

EventCalendar 3.0 is compatible with WordPress No hacks or source code editing are required. If you have trouble, first make sure you are using the very latest WordPress code.

Please try this beta plugin, and let me know what you think. If you find a bug, then first check in the list below to see if it’s already been reported or fixed. If not, then please report it by posting a comment.

Template Changes: CALENDAR

Add the following code to your sidebar.php:

    <?php ec3_get_calendar(); ?>

If you are using an older template, then you should check that your HTML header contains the following tag: <?php wp_head(); ?>

Template Changes: EVENT LIST

The template function: ec3_get_events() shows a list of upcoming events. Add the following code to your sidebar.php:

  <li><?php _e('Events'); ?>
    <?php ec3_get_events(5); ?>

The function takes several parameters:

  • limit. The maximum number of future events to list.

  • template_event (OPTIONAL) DEFAULT=<a href="%LINK%">%TITLE% (%TIME%)</a>. A template for the formating of each event. The following placeholders are available:

    • %TITLE% – the title of the event.
    • %LINK% – the URL of the event post.
    • %TIME% – the time of the event.
    • %AUTHOR% – the post’s author.
  • template_day (OPTIONAL) DEFAULT=%DATE%:. A template for the formatting of a header for each day. If you don’t want this header, then set this to an empty string. The following placeholders are available:

    • %DATE% – The date of the post.
    • %SINCE% – Time until the event (Only available when Dunstan’s ‘Time Since’ plugin is active).
  • date_format (OPTIONAL). A PHP date format string used to calculate the value of %DATE%. If this option is not provided, then WordPress’ normal date format is used.

Publish a vCalendar

The vCalendar feature is now fully integrated into the plugin. This allows you to view the event calendar in iCal, Sunbird and other modern calendar applcations. You can now subscribe to the calendar at the address http://your.site.url/?ec3_vcal

New Features

  • Live Calendar updating without the need to refresh the whole page. (Thanks to Jon Abad for the inspiration of his LiveCalendar.)

  • Keep Events Separate mode. Keeps event posts off the front page. Turns the Event category page into a properly ordered listing of forthcoming events. This feature is off by default. Activate it on the Event Calendar Options page.

  • Custom Popup replaces the usual tooltip with a popup that lists each event on its own line. The popup is always positioned below the calendar, to ensure that you can still see the whole month.

  • There is no need to edit your CSS files. All essential stylesheet definitions are now part of the plugin.

  • Plus many more minor usability issues.

Planned features

Some enhancement haven’t made it into this first release candidate, but they are planned for the future:

  • Multiple-day events.

  • Repeating events (good for birthdays).

  • Make day links also restrict to event category if only events shown in calendar. (fixed in rc4)

Bugs So Far

  • Times are displayed without leading zeros in calendar tooltips. (fixed in rc2)

  • Post titles that contain a single-quote character cause the month switching to crash. (fixed in rc2)

  • Next & Previous month links do not work properly when JavaScript files can’t be found. (fixed in rc3)

  • Next month link not properly aligned with some templates. (fixed in rc3)

  • Next & Previous month links do not work when URL is not exactly the same as specified in WP options. Example: a web-site with addresses www.example.com and example.com will only work properly from one address. (fixed in rc4)

  • ec3_get_events() does not correctly group events by day. (fixed in rc5)

  • HTML entities are not properly displayed from JavaScript. Link – go back a month and then hover over the calendar title. (fixed in rc6)

  • JavaScript errors on pages that do not contain a calendar. (fixed in rc6)

  • HTML entities in event titles are not properly loaded from XML. This means that the XmlHTTPRequest fails if a post contains non-ASCII characters. (fixed in rc7)

  • ‘Next month’ link sometimes positions nav links incorrectly. (fixed in rc7)

  • Popups are incompatible with Nicetitles. You can now disable popups (in rc8)

  • Popups don’t display properly in Opera.(fixed in rc9)

Comment · Comments Feed · TrackBack

  1. monkeypup said,

    7 July, 2005 @ 21:19

    Awesome. Worked like a charm on a work project I’m developing.

  2. Aeos said,

    7 July, 2005 @ 23:18

    The javascript for changing dates doesnt work for me (calendar)

    Also when I select Events only, it still shows other categories when you click on the button.

  3. alex said,

    7 July, 2005 @ 23:41

    Aeos: Thanks for trying the beta code. Can you tell me your URL so I can look at your site and work out why you are having problems? What browser are you using?

    I took note of your previous comment about the events-only mode. As you see that’s third on the ‘to-do’ list.

  4. Aeos said,

    7 July, 2005 @ 23:59

    I sent you an email.

  5. Crowspeaker said,

    8 July, 2005 @ 15:50

    Very cool idea.

    Another feature you might want to consider is setting an optional parameter for how many days in the future to display events in the event list. This would be an alternative to using the limit parameter to show ten events. This might be useful for someone who has multiple events on the same day–some of these might get cut off if you use the limit events parameter.

  6. alex said,

    8 July, 2005 @ 16:00

    crowspeaker: That thought had occurred to me. What if somebody has 100 events all on the same day though? Perhaps the best solution would be two limits, one for days and one for posts.

  7. Aeos said,

    8 July, 2005 @ 17:25

    Thank’s alex everything was sorted out and the plugin works great.

  8. John said,

    9 July, 2005 @ 10:01

    I think I noticed a bug. If a post is uncategorized, the time of the post is displayed when you mouseover the date, which ihs really not necessary.

    Also, I’m new to WordPress, so can you provide more detail on the syntax of the parameters, like if I wanted to use all of them. Are they separated by commas in one pari of parenthesis, or are there parenthesis for each parameter?

  9. Dan said,

    9 July, 2005 @ 20:32

    This is a great plugin; thanks for writing it.

    Another small bug: when you mouseover the date of an event, you get 24hr time and terminal zeroes are stripped. E.g. “16:0″ for 4pm.

    Is there a way to make Events a subcategory that is kept off the main index page unless a post is categorized as both an Event and its parent category, e.g. “News”? Currently if Events is a subcategory and the option to keep Events separate is selected, posts categorized as Events and the parent, News, will not appear in the main index.

    I could just list Events in the sidebar alongside the main index entries, but I also have the Subscribe2 plugin installed and set to notify subscribers of any new posts in “News.” It will not send out Events if they are a sub-category of News with EventCalendar separating News from Events. Sometimes I want Events noted on the main index and send out to notification subscribers.

    I could make Subscribe2 send out all News and Events, but this would cause another problem: for events taking place on several consecutive days, I have to make a duplicate post for each day of the event. I don’t want Subscribe2 to send all those posts out to people–just one initial notice of the event, which I would classify as News. (All those duplicate event entries look bad in the monthly archive index too.)

    Maybe the ideal solution would be a feature for events that last longer than a day. (E.g., allow a single entry to be associated with a range of dates instead of a single date.)

  10. Dan said,

    9 July, 2005 @ 22:09

    EventCalendar may have some conflicts with nicetitle.js — nicetitle was knocked out seemingly by EventCalendar on a site I’m working on until I deactivated and then reactivated the EventCalendar plugin. (THis was the case in firefox and IE; IE is still slow to get both working sometimes on the inital page load.)

  11. matt said,

    10 July, 2005 @ 02:13

    i seem to be getting a “Fatal error: Call to undefined function: get_category() in /wp-content/plugins/eventcalendar3.php on line 858″

  12. matt said,

    10 July, 2005 @ 03:06


    im retarded and had an old version of wp. once i updated, it works sweetly

  13. Greg said,

    10 July, 2005 @ 03:17

    I’d like to submit a modified version of ec3_get_events with the old code commented out. This version will correctly use lists if events occur on the same day. I’ll post it here since I couldn’t find your email addy. [Code cut -Alex]

  14. alex said,

    10 July, 2005 @ 18:28

    Dan: Thanks for the feedback and the suggestions. I don’t use sub-categories or Subscribe2, so right now I have no plans to add those features. I’ll accept well-written patches though, if you want to add the features yourself.

    I am already planning to add multi-day events.

    I’ve already fixed the time-formatting in the popup. Please read the bug list and try the latest version before your report a new bug.

    You are right, this plugin will conflict with Nicetitles. It might work, depending upon which plugin gets loaded first. I believe I’ve fixed the problem in release candidate 5. Will you try it for me?

    Greg: Thanks for reporting the bug. I’ve fixed it now (in release candidate 5).

  15. Dan said,

    11 July, 2005 @ 00:01

    Sorry, I thought I had the latest.

    I’m not having any problem with nicetitles now except on Opera. Opera also messes up the size and border on eventcalendar’s mouseover titles.

  16. alex said,

    11 July, 2005 @ 00:27

    Dan: Yeah, I’m looking at your site now. While things are a bit better (in Firefox), it’s still producing JavaScript errors from nicetitle. I don’t have Opera to try it with.

    The trouble is that Nicetitle just isn’t written to play nicely with others. My script does basically the same thing as Nicetitle, but it bails out safely if things don’t go right. I could propose a patch to Nicetitle, but there are so many competing versions…

  17. Markus said,

    11 July, 2005 @ 13:38

    Hi Alex, Thanks for the enhancement. Very nice and super-cool. I have two questions:

    1) Now the upcoming events and the normal post in the Calendar is quite a bit the same (red/redbrown). Is it possible to distuingish these two things better (maybe red and blue or so)?

    2) Witch your version 2 I used a sidebar-text like this:

    This works still with your newest version 3. But then I have too much infos in the events-list (below the calendar). I want to reduce this events-lines (in my case 6) on only the event and date. But now is also the time there in ()

    I tried to replace the above code instead the 2 the 3, like

    This worked, but instead the event and date I got only for example:

    25.Juli j.F

    Are the other abreviations like the j and F (like bevor) with the new version? One or more example would solve my problem, I guess.

    Beside these 2 questions: your plugin is really awesome and great! Thanks for sharing all your work. Markus/Switzerland

    PS: my page: http://www.sinusbild.com/blogxx/

  18. alex said,

    11 July, 2005 @ 13:56

    Markus: You can change the colour used for event days by editing the CSS in wp-content/plugins/eventcalendar3/ec3.css. Find the rule for .eventday and change the colour from #a00 (red) to whatever you want.

    You can get the old-style event list as follows:

    ec3_get_events(5,'%DATE%: <a href="%LINK%" title="at %TIME%" rel="nofollow">%TITLE%</a>','');

    There are still a couple of bugs on your site: Unicode characters aren’t coming out correctly when the calendar is generated by the JavaScript. You have something like Nicetitles active that is sometimes interfering with the popups. I’ll see what I can do to fix them.

  19. Markus said,

    11 July, 2005 @ 15:29

    Hi Alex, Thanks very much for your answer. I did as you said: and it worked perfect. Because I see now your “system”, I could even change something for me (formating the eventlist).

    The eventdays I could manage more red.

    The only colour, what I could not find, was the colour from the “normal” post. Because, when I look now on my calendar, the red is fine, but the days in the calendar with normal posts and without any post are quite a bit near in the colour, so it is a bit hard to distinguish.

    But This is REALY a very minor thing, and maybe only my view of sight, your plugin works for me perfect.

    For your information: I have installed the following plugins:

    -IImage Browser -IImage Gallery -Search comments -WP grins

    The thing with the unicode characters, hmmm, at least we have not discovered such bugs on our pages, but I am sure, your are right, we have only not found them yet ;)

    Thanks Alex, for your fine work. Markus

  20. Markus said,

    12 July, 2005 @ 07:47

    Hi Alex and interested people, Again a new version, cool. To use the %SINCE% – tag, I installed the plugin “Dunstan’s time Since” (in WordPress 1.5). Then I managend to use this tag and -heureka- it works!!! The only thing, what I could not manage, is to format the date. Because now it shows 25 Juli instead 25. Juli

    I guess, this could be done with date_format (OPTIONAL).

    But sorry, because I am a very bad computer-guy, I failed to manage this. If someone could help, it would be great. But finally, it is a very minor thing.

    Here is the line in my sidebar.php, where I tried to work out, that the date comes with a point (this is for German people) like 13. Juli. Thanks for any help. BTW: maybe this line helps also some other people, because I have it from Alex, THANKS!

    <php ec3_get_events(5,'%DATE% von %AUTHOR% Das ist in %SINCE% <a href="%LINK%" title="um %TIME%" rel="nofollow">%TITLE%',''); ?>


  21. Rob S said,

    13 July, 2005 @ 12:00

    This is a great script, and very helpful to me in what I’m doing.

    I am having one small issue that I hope you can give me a quick pointer on. I am including the event calendar in a separate “page” that I’ve created in WordPress. I created a new page template and dropped in the calendar code so that the calendar and listings appear in the main content section of the page. When doing this, the one thing that isn’t working are the links to go backwards and forwards on the month of the calendar. Instead of showing me the javascript command, an html link is created to a page that doesn’t exist.

    Is there a way to tweak the code so that the javascript will work in the page? The page is located at: http://www.podcastnyc.net/newyorkminuteshow/event-calendar/

    Your assistance on this is greatly appreciated.

    Rob New York, NY

  22. alex said,

    13 July, 2005 @ 14:15

    Rob: There are JavaScript errors on your page – I’ll investigate them this evening. You are trying to do quite a challenging thing there, with TWO calendars on the same page. I’ll have a think about it and see what can be done.

  23. Rob S said,

    13 July, 2005 @ 19:04


    No worries. I did some more work on it and realized that having the calendar in the sidebar and on the page was causing the problem. I’m fine with having just the calendar page with events below. I removed the calendar from the sidebar and it works just fine. Thank you for the support.

    I did have one more question. Is there a way to tweak the code so that when I click on the month link above the calendar that it only shows the posts in my “event” category, as opposed to all the posts?

    Thanks again for a great plug in that’s adding value to my wordpress site.

  24. Mark said,

    13 July, 2005 @ 22:48

    I am looking into, as well as a few others on the WP board, about getting the Custom Fields displayed. I am using EventCalendar 2 to post show listings. Although I have changed the original version I was wondering if you could assist us with adding the proper code to get those custom fields to show up on an external page.

    Currently I get the Custom Fields to show up on an actual WP page, but that data does not get passed through to my external page (see above URL).



  25. alex said,

    16 July, 2005 @ 12:46

    Mark: Have you tried EventCalendar3? I think that it might solve your problem out of the box. Turn on “Keep Events Separate” in the Options screen, and use the normal “Category” page for your Upcoming Shows.

    Events will not appear on your front page. The Events Category page will list upcoming shows in date order. Since you are using the normal loop in index.php, any special formatting will work as normal.

  26. Louis said,

    21 July, 2005 @ 15:49


    I love your plug-in. Just wondering if there are compatibility issues with futureposts plug-in? At present, I am using eventcalendar to display entries from one category, and trying to display future posts in a different category. However, only the eventcalendar displays correctly.

  27. alex said,

    21 July, 2005 @ 16:15

    Louis: I don’t know how Futureposts works, so I can’t say what your problem might be.

    EventCalendar3 rewrites the SQL ‘where’ clause, to allow ‘event’ category posts with dates in the future to show up.

  28. Louis said,

    24 July, 2005 @ 18:05

    Hi Alex,

    At the moment, EventCalendar requires an ‘events’ category, and shows only future events in that category. Is it possible to show future events from all categories?

    In relation to the comment above, is this the place I should make the modifications?

    $where_post = "(post_date_gmt< ='$now' OR category_id=$ec3->event_category)";

    (in function ec3_util_calendar_days() – Alex)



  29. alex said,

    30 July, 2005 @ 09:32

    Louis: I’ve looked at the Futureposts plugin. It changes exactly the same part of the WHERE clause that EventCalendar changes, but only for admin users. Whichever plugin gets run first will succeed in changing the WHERE clause. Right now that order is undefined – I suspect it will depend upon the order in which you activate the plugins.

    The effect of Futureposts is to make ALL posts visible, regardless of date, so you want it to override EventCalendar’s changes. Try changing the priority of the EC plugin to run after Futureposts:

    Add “,11” to the add_filter() for the “posts_where” filter. Like this:

    add_filter('posts_where', 'ec3_filter_where',11);

    (By the way, your suggestion to change ec3_util_calendar_days() won’t do what you want.)

  30. dillydante » Blog Archive » Wordpress Modding said,

    4 August, 2005 @ 02:00

    […] Event Calendar: To make that neat to-do calendar on the sidebar […]

  31. Rodolfo Pilas said,

    4 October, 2005 @ 22:08

    I have just installed EventCalendar3.0, with this configuration: * Event normal post (but the category is not showed yet, because there are no active post) * Mounth 1 * Show all post * Single letter * Show Logo * Above calendar * Show popups But I see a list only. Perhaps you can check. I will continue adding events. Excellent software!

  32. John said,

    12 November, 2005 @ 03:48

    I’m having some kind of problem when I click back to the month of October only (other months work fine). There is some kind of javascript error occurring where October’s hyperlinks for each relevant date don’t load, and the “refresh” icon gets stuck.

    I’ve tried this on two different systems with the latest version, and still no luck. I’ve also gone to each post for October and modified any subject lines so there would be no weird characters. Any ideas?

  33. Hans D. said,

    17 November, 2005 @ 17:18


    When I set the Number of months to ‘3’ in the Event Calendar Options, something strange happens: on my events page the calendars for November 2005, January 2006 and March are displayed, while December and February are being skipped!

    Does anyone has a clue why that happens?


  34. John L said,

    12 April, 2006 @ 16:19


    When ever I insert the calendar code to my sidebar page, it causes everthing to move down from the top. You can check this out at: http://www.niallkeogh.com/wordpress

    The calendar works fine! When I remove the calendar code from the sdebar everything moves back up to the top. There is nothing in the sidebar.php page that is causing it to move down from what i can see.

    Anyone have any ideas?

  35. joah said,

    17 May, 2009 @ 23:21


    Where can I change the font colour of the normal days and colour of the name of the days in the EC ? I tried, but could not find it..


Leave a Comment