WordPress.org

Ready to get started?Download WordPress

Forums

1.2 plugin request: Close comments after X time. (9 posts)

  1. Michael Heilemann
    Member
    Posted 10 years ago #

    I would love to have a pluging that closed off the comments for entries as they dropped off the frontpage. This would also help combat spam.

  2. nsxpower
    Member
    Posted 10 years ago #

    http://theubergeeks.net/index.php?p=162 is a "better" solution (although it is yet to be shared), since posts may drop off the front page sooner that the interest (and relevant comments) in that particular entry.

  3. stephenv
    Member
    Posted 10 years ago #

    I second this plugin request...
    Also to respond to nsxpower:
    Some of us have blogs where we post multiple times per day (~6x/day and show latest 15 on front), it is more helpful to have comments close after a set time, mostly because traffic will turn up later from search engines on particular topics and it is nice to be able to catch the stragglers and let them have their say (in my case, 2 weeks max open).

  4. RedDwarf
    Member
    Posted 10 years ago #

    That works great lomara, thanks! I added it as a clickable in my template section so I don't have to remember the filename. :p

  5. mikelu
    Member
    Posted 10 years ago #

    I did some modification in wp-comments-post.php to approach the concept that nsxpower mentioned. Maybe you can check to see if it fits your need on my site.
    comment moderation
    PS. My site is written in Chinese, but you can still see codes for the modifications.

  6. southerngal
    Member
    Posted 10 years ago #

    Lomara, what do I do with the script after it's be configured? How and where do I call it in, or do I have to?

  7. Mark (podz)
    Support Maven
    Posted 10 years ago #

    I'm not sure either .. I have 3 sites on which I want to use this, but all will be different ..
    Has anyone written this as maybe a button on the admin screen that can be clicked so that it activates ?

  8. lomara
    Member
    Posted 10 years ago #

    southerngal, just make the edits in the script to point at your database, choose the age of comments you want to close, and load the page in a browser window. It will run just by calling it with a browser.
    Podz, you could add it as an entry in menu.php, then run it periodically from the admin screen. That's one option. If you are running 3 blogs in a single database, then you would probably have to make 3 copies of the script, and edit the table references to point at each blog post/comment table individually. It would be clunky, but it could work.
    I'm sure if others have better suggestions they'll let us know. I'm still a newbie at php.

  9. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Upload the correctly configured php file to the wp-admin directory.
    Edit menu.php and add this into the array:
    array(__('Close Comments'), 3, 'wp-closecomments.php'),
    Change the 3 to whatever level of user can do such a task.
    Now to try and work out how to make it do what it does without exiting the admin screen, or by flicking straight back to it.
    Either way, nice script :)
    Ta !

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.