WordPress.org

Ready to get started?Download WordPress

Forums

spam on pictures? (14 posts)

  1. saladgoat
    Member
    Posted 2 years ago #

    I have Comments turned off for pages and posts.
    But now my Spam folder has 3 comments in it - all on the same image. Not on a post or a page, but an image.
    When I click View Post, it shows me my main page header and then below it, the picture. And below that, a comment box, to leave comments!
    When I click Edit, to see if I can turn off comments, it only takes me to the image properties page.
    I assume that I did not set 'no comments' until after I uploaded this particular image ... but how does this page come up with a comment box???
    More importantly, how can I turn off commenting on this (and any other) image?
    Thanks!

  2. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    Few realize that a main goal of malware writers is to get website authors to infect websites through their own lack of understanding...The Codex explains in detail how to remove bad files, cleanup the db and prevents this, most of which occurs from home users without proper knowledge of malware...

  3. saladgoat
    Member
    Posted 2 years ago #

    The Codex is very big and I have no idea where to look. How about a link?

  4. MickeyRoush
    Member
    Posted 2 years ago #

    saladgoat wrote:

    The Codex is very big and I have no idea where to look. How about a link?

    http://codex.wordpress.org/Combating_Comment_Spam

    Sounds like you have trackback spam. Disable all trackbacks. On already created pages you'll need to uncheck them on an individual basis.

  5. saladgoat
    Member
    Posted 2 years ago #

    It's not trackbacks, it is comments. And the Codex link you provided is helpful for regular spam but not for what I am getting.

    I have all comments and trackbacks turned off.

    If I get spam comments on a post I can go into the Edit page for that post and turn off commenting. I know that.

    These spam are happening to pictures. There is no way that I can see that I can turn off commenting on pictures. When I click to Edit, it takes me to the properties page for that image, which has no option for comments.

    The only useful thing on that Codex page is to delete the wp-comments-post.php file, which is quite drastic and would affect my ability to allow comments in the future, if I chose to. (Wouldn't this file be restored on every WordPress update? Meaning I would have to delete it every time I updated WordPress?)

    Here is a screenshot of the spam I am getting so you can see what I mean, if I am not explaining it properly.

    Thanks!

  6. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

  7. saladgoat
    Member
    Posted 2 years ago #

    That sounded so promising but I am using the Twenty-ten theme and whoever made it put all the good stuff in the loop, where I can't find it. The attachment file (and, in fact, all the files) are basically:
    get_header
    get_loop
    get_footer
    leaving nothing to edit. :(

  8. Ronda Kay
    Member
    Posted 1 year ago #

    Did you ever get an answer for this?
    I'm having the same problem.

  9. saladgoat
    Member
    Posted 1 year ago #

    Ronda,
    I never figured it out.
    What happened was that I had set No Comments for the entire site after I had uploaded these images, so only these had commenting allowed.
    By re-uploading the images in questions and deleting these ones, I was able to completely stop spam.
    But that's really only handy if you have commenting disabled. If you want to allow comments, then I think you're stuck with spam.

  10. Ronda Kay
    Member
    Posted 1 year ago #

    thanks so much. easy enough to re-upload the image as it's only one.

    where did you set the "No Comments" for the entire site?

  11. saladgoat
    Member
    Posted 1 year ago #

    Go to Settings -> Discussion and uncheck
    Allow people to post comments on new articles

    That will automatically disable commenting on all future posts/pages, etc.
    But you can turn it on for individual posts/pages on the Edit screen.

  12. Ronda Kay
    Member
    Posted 1 year ago #

    thanks very much! I followed your suggestion!

    Best wishes for great digital days (as opposed to 'digital daze' where i find myself quite often!)

  13. Gary Darling
    Member
    Posted 1 year ago #

    There is at least one plugin that will fix this problem, Comment Control.

    Alternatively, you can just insert some code in your functions.php file:

    add_filter( 'comments_open', 'no_media_comments', 10, 2 );
    
    function no_media_comments( $open, $post_id ) {
    
    	$post = get_post( $post_id );
    // wordpress refers to images as attachments
    	if ( 'attachment' == $post->post_type )
    		$open = false;
    
    	return $open;
    }

    Test before and after: Go to Media > Library, find an image that has a dark comment bubble, click View and see if there is a comment box.

  14. Herbythyme
    Member
    Posted 1 year ago #

    Just to say "much appreciated". Just used the functions.php code in the theme I use - apparently nothing broke and there are no comment boxes on my images. Given I've got 500+ of them that should significantly reduce the spam.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic