WordPress.org

Ready to get started?Download WordPress

Forums

Marked comment as spam, but it's still under comments in sidebar... (15 posts)

  1. rjacob
    Member
    Posted 9 years ago #

    On my http://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?

  2. ColdForged
    Member
    Posted 9 years ago #

    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.

  3. rjacob
    Member
    Posted 9 years ago #

    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 ' ';
    }
    ?>

  4. ColdForged
    Member
    Posted 9 years ago #

    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, ...

  5. rjacob
    Member
    Posted 9 years ago #

    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?

  6. ColdForged
    Member
    Posted 9 years ago #

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

  7. rjacob
    Member
    Posted 9 years ago #

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

  8. dss
    Member
    Posted 9 years ago #

    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.

  9. ColdForged
    Member
    Posted 9 years ago #

    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.

  10. rjacob
    Member
    Posted 9 years ago #

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

  11. ColdForged
    Member
    Posted 9 years ago #

    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.

  12. dss
    Member
    Posted 9 years ago #

    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.

  13. ColdForged
    Member
    Posted 9 years ago #

    Nope, I haven't. Then again, how do you define "recent reply display"?

  14. dss
    Member
    Posted 9 years ago #

    The sidebar output for

    blc_latest_comments()

    using brian's latest comments

  15. davidchait
    Member
    Posted 9 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.