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