The MU forums have moved to WordPress.org

Best way to block comments spam (8 posts)

  1. Parado
    Member
    Posted 16 years ago #

    1.

    Open: File - upgrade-schema.php
    Find:
    add_option('comment_registration', 0);
    and
    Replace:

    add_option('comment_registration', 1);

    2.
    Open: File - options-general.php
    Find:

    <tr valign="top">
    <th scope="row"><?php _e('Membership:') ?></th>
    <td> <label for="comment_registration">
    <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
    <?php _e('Users must be registered and logged in to comment') ?>
    </label>
    </td>
    </tr>

    And remove. That's all.

  2. shoestringwebs
    Member
    Posted 16 years ago #

    Not being a code guy, I have to ask:

    What does this do?

  3. lunabyte
    Member
    Posted 16 years ago #

    It forces a setting in the back, that only allows users who are logged in to comment.

    The second part removes the option to change that value in the admin area.

  4. drmike
    Member
    Posted 16 years ago #

    They just spam you via trackbacks. You still get them.

  5. lunabyte
    Member
    Posted 16 years ago #

    Not if you turn those off too. lol

    <note> You've pretty much killed the spirit of a blog by this point, but whatever. It does work, but isn't anything that wasn't known before.</note>

  6. drmike
    Member
    Posted 16 years ago #

    Pretty much as both of those suggestions is overkill and defeats the purpose of a blog.

    Gotta admit that I think education is better. When you send a complaint to a host and they blow it off like ev1servers does, screw them and block the IP addresses.

  7. Parado
    Member
    Posted 16 years ago #

    + remove comment_registration

    in <input type="hidden" name="page_options" value="blogname,blogdescription,new_admin_email,users_can_register,gmt_offset,date_format,time_format,start_of_week,comment_registration,WPLANG,language" />

    Like this: <input type="hidden" name="page_options" value="blogname,blogdescription,new_admin_email,users_can_register,gmt_offset,date_format,time_format,start_of_week,WPLANG,language" />

  8. drmike
    Member
    Posted 16 years ago #

    Well if it works for you....

    As noted up above, it doesn't work for the others here.

About this Topic