AJAX Force Comment Preview WordPress Plugin

Thaya Kareeson
Popularity: 100%
Updated: Jul 15, 2008

Today I would like to announce the release of “AJAX Force Comment Preview” WordPress Plugin. The plugin works like TextPattern’s built-in “force comment preview” feature by forcing your commenters to preview their comments prior to submission. In addition this plugin is AJAX enabled so the user does not have to reload the page to preview his/her comment. Here are the key benefits of having this plugin enabled.

  1. Comments quality will increase as users will be forced to preview his/her comment before submitting it. Previewed comments are sent through WordPress’ various filters so that the user can see exactly how his/her comment will appear after it is submitted.
  2. Spambots will not be able post comments unless it actually tries to “preview” the comment. When a preview is requested, a nonce key is generated and returned along with the preview. This nonce key is then required to be sent back to the server during comment submission. So in order to submit a comment, the spambot would have to use javascript to request a comment preview prior to submitting the comment. Most spambots do not care to preview so this offers some level of spam protection.

You may find the download link below. As always, please feel free to share any comments, questions, and suggestions!

Screenshots

Before preview
Before preview
After preview
After preview
Submit without preview
Submit without preview

readme.txt

Download AJAX Force Comment Preview

Upcoming Feature(s)

  1. Allow registered users to disable force plugin
  2. Make merge Submit & Preview button functionality a configurable
  3. Show preview button for registered users but not force preview.

Credits
Inspired by AJAX Comment Preview (by Michael D Adams) and TextPattern’s built-in Force Comment Preview.

Rate this:
3.5 (-1 people)

19 Responses to “AJAX Force Comment Preview WordPress Plugin”

  1. This is actually a good idea. A really great idea, even! I see you also enabled it on your site already. The spam protection is what makes it especially worthwhile to install.

    Here are my suggestions:
    - after you force the preview, if a user makes more changes, disable the submit button again.
    - maybe don’t show the submit button at all, or have the same button that changes functionality from preview to submit and the other way around.
    - stick this thing into svn and wp-plugins
    - …
    - profit?

  2. It sounds good and I’m 100% agree with Artem Russakovskii’s suggestions. If implemented the comment form will be more secured.

  3. @Artem & dg
    Thank you for your kind words and suggestions. I will definitely add the suggested feature into version 1.1. I have already requested this plugin be added to wp-plugins SVN repository and I’m just waiting for the green light to commit.

  4. I’ve just released version 1.1 with the following changes
    - Disable feature for Administrators
    - Re enforce preview whenever comment text changes
    - Merge “Preview” & “Submit” button

  5. I’ve try to comment for many times, but allways failed, my javascript already on. Let me try again.

  6. no image Rosyidi (Check me out!)
    Rate this:
    3.6 (1 person)

    I think it’s great if preview and submit not merged, couse every one can know if they must click twice. Most of visitor don’t know about this new metode, so if submit and preview merged they think their comment already post, couse usualy they click once to comment.

  7. @Rosyidi
    You do have a good point about the confusion of merged submit & preview. I will make it an option in the configurations in the next release.

  8. @Rosyidi
    “I’ve try to comment for many times, but allways failed, my javascript already on.”
    I really want to fix this problem if it’s still happening. Do you have any ideas on how I can reproduce this?

  9. Thanks, Thaya. It seems to work just as expected.

  10. @Rosyidi
    Thank you for reporting the bug. It turns out that the Javascript was not waiting for the comment-verification key to be sent back form the server before enabling the submit button. This can cause your comments to not submit if you click “preview” then immediately click “submit”. I’ve fix this in version 1.2. Thanks again!

  11. wonderfull. on one day you’ve release 2 version. Great job.

  12. @Rosyidi
    Thanks! Though, releasing two versions in one day could be a bad thing :-). Luckily, the second release was a critical bug fix.

  13. SVN access is granted so I’ve just committed this to svn.wp-plugins.org.

  14. I’ve just released version 1.3 with the following change
    - Fixed bug that causes Windows EOL characters (^M) in comments to invalidate nonce. (Thank you Artem & Rosyidi for reporting this!)

  15. no image Raden (Check me out!)
    Rate this:
    3.6 (1 person)

    I told my friends that this plugin really help me a lot in fighting spam and I am very thankful to Thaya for inventing me this great piece of software… Details of my own review about this excellent spam fighter can be found in one of my posts http://myseoblog.net/2008/06/14/foghting-spam-on-wordpress-comments/

  16. @Raden
    Thank you for putting in a good word for my plugin!

  17. Released AJAX Force Comment Preview version 1.4 with the following change:
    - Upgraded plugin to be compatible with the new movable wp-content and wp-config.php changes on WordPress 2.6.

  18. Which threaded comments do you use on your blog with this plugin?

    Just wondering … and did you have to mod it to display the avatars or do the plugin simply work together and pickup values from the the WP?

    Thanks

    @Alex Sysoef
    I use WordPress Threaded Comments. The WordPress Threaded Comments plugin asked me to copy a portion of my comments.php into an option field in plugin options. Other than that, it seems to work with my plugin fine out of the box.


Leave a Reply