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

Comments

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.