• After WordPress 3.0 was released, the Math Comment Spam Protection plugin 2.2 suddenly stopped working (the plugin worked perfectly with WP 2.9.2 and lower).

    Thanks to Frank Bültge, perhaps we have an easy fix for the problem! (I am still testing a lightly updated version of the plugin, so no promises here!).

    So, in case you are using WP 3.0 and the Math Comment Spam Protection plugin 2.2, and the plugin doesn’t protect you from comment spam anymore, try the following:

    1) Open the file math-comment-spam-protection.php in the math-comment-spam-protection plugin folder.

    2) Find the following code (go to line 106):

    if ( ( !isset($user_ID) ) && ( $comment_data['comment_type'] == '' ) ) { // Do not check if the user is registered & do not check trackbacks/pingbacks

    and change it to:

    if ( ( !isset($user_ID) || (0 == $user_ID) ) && ( $comment_data['comment_type'] == '' ) ) { // Do not check if the user is registered & do not check trackbacks/pingbacks

    3) Save the file and re-upload it to your server.

    See if this helps making the plugin work again with latest WordPress!

    It works for me, for now! ??

    https://www.ads-software.com/extend/plugins/math-comment-spam-protection/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Michel

    (@optimiced)

    Hmm, I wasn’t checking the php file more attentively — there are more changes in it… Not so easy to explain in just a few lines of code. ??

    Perhaps I should post a link to the updated version…

    Just change the line in question to the following, and the plugin will work:

    if ( ( ! $user_ID ) && ( $comment_data['comment_type'] == ” ) ) { // Do not check if the user is registered & do not check trackbacks/pingbacks

    In other words, change:

    ( !isset($user_ID)

    To this:

    ( ! $user_ID )

    2) Find the following code (go to line 106):

    if ( ( !isset($user_ID) ) && ( $comment_data['comment_type'] == '' ) ) { // Do not check if the user is registered & do not check trackbacks/pingbacks

    and change it to:

    if ( ( !isset($user_ID) || (0 == $user_ID) ) && ( $comment_data['comment_type'] == '' ) ) { // Do not check if the user is registered & do not check trackbacks/pingbacks

    It works! Thanks ??

    works!
    Thanks.

    Suppose I can try this plug-in again with this fix but does it work with the new default twentyten theme?

    My problem was trying to figure out where exactly to place the code that needed to go into the comments.php file of the theme. That file looks much different than the older default. I’ll give it another shot.

    Please do post the link to the updated version, or direct me to something equivalent that is compatible with WP 3.0 without having to change php files. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Math Comment Spam Protection] How to make the math plugin 2.2 work with WP 3.0 [fix]’ is closed to new replies.