• hello,
    Is there a way to have a user have multiple comments approved before their comments are approved automatically?

    for example, a user that has never made a comment on my site must get three “approved” comments, before being allowed to have comments automatically posted.

    Thanks for any help or suggestions.

    I use Spam Karma 2 and have the moderation plugin installed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Is there a way to have a user have multiple comments approved before their comments are approved automatically?

    Yes, but you’ll have to perform some source editing to accomplish this.

    In comment-functions.php (wp-includes/), go all the way to the end of the document, to where you’ll find this section:

    // Comment whitelisting:

    Look here for the following line:

    1.5.x:
    if ( 1 == $ok_to_comment && false === strpos( $email, get_settings('moderation_keys')) )

    2.0:
    if ( ( 1 == $ok_to_comment ) && ( empty($mod_keys) || false === strpos( $email, $mod_keys) ) )

    You want to add a new query line just above it, and modify the line(s) like so:

    1.5.x:
    $count_approved = count($wpdb->get_col("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1'"));
    if ( (1 == $ok_to_comment && 3 <= $count_approved) && false === strpos( $email, get_settings('moderation_keys')) )

    2.0:
    $count_approved = count($wpdb->get_col("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1'"));
    if ( ( 1 == $ok_to_comment && 3 <= $count_approved ) && ( empty($mod_keys) || false === strpos( $email, $mod_keys) ) )

    Hacker note: Back up any files before editing them, and comment your changes for future reference.

    Thread Starter citeewurkor

    (@citeewurkor)

    Excellent! That is very good. Appreciate it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Way to modify “user must have previously approved comment”’ is closed to new replies.