Ajax Calendar

I recently installed the Ajax Calendar from UrbanGiraffe.com on my homepage. The Ajax Calendar allow viewers to navigate the calendar without ever updating the page. This is made possible by AJAX, the acronym for Asynchronous JavaScript And XML.

Wikipedia describes Ajax:

Ajax is a Web development technique for creating interactive web applications. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire Web page does not have to be reloaded each time the user makes a change. This is meant to increase the Web page’s interactivity, speed, and usability.

A great feature of the Ajax Calendar is the split view which displays a drop down list of entries of the current month on display. The built-in cache increases subsequent delivery speed and reduces server load. The Ajax Calendar was fairly easy and straightforward to install. I only made one code change to sidebar.php.

Finally, I modified the SQL statement in common.php by adding a “DESC” at the end to reverse the order of articles listed in split view. I just prefer seeing the articles listed from the most recent to the beginning of the month in reverse order. Here’s the code:

SELECT ID,post_title FROM $wpdb->posts 
WHERE MONTH(post_date) = ‘$monthnum’ 
AND YEAR(post_date) = ‘$year’ 
AND post_status = ‘publish’ 
ORDER BY post_date DESC

One last thing, you have to clear the cache to see the changes take effect.

2 thoughts on “Ajax Calendar

  1. Did you have to tweak anything special with the calendar? I tried it on my site and when I clicked on a month or dropdown it gave me an error “Object required”.

  2. Steve,

    I didn’t make any tweaks to the calendar. The only tweaks I made were the ones I already mentioned, the sidebar.php and common.php files. Did you copy all 4 ajaxcalendar files to the /wp-content/plugins/ajaxcalendar directory? Just making sure. It could be the cause of the error.

    The only complaint I have with the Ajax calendar is how often the cache is updated in the current month. I made a post and I had to delete the cache to get the new post to show up in the split screen. It waited more than a day. No updates.

Comments are closed.