Honeymonster's Lair

Home of the Larger-than-life Depressive-Psychotic Computer Geek

AJAXBlog

Following up from my FramedBlog, I’ve now replaced my frames with an AJAX load system. This allows the sidebar and any header and footer to remain constant. This was initially due to my desire to have a music player written in flash to remain loaded and playing throughout pageloads. At first, I thought it would be better to use Frames, but have since been playing with asynchronous loading. The AJAX method allows for pages to load without first showing an empty screen/frame, and as previously stated for my flash music player to remain loaded.
AJAXBlog is built upon the techniques I learned for use with the FramedBlog, and owes it’s existence to the previous project.

Here are the instructions:

  1. edit your theme’s functions.php and add a line: wp_enqueue_script(‘ajaxblog’,'/wp-content/themes/yourtheme/js/ajaxblog.js’,array(’scriptaculous’));
  2. download ajaxblog.js
  3. edit ajaxblog.js and set the var AJAXBlogBaseURL = line to the top level web address of your wordpress directory _WITHOUT_ the trailing /. e.g. http://www.thehoneymonster.net (where my wordpress install is accessed by the top-level domain only) or …net/wordpress (where wordpress is the dir containing my wp install)
  4. upload ajaxblog.js to your webspace in the wp-content/themes/yourtheme/js directory (or another of your choosing, remembering to update the wp_enqueue_script call in functions.php).

There aren't any comments to display here.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WP Hashcash