define('DISALLOW_FILE_EDIT', true);{"id":23,"date":"2007-08-31T01:00:07","date_gmt":"2007-08-31T06:00:07","guid":{"rendered":"http:\/\/www.unfocus.com\/projects\/2007\/08\/31\/ajax-calendar-widgetized\/"},"modified":"2009-08-28T12:31:22","modified_gmt":"2009-08-28T17:31:22","slug":"ajax-calendar-widgetized","status":"publish","type":"post","link":"http:\/\/www.unfocus.com\/2007\/08\/31\/ajax-calendar-widgetized\/","title":{"rendered":"Ajax Calendar – Widgetized"},"content":{"rendered":"

Update:<\/strong> This information applies to Giraffe AJAX Calendar<\/a><\/strong> \t\t2.3.1. AJAX Calendar<\/a> \t\t2.4 was released on September 3, 2007. This information is incompatible with that new version.<\/p>\n

Update 2: <\/strong>It seems that this new version is supposed to simply replace the functionality of the old Calendar, without requiring any extra work (so you’d just use the old Calendar Widget, and get the new functionality after the plugin is enabled). So far, I haven’t been able to get the Ajaxy stuff to work, although I can tell that it’s installed, because the calendar is wider in this theme with the new Calendar plugin.<\/p>\n

While surfing the web aimlessly, I came across the Urban Giraffe<\/a> Ajax Calendar<\/a> plugin for WordPress<\/a>. It’s not set up to take advantage of WordPress’s built-in Widget support, so I thought I’d add the necessary bits to make it work. Here’s how to do it.<\/p>\n

Download the plugin, and add the following code to the bottom of ajax-calendar.php:
\n[cc lang=’php’ ]
\nfunction giraffe_ajax_register_widget() {<\/p>\n

if ( !function_exists(‘register_sidebar_widget’) || !function_exists(‘register_widget_control’) )
\n return;\tregister_sidebar_widget(‘Ajax Calendar’, ‘ajax_calendar’);<\/p>\n

}add_action(‘plugins_loaded’, ‘giraffe_ajax_register_widget’);
\n[\/cc]
\nAdditionally, you can avoid a duplicate prototype.js header link, by replacing these lines:
\n[cc lang=’php’ ]
\nif ($giraffe_ajax_prototype)
\n add_action (‘wp_head’, ‘giraffe_ajax_head’);
\n[\/cc]
\nwith these:
\n[cc lang=’php’ ]
\nif (function_exists(‘wp_enqueue_script’))
\n wp_enqueue_script(‘prototype’);
\nelse if ($giraffe_ajax_prototype)
\n add_action (‘wp_head’, ‘giraffe_ajax_head’);
\n[\/cc]
\nYou can see it working in my sidebar. And I didn’t even have to modify this theme. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"

Update: This information applies to Giraffe AJAX Calendar 2.3.1. AJAX Calendar 2.4 was released on September 3, 2007. This information is incompatible with that new version. Update 2: It seems that this new version is supposed to simply replace the functionality of the old Calendar, without requiring any extra work (so you’d just use the … Continue reading “Ajax Calendar – Widgetized”<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10,9],"tags":[],"_links":{"self":[{"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/posts\/23"}],"collection":[{"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":2,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":270,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/posts\/23\/revisions\/270"}],"wp:attachment":[{"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.unfocus.com\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}