• On my https://www.zerotorich.com blog, I have it set to have all comments to be moderated. I got one of the poker spams, and marked it as spam. The comment doesn’t appear under the post, but there is still a link in the comments section in the sidebar that goes right to their site.
    1. How do I rid of this.
    2. Is there a bug with marking comments as spam that I should delete them instead of marking them as spam?
    3. Once I have marked a comment as spam, can I go back and delete it? Do I need to get into the MySql DB and manually delete the comment?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Whatever your using to display those recent comments apparently doesn’t handle spam comments appropriately. Is it a plugin? If so, look for an update to the plugin.

    Thread Starter rjacob

    (@rjacob)

    I have installed no plugins. The theme I am using is a tweaked version of “Devenir En Gris”. It has some php code that displays the comments:
    <?php
    foreach ($comments as $comment) {
    echo ‘
    ‘ . sprintf(‘%s <span style=”text-transform: lowercase;”>on</span>
    %s’, get_comment_author_link(), ‘comment_post_ID) . ‘#comment-‘ . $comment->comment_ID . ‘”>’ . get_the_title($comment->comment_post_ID) . ”);
    edit_comment_link(__(“Edit”), ‘ <small>(‘, ‘)</small>’);
    echo ‘ ‘;
    }
    ?>

    And it gets the comments from…? What’s the “SELECT” statement in your version? Should look something like:

    if ( $comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, ...

    Thread Starter rjacob

    (@rjacob)

    if ( $comments = $wpdb->get_results(“SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments ORDER BY comment_date_gmt DESC LIMIT 5”) ) :
    ?>

    Should there be a where clause?

    Looks like an old version of the theme… the version I downloaded from the author’s site has a where clause.

    Thread Starter rjacob

    (@rjacob)

    Apparently I started with an old version of the theme. I will add the where clause, and that should fix it. Thanks much!

    I’ve had a specific type of comment spam refuse to leave the “latest activity” menu as well.

    I had to go into the database and manually delete them.

    There’s no magic to it… the comment_approved field has 3 values: 1, 0, or spam. Any database query that doesn’t have a WHERE clause that explicitly checks for a 1 in the comment_approved field will pull out spam comments, be it from naive plugins or naive themes. Removing the spam comments from the database will obviously make them not appear, but they’re not “special” in any way.

    Thread Starter rjacob

    (@rjacob)

    Just out of curiousity, what does marking a comment as spam do? Does help to prevent future spams by blocking that IP, or something?

    No, it does a whole lot of nothing right now. They’re stored for the possibility that some future code — either core code or a plugin — will come along and do “something” with them to improve detection of future spams.

    ColdForged:
    Have you seen the garbage spam which sticks in the display?

    usually something like fjhsgkjhdkjghskjhgrkjdxfnkjbsnkjsrtnbkjsnkjbnsekj sdkfbnkdjsbnkjnbksdkbjnkjsbnksjnbksjn

    these, for whatever reason, if marked as spam remain in the recent reply display.

    only manually deleting them with phpmyadmin gets them off the list.

    Nope, I haven’t. Then again, how do you define “recent reply display”?

    The sidebar output for

    blc_latest_comments()

    using brian’s latest comments

    you sure you have the latest blc? I just looked at the source, and it is definitely checking approved=’1′, which should knock any approved=’spam’ comments out of consideration…

    -d

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Marked comment as spam, but it’s still under comments in sidebar…’ is closed to new replies.