Spam Count plugin (1 post)

  1. oriecat
    Posted 10 years ago #

    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.

    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>

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.