Support » Plugin: AJAX Calendar » [Plugin: AJAX Calendar] Great work but had to fix in order to use.

  • mrdumont


    Like the AJAX implementation and the basic functionality. Found/fixed two bugs and extended functionality to include future dates.

    Bug 1 – list mode did not filter for the category selected
    Bug 2 – after initial display, dates with posts were not hightlighted (while navigating months, for example).

    Both straightforward to fix.

    Added future posts to display – simple extension.

    Thanks to author for the heavy lifting – I just did a little patching and will continue to use this plugin.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Dave


    Hi mrdurmont,

    I’m having the exact same bugs and was wondering what fixes you did to get the calendar working?

    Any help would be great!

    here’s a fix !

    FILE /models/calendar.php

    LINE 150 : This will remove the “warning” if there is no categories
    echo ‘<td id=”showit”>categories) ? ” : implode( ‘,’, $this->categories ) ).’\’)”>’.$this->split_open.’</td>’;

    LINE 156 : This will fix the month navigation
    ‘” onclick=”return calendar (‘.$next->year.’,’.$next->month.’,’.$full.’,\”.( empty($this->categories) ? ” : implode( ‘,’, $this->categories ) ).’\’)”‘.

    oops ! let’s try the code button 😉

    here !
    LINE 150 : This will remove the “warning” if there is no categories

    echo '<td id="showit"><a href="'.get_month_link ($thisyear, $thismonth).'" onclick="return calendar ('.$thisyear.','.$thismonth.','.($full == 0 ? 1 : 0).',\''.( empty($this->categories) ? '' : implode( ',', $this->categories ) ).'\')">'.$this->split_open.'</a></td>';

    LINE 156 : This will fix the month navigation

    '" onclick="return calendar ('.$next->year.','.$next->month.','.$full.',\''.( empty($this->categories) ? '' : implode( ',', $this->categories ) ).'\')"'.



    I’m also having the two bugs listed above. I tried what MGMaster offered, but the list mode still doesn’t filter for the category.

    In addition, when the page with the widget first loads, the widget shows no month names until it is interacted with (changing the month/showing the list).

    I noticed on that Machine Project is successfully using this plugin, but it looks like they are using a modified version as well.

    mrdumont: Could you share your fix for filtering the list correctly?

    I would rather not edit the core files for the plugin, if there is a way for these fixes to make it into the next version of the plugin that would be great. Maybe mrdumont and MGMaster could submit their changes back to the plugin author?

    We are indeed using this plugin at Machine Project, but it’s an old hacked-up version with a hard-coded category. I couldn’t get the latest version to work with WP 3, but I’ll see what I can do with what’s here.

    mrdumont: seconding the request for your filtering fix!

    We would really love to get this plugin fully functional. Fix the bugs, pretty up the listing of the daily posts, maybe add in support for custom post types, and AJAX Calendar would be the ideal event calendar.

    Seriously, eternal gratitude and major hugs if anyone can help us fix this.

    Worth pointing out in this context, there’s a new single-category calender widget:

    I had to edit two lines to make it show future posts, but otherwise it works fine. Of course it’s not ajaxified, so it updates the whole page when you navigate the months, but I guess you can’t have it all….

    I tried filing a trac ticket for ajax calendar

    I also switched our website to Calendar Category. To make it work with future-dated posts, I had to make some hacks (removed all references to published status, and added arbitrary number to the current_date), but it’s working well enough for the moment.

    Plugin Author John Godley


    I’ve released a beta version 2.5 in SVN here:

    Can someone please drop me the code for adding future posts to this plugin?



    I tried upgrading to 2.5.1 and it seems to work better. There is only one “issue”, as peterspublishing mentioned, it isn’t showing future posts. I’m not sure if John is intending for this to be part of the functionality though.

    I’m using it on this upcoming events page. It seems to want to show the January event, but as you see it’s not highlighting the day.

    A note about my “future” posts is that the post_status is not actually set to future, I’m using this plugin that sets future posts to publish.

    I briefly looked at the query in the plugin and it doesn’t seem like there should be any issues though, so I don’t know.

    has anyone had any luck getting this to work with custom post types? the plugin is great already but this would really be a lifesaver for me!

    Wow – sorry – didn’t think this thread was active!
    I’ll go back and check my work on the future posts and add it to this thread shortly.


Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: AJAX Calendar] Great work but had to fix in order to use.’ is closed to new replies.