Mike Smullin’s — AJAX Comments 2.0 — is probably one of the best ways you could spice up your WordPress Blog with AJAX.
Demo: Click “Add comment” on this Post and after writting “Hit Submit” Button. You will see an AJAX throbber and the comment will be submitted without refreshing or leaving the page.
- comment form validation happens server-side without refreshing or leaving the page
- Script.aculo.us Fade In/Out Effects make readers happy
- works with AuthImage captcha word verification plug-in to prevent comment spam
- uses existing theme code to match styled comment threads when producing new comments
- 25-second server timeout ensures readers aren’t left hanging
- works in current versions of Firefox, Internet Explorer, Opera, Netscape, and Safari.
Recommendations: (Works well, if you don’t have any of the under mentioned)
- perfectly compliments any well-styled comment form—don’t design without it
- best when moderation is off (seems more real-time) and AuthImage is installed (self-moderation is the best moderation)
How to implement:
- Download ajax-comments v2.07
- Unzip/upload to /plugins directory.
- Activate via WordPress Plugins tab.
AuthImage Integration: (optional)
- Open ajax-comments.php and uncomment lines: 92, 152, 153.
- Open comments.php from your /themes directory and use the following code (mostly just the ids) for AuthImage to appear in your comments form:
<?php if ( !$user_ID ) : ?> <img id="auth-image" src="<?=get_option('siteurl')? />/wp-content/plugins/authimage/authimage-inc/image.veriword.php" alt="Verification Image" /> <p><label for="code">Word Verification (<a href="#" onclick="document.getElementById('auth-image').src+='?'+Math.random();return false" title="Generate another Captcha Word Verification image.">can't read it? try another!</a>)</label></p> <p>Please type the letters you see in the picture.</p> <p><input name="code" id="code" type="text" /></p> <?php endif; ?>
WordPress Plugin: AJAX Comments 2.0