Ajax Comments 2 + Spam Karma 2 Bug Solution

You want your readers to write comments to your blog huhhh ?

But you want also to protect yourself from annoying comments and spam.

If you want to use Ajax Comments 2 to your wordpress then you have to modify some lines. This is because Spam Karma does not work well with Ajax Comments.

So the Solution to this problem is:

From the plugin author's comments page:

1. Change line 177 of ajax-comments.php from

wp_new_comment(array(

to

$new_comment_ID = wp_new_comment(array(

2. Change line 199 of ajax-comments.php from

$comment = $wpdb->get_row("SELECT * FROM {$wpdb->comments} WHERE comment_ID = {$wpdb->insert_id} LIMIT 1;");

to

$comment = $wpdb->get_row("SELECT * FROM {$wpdb->comments} WHERE comment_ID = {$new_comment_ID};");

Then It will work fine :-)

Special thanks to Suleiman

Trackback URL for this post:

http://www.igotanswers.info/trackback/35

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
  _____  ____    ____    _       _  __  _  _   
|__ / |___ \ |___ \ | | | |/ / | || |
/ / __) | __) | | | | ' / | || |_
/ /_ / __/ / __/ | |___ | . \ |__ _|
/____| |_____| |_____| |_____| |_|\_\ |_|
Enter the code depicted in ASCII art style.