WordPress.org

Support

Support » Plugins and Hacks » Spam Count plugin

Spam Count plugin

  • I thought I saw a post asking for something like this, but now i can’t find it… but I made it anyway by modifying Mark Styles’ Comment Analysis Plug in.

    <?php
    /*
    Plugin Name: Spam Comment Count
    Version: 1
    Plugin URI: http://wordpress.org/support/topic.php?id=29575
    Author: Mindy Getch
    Author URI: http://moltenwords.net
    Description: Count the # of spam comments eaten

    Modified from Mark Styles' Comment Analysis plugin

    */

    /* Shows the total count of spam comments for the whole blog */
    function mg_spam_count() {
    global $wpdb, $tablecomments;
    $count=$wpdb->get_row("SELECT count(*) cnt
    FROM $tablecomments
    WHERE comment_approved = 'spam'");
    echo $count->cnt;
    }
    ?>

    I inserted it in the meta section of my sidebar with the code:

    <li><?php mg_spam_count(); ?> spam comments eaten without any plugins</li>

  • The topic ‘Spam Count plugin’ is closed to new replies.