Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to disable attachments becomming pages and also disable comments?

  1. #1
    andreasnrb's Avatar
    andreasnrb is offline Kegger
    Join Date
    Jun 2009
    Posts
    594

    Default How to disable attachments becomming pages and also disable comments?

    I got a problem with comment spam that annoys the hell out of me and I can't find any solution for it.
    All attached images becomes actual pages that people can view and also comment on.
    There is no for me obvious way to disable this.

    So how do I go about preventing attachments from becoming pages or disabling comments on those pages.

  2. #2
    andreasnrb's Avatar
    andreasnrb is offline Kegger
    Join Date
    Jun 2009
    Posts
    594

    Default

    Apparently I have to make a filter. Idiotic really.

  3. #3
    hakre's Avatar
    hakre is offline Here For The Peanuts
    Join Date
    Jun 2010
    Posts
    129

    Default

    It should be at least possible to globally disable comments and then you can re-enable it on a per-post basis.

    I know, does not look very comfortable.

    Does anybody has experienced SPAM problems on menu items?
    hakre on wordpress (clicking this all three minutes help to keep the cache fresh - thanks)

  4. #4
    Otto's Avatar
    Otto is offline On The Rocks
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    862

    Default

    You can't disable them becoming pages, this is the basis for the whole attachments and gallery system.

    As for spam issues, I stopped having them when I started using Cookies for Comments and Simple Trackback Validation and Akismet. I still get maybe one or two spams a month, but those always look sorta hand-made.

  5. #5
    andreasnrb's Avatar
    andreasnrb is offline Kegger
    Join Date
    Jun 2009
    Posts
    594

    Default

    Well you should be able to. Why the heck would I want a logo on a page to create another page which then can be commented on?
    Galleries are one thing including images in a post is something other in its entirety. It should be an option if anything. The WP behavior is moronic.
    I need to use antispam plugins to get rid of comments on a page I don't want?

  6. #6
    chipbennett's Avatar
    chipbennett is offline WordPress Legend
    Join Date
    Feb 2009
    Location
    St. Louis, MO
    Posts
    1,993

    Default

    Can't you put a if ( ! is_attachment() ) conditional on the comment_form() call, or even the comments_template() call, to prevent the comment form (or comments) from appearing on attachment pages?

    Or am I missing something?
    WP TurnKey - Turn-Key WordPress installation and maintenance services
    WordPress user since 2005 | @chip_bennett | chipbennett.net | cbnet Plugins

  7. #7
    chipbennett's Avatar
    chipbennett is offline WordPress Legend
    Join Date
    Feb 2009
    Location
    St. Louis, MO
    Posts
    1,993

    Default

    Another option: add an attachment.php or image.php template file to the Theme, and don't call comments_template() from within it. That should prevent comments on image-attachment pages, right?
    WP TurnKey - Turn-Key WordPress installation and maintenance services
    WordPress user since 2005 | @chip_bennett | chipbennett.net | cbnet Plugins

  8. #8
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,797

    Default

    @Chip - I assume they're submitting their comments without the form in place.

  9. #9
    chipbennett's Avatar
    chipbennett is offline WordPress Legend
    Join Date
    Feb 2009
    Location
    St. Louis, MO
    Posts
    1,993

    Default

    Quote Originally Posted by Ryan View Post
    @Chip - I assume they're submitting their comments without the form in place.
    Can't that be stopped via .htaccess and other automated means?
    WP TurnKey - Turn-Key WordPress installation and maintenance services
    WordPress user since 2005 | @chip_bennett | chipbennett.net | cbnet Plugins

  10. #10
    andreasnrb's Avatar
    andreasnrb is offline Kegger
    Join Date
    Jun 2009
    Posts
    594

    Default

    There was a comment form so I think they used it. All spam comments came from one specific attachment.
    But like I said. I don't want attachments to be pages at all which ain't fixed with changing templates =).
    It really is a stupid feature.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •