Ajax Comment Posting WordPress plugin
Latest plugin version: 1.2.3
Required WordPress version: 1.5.2
Compatible up to: 2.3.3
Author: regua

Attention: plugin and FAQ translations are needed. If you could translate the FAQ along with the installation section and all messages inside the lang.js file, please send me your translations and you will be rewarded. I currently have English, French and Polish translations of the FAQ as well as English, French, Polish, Russian, Brazilian Portuguese and Turkish translations of the plugin so they are not needed.

Description

There are many comment-related plugins in Wordpress plugin directory. However, if you'd like to find just a comment-posting Ajax plugin, you won't find any. That's why I developed a simple and small (4kB) yet functional Ajax Comment Posting (ACP) plugin. Not only will it post your comment without refreshing the page, but it will also make sure that you've filled all the form fields correctly.

The plugin works well in all major Web browsers, and switches to the traditional comment posting if JavaScript is disabled.

ACP works great with WP AJAX Edit Comments plugin allowing you to edit and manage comments in an Ajax way, and the users to edit their own comments for a specified amount of time.

ACP should work with all CAPTCHA word-verification plugins, but I personally suggest using Akismet.

You can easily add some more functionality to your comment form using jQuery, the best JavaScript framework, which is used by ACP to handle the Ajax requests and all JavaScript-related operations.

Installation

  1. Upload the plugin directory /ajax-comment-posting/ to the /wp-content/plugins/ directory of your WordPress
  2. Activate the plugin through the 'Plugins' menu in WordPress admin panel
  3. That's it!

FAQ

language: english | français | polski

Q: Why isn't my plugin working or it works differently than it should?

A: It's probably your WordPress theme's fault. ACP needs several things to be present in your comments.php file (in the theme's default directory). The submit button has to have a submit id, the comment form has to have a commentform id, the ol (list) with the comments has to have a commentlist class. Also, make sure that the following code is present somewhere in the head (header.php) section of your theme: <?php wp_head(); ?>
Most WordPress themes meet these requirements. If yours doesn't - please let me know.

Q: How can I customise the look of the error and success messages?

A: You can either change the acp.css file in the plugin's directory, or just delete the file and add error and success classes to your CSS stylesheet.

Q: The loading icon doesn't show. What can I do?

A: You can manually set the direct path to the loading image in the acp.js file (line 12).

Q: How can I change or remove the loading icon?

A: The loading icon is the file loading.gif inside ACP's directory. If you want to remove the icon, just delete the icon image file and you'll get a 'Loading...' message instead. Also, you can edit the acp.js file (line 12).

Q: Why does the comment form disappear after a comment has been posted?

A: For security reasons. Usually users don't want to post two comments in a row, so whats the reason in leaving the form there? If you still want to keep it from being removed, delete the line 80 in the acp.js file.

Q: I don't want the email address field to be validated. How do I do that?

A: Just delete or comment the lines 29-37 in the `acp.js` file.

Q: Some other plugin installed on my WordPress uses jQuery as well. Can I make ACP use the jQuery library provided with the other plugin so that I didn't need to waste additional 20kB?

A: Yes, just edit the ajax-comment-posting.php file (line 13) and change the jQuery path. Just make sure it's jQuery 1.2.2 or higher version.

Q: How can I change the plugin's messages' language?

A: Download the language file from here and replace the default lang.js file in the plugin's main directory with it, or just translate the lang.js file by yourself.

Q: How does the plugin work?

A: Firstly, it validates the form - checks if you've enter a name, (valid) email address and the comment (if you're a logged-in user, you don't have to enter the name and email, of course). Then it submits the form using Ajax (Asynchronous JavaScript and XML), then checks if server returned an error and adjust the display method to the server response. Also, after a successful submission, it appends your newly posted comment to the comment list (or creates one if not present), removes the comment form (see the question above if you want to prevent this from happening) and displays a nice, green-coloured message.

Q: Can you help me with it?

A: Of course. Contact me if you have any questions, bug reports or suggestions. In case of a bug report or help request, please include your comments.php file from your theme's directory as an attachment to the email / message, and explain your problem thoroughly giving all needed details: your WordPress and ACP version, other Ajax-based plugins you are using, etc.

Download

See the plugin's page at WordPress.org for the older versions.

Languages

To change the plugin's language, download one of the files below and replace your lang.js file in the plugin's main directory with it.

Demo

The demo blog with Ajax Comments Posting and WP AJAX Edit Comments can be viewed at demo.regua.biz.

Screenshots

In the following screenshots, custom error messages have been used. The default ones are nicer and more formal.
They can be easily changed by editing the lang.js file.

Show the screenshots

Changelog

Version 1.2.3

Version 1.2.2

Version 1.2.1

Version 1.2

Version 1.1

Thanks

Donate

Ajax Comment Posting is completely free; if you, however, appreciate my work, you can donate a few bucks to me via PayPal by going to the donation page. Thanks!