Comment Timeout
Comment Timeout closes comments on old posts on your blog. It takes into account ongoing discussions by allowing you to keep comments open for longer if you have recently had any comments. Version 2.0 is a complete rewrite from the ground up with some new features:
- Per-post settings: You can set a longer (or shorter) duration for the discussion on particular posts, or even designate some posts to have comments kept open indefinitely.
- Extended discussions for popular posts: You can set a cutoff number of comments above which a post is automatically considered “popular” and entitled to have comments left open for a longer period of time.
- Send to moderation queue: You have the choice between closing comments altogether on older posts or sending them to the moderation queue.
- Advance warning: The comment form now informs your users when the discussion will be closed.
Note: The functionality introduced in version 1.3 to trap BBCode and too many hyperlinks is now in a separate plugin, Link Limits. The functionality to close comments across the board to IP addresses that are persistently causing problems is in another plugin called Three Strikes and You’re Out.
Download
Installation
- Unzip the contents of the archive and copy the comment-timeout directory and all its contents into your wp-content/plugins directory.
- Activate the plugin in your WordPress dashboard.
- Go to the "Comment Timeout" page under "Options" to set the timeout options.
Configuration
The configuration page looks a bit different from version 1.0, but the options are all fairly straightforward:
- Allow comments on posts less than x days old: This indicates how long to leave comments open after a post has been published. If no comments are received during this time, the comment form will be closed. The default is 120 days.
- Also allow comments until x days after last approved comment: This indicates how long to leave comments open after the last approved comment in the discussion. Comments in the moderation queue, spam and deleted comments are not counted. The default is 60 days. If you do not want the discussion extended when comments are received, set this to zero.
- Or on popular posts until x days after last approved comment: Same as the above, but for popular posts. If you don’t want to consider any posts to be "popular", set this value to the same as the previous one.
- Where "popular" means at least x approved comments: This indicates how many comments a post must have in order to be considered "popular" and entitled to the longer interval between comments. The default is to increase the timeout to 365 days after 20 comments.
- On older posts: When this is set to "Close comments", the comment form will be closed on older posts and any attempts to post a comment will be rejected. When it is set to "Send to moderation queue", the comment form will remain open, but all comments on older posts will be flagged for moderation. The default is to close comments.
- Trackbacks and pingbacks: When this is set to "Treat as comments" (the default), trackbacks and pingbacks will be lumped together with the comments in the calculations. When it is set to "Handle independently", they will be subject to the same rules as the comments, but treated separately, so if you are getting a lot of comments but few trackbacks, trackbacks may close before comments, or vice versa. "Do not time out" means that trackbacks and pingbacks remain open indefinitely, regardless of what happens to the comments.
- Apply these rules to pages, images and file uploads: This indicates that these rules should be applied to anything that isn’t a post within your blog chronology, i.e. pages, images and file uploads. If you uncheck this, pages that have comments open will have them kept open indefinitely by default.
- Allow individual posts to override these settings: This indicates that individual posts should be allowed to specify their own timeout values. If you are not using this option, you can gain a little performance by turning it off, as it uses an extra database query on each request.
Per-post settings
When it is enabled, Comment Timeout adds an extra box to the sidebar in your "Write post" or "Write page" pages in the dashboard. This gives you options to use the default settings, keep comments open indefinitely ("don’t close comments"), or specify individual timeouts for the discussion. Note that posts that have their own timeout settings do not have an option to check for popularity. Note: On Firefox, if you reorder the boxes in the sidebar, the check mark on the radio buttons will disappear. This appears to be a bug in either WordPress itself, or the browser(s) concerned (I have not determined which), not Comment Timeout: the "Post status" box behaves in the same way. I have not yet determined exactly which other browsers are affected.
Requirements
Comment Timeout requires WordPress 2.0 or later. It does not work with WordPress 1.5. If you run into problems, I’ve written a blog entry on how to report problems with WordPress plugins. Please read it and do what it says before shouting at me!
34 trackbacks:
12 Jun 2007 17:27: Working at Home on the Internet[…] for WordPress that seems to be the answer for this most recent spat of spam. It’s called Comment TimeOut 2.0. I’m not sure where I found it, probably from one of my daily reads, but thanks for the tip […]
19 Jul 2007 20:34: Deutsche Version von Comment-Timeout 2.0 « Kommentare, Kommentarfunktion, Plugin, Beiträge, Anzahl, Download, Erreichen, Pingbacks, Tagen, Track- « News Splitter Blog[…] WP-Plugin von James McKay schaltet nach voreingestellter Zeit die Kommentarfunktion automatisch ab, ohne dass sich der […]
20 Jul 2007 14:10: neverbot.com » archivo » Plugin: Comment Timeout[…] instalado el plugin Comment Timeout para gestionar los cierres de comentarios automáticamente. En posts con más de dos meses de […]
23 Jul 2007 23:13: weblog.martincrockett.com » Blog Archive » Comment Timeout, updated[…] Comment Timeout 2.0 […]
24 Jul 2007 19:32: 30+ Plugins for Wordpress Comments[…] Comment Timeout - Closes comments on old posts. […]
25 Jul 2007 02:31: Geekninja Tecnologia 30 Plugins para Wordpress (Comentários) «[…] pergunta ao usuário antes de postar o comentário, serve também como antispam e programas robos. Comment Timeout - Deleta comentários com links […]
25 Jul 2007 08:11: The sky of Daemon! » Blog Archive » 译文:30多个Wordpress留言插件[…] Comment Timeout - 自动在旧文章中关闭留言功能。 […]
25 Jul 2007 16:13: 增强 WordPress 评论功能的 30+ 个插件 - 花儿开了[…] Comment Timeout - 对于时效性强的 Blog,就文章的评论基本没价值,所以让它自动关了是个不错的选择。 […]
26 Jul 2007 02:38: 30 余款实用的 WordPress 评论插件[…] Akismet - Spam Karma - Bad Behavior - Did You Pass Math? - Comment Timeout […]
26 Jul 2007 03:23: 30+ Plugins for Wordpress Comments | wordpress blog xqxp.com[…] Comment Timeout - Closes comments on old posts. […]
31 Jul 2007 18:02: 30 plugin para comentarios en Wodpress[…] Comment Timeout – Cierra la opción de poder comentar artículos viejos, muy útil cuando tenemos ya un tiempo largo con nuestro blog y muchísimos artículos en el, ya que nos evitara tener que hacer todo de forma manual. […]
1 Aug 2007 03:41: Plugins anti-spam para Wordpress[…] Comment Timeout […]
1 Aug 2007 22:21: Auto-moderate comments on old Wordpress posts | ChillyCool Web Digger[…] posts on your blog that the spammers hit over and over for whatever reason? This plugin lets you set all posts over a certain age (as defined by the last time any approved comments were posted) to …. You can decide how many days old a post thread should be before this happens, configure it […]
3 Aug 2007 10:13: [轉貼] 30多個Wordpress留言插件 | 艾德的部落格天空 | 亂寫、亂拍、亂來。 — 持續亂改更新中 —[…] Comment Timeout - 自動在舊文章中關閉留言功能。 […]
4 Aug 2007 02:04: [轉貼] 30多個Wordpress留言插件 « 艾德的部落格天空[…] Comment Timeout - 自動在舊文章中關閉留言功能。 […]
22 Aug 2007 08:52: BoltPressWhat’s reCAPTCHA doing?…
Either the spammer managed to work out an OCR bot that was even better than reCAPTCHA’s very own, or the reCAPTCHA WordPress Plugin simply isn’t working for me. I’ve installed the Comment Timeout plugin just to be a bit stricter. Besi…
16 Oct 2007 18:31: CS Internet BlogWordPress Empfehlungen…
Der Hauptgrund warum ich mein WordPress Weblog noch nicht auf die aktuellste Version upgedatet habe war wohl die neue Tagging Funktion. Da ich schon seitdem dieser Blog existiert voll auf Simple Tagging vertraue wollte ich mich auch nicht unbedingt ums…
17 Oct 2007 18:43: eds blogComment Timeout…
Gerade habe ich gesehen, daß es für Wordpress ein nettes Plug-In gibt: Comment Timeout. Damit kann man ziemlich detailiert regeln, wann die Kommentarfunktion in einem Post “abgestellt” werden soll, was äusserst praktisch ist, wenn man von Spam üb…
31 Mar 2008 16:33: Beaconfire Wire » Blog Archive » Spam 2.0[…] to keep spammers from overwhelming our system. We also recently installed a WordPress plugin (Comment Timeout), which automatically closes comments on older […]
1 Apr 2008 16:16: WordPress 2.5… | words are not enough | live… from new orleans[…] Comment Timeout: Automatically closes comments on blog entries after a user-configurable period of time. […]
7 Apr 2008 12:45: Comment Timeout Plugin eingebaut.[…] auf einen uralt Beitrag bekommen habe habe ich nach dem nofollow case by case nun auch das Comment Timeout Plugin eingebaut. Das Plugin schließt nach einstellbaren Kriterien (Alter des beitrages, […]
8 Apr 2008 07:43: Juice bar » 30多个Wordpress留言插件[…] Comment Timeout - 自动在旧文章中关闭留言功能。 […]
9 Apr 2008 04:21: 维纳斯 » Blog Archive » wordpress插件集锦(不断添加中…)[…] Highlighter - 根据作者姓名、email、网址等定义评论显示风格。 Comment Timeout - […]
9 Apr 2008 16:52: 30个与评论相关的Wordpress插件[…] Comment Timeout - 关闭旧日志的评论功能。 […]
10 Apr 2008 11:51: Tokite: 7.000 utenti ogni giorno ci scelgono. Guida alle migliori risorse gratis della rete: software, giochi, video, musica, internet, immagini, sms, antivirus e tanto altro ancora, gratis. » 30 plugin per arricchire le funzionalità dei commenti W[…] Comment Timeout - Chiude i commenti nel post più vecchi. […]
13 Apr 2008 03:07: WORDPRESS GOD: 300+ Tools for Running Your WordPress Blog[…] Comment Timeout - Closes comments on old posts. […]
15 Apr 2008 07:25: 7 WordPress Anti Spam Plugins - The Inner Light | The Other World of Hybridesign[…] Comment Timeout Selectively close comments on your blog to help reduce spam. It comes with an administration page and is fully configurable. […]
16 Apr 2008 11:44: blog@netplanet » Blog Archiv » Liste der verwendeten WordPress-Plugins.[…] Comment Timeout Diese Plugin dient dazu, die Kommentarfunktion nach einem definierten Artikelalter zu deaktivieren. Dient zur sekundären Abwehr von Kommentar-Spam, vor allem für die Spezialisten, die es darauf abgesehen haben, bestimmte Artikel monatelang immer wieder zu vermüllen. […]
18 Apr 2008 09:18: Top Commentators 2.0 Wordpress Plugin - Do it right![…] to filter abuse. I’d also strongly recommend getting James McKay’s extremely versatile Comments Timeout plugin to work in tandem with this plugin to protect your content further. A spammer visiting your […]
21 Apr 2008 14:24: 30 plugin per arricchire le funzionalità dei commenti Wordpress by Mondo Informatico[…] Comment Timeout - Chiude i commenti nel post più vecchi. […]
22 Apr 2008 14:08: The Ultimate WordPress Plugin Library : Get More Reviews[…] Comment Timeout - Closes comments on old posts. […]
25 Apr 2008 18:49: Timeout für Kommentare » Blog-Archiv » Cowboy of Bottrop[…] Artikel hier im Blog gerne für Spam-Kommentare missbraucht werden, habe ich das Plugin “Comment Timeout” installiert, welches die Kommentar-Funktion automatisch abschaltet. Der Standard-Zeitplan […]
6 May 2008 16:41: wordpress插件集锦(不断添加中…)[…] […]
13 May 2008 08:02: New1’s trip » WP插件汇总(3):Wordpress留言插件[…] Comment Timeout - 自动在旧文章中关闭留言功能。 […]

RSS feed


14:38
is this supported in wp2.2?
14:40
Yes. I’m using it here on my own blog, which is running WordPress 2.2.
15:30
oh goody… i am now flooded by spam… this gonna work… hehe
15:52
Try Link Limits as well. I’ve found that about 80% of spam has BBCode or hyperlinks in abundance. Bad Behavior and Akismet are also absolute essentials for mopping up the remainder.
16:13
oh… its not that effective for me… the spam i get only has 2 links at the most… this plugin in is enough as the affected posts are way way back…
09:13
I’ll give your plugin a shot on my site to cut down the daily comments keeping me up to date on viagra news as this gets really boring.
16:44
When a spam comment is eliminated does it get saved in the database as spam or is it just deleted?
09:36
You can set that as an option in the configuration page. Comments on older posts can either be rejected outright or sent to the moderation queue.
12:54
I really love this plugin. Very professionally done.
is there a way to tweak it to have the option to close comments when the comment count gets to a certain number?
This isn’t to battle spam.
09:11
Hmmm, I did have that facility in version 1.x but I didn’t think it was any use to anyone so I’ve removed it in the first alpha of 2.0. Does anyone else think I should put it back?
00:29
This is great and just what I was looking for. Considering I’m over 115,000 blocked spam comments from Akismet, and most of my spam comments coming on old posts, this is going to be really helpful.
As for Jesse’s idea… not sure how useful that would be personally, seems kind of an arbitrary idea — that might make sense for huge comment blogs like TechCrunch where you’d want to cap it at, say 50 comments across the board, but I think that belongs in a separate plugin… maybe “Max Comments”?
16:25
Akismet catches virtually all my spam, so what I’m really looking for is a way to reduce overhead — there have been times when I got so much spam (thousands per hour) that it set off the cpu usage alarms at my host and got my site repeatedly suspended for a few minutes. So I’m wondering if blocking the comments would reduce the amount of cpu time that spammers consume when they’re hammering the comments-post script. Any thoughts?
08:57
For me, Akismet was once starving, now it’s struggling with overfeeding of spam. This should come in handy
19:09
Great plugin, many thanks! It has consideraby reduced the ammount of comment spam I am getting… but I’m not sure if ti related to this plugin, but I don’t get any pingbacks anymore, roughly since the time I installed the plugin. I see the PBs in the xmlrpc.log file, but they seem to get lost on the way from there…?
thx
Tom
10:03
I’ve found the reason for the missing pingbacks; it is not related with your plugin.
thanks for the good work!
17:14
I seem to be coming up against an issue with this plugin. (Or at least, I think it’s this plugin, as the issue goes away when I deactivate it.)
Anyway, the basic problem is that whenever you submit a comment, instead of the comment being accepted, the submitter is being sent to a wordpress error page that says “Sorry, comments are closed for this item.”
This happens regardless of how old the post is. It also happens even when it’s clearly stated next to the submit post box that the comments aren’t due to close for another month, or whatever.
The very odd thing though, and the main reason why I suspect this to be some odd bug, is because if I change the option “For older posts” from “close comments” to “send to moderation queue”, then the comments go to moderation. IE the plugin is treating every single post as if it is “old” but it is still allowing the comments to be submitted. (On the actual old posts the comments submission form is not shown, as designed.)
I honestly cannot explain this bug.
For info -
Disabled all other plugins, no change.
Server Apache/1.3.34 (Unix) mod_become/1.3 DAV/1.0.3 mod_perl/1.29 PHP/4.3.9 mod_fastcgi/2.4.2
PHP v4.3.9
MYSQL v4.1.10a AND version 4.1.22-log
Tested both with logged in user and non-logged in user, on various browsers.
Any ideas?
18:34
Ok, I’ve done a bit more digging at this and compared the current version of your plugin with the last one I had. I found this line in preprocess_comments
$post = get_post($comment[’comment_post_ID’]);
Which in the old version was like this
$post = get_post($comment->comment_post_ID);
I changed the current plugin to the line in the old code with the -> character and commenting works again. I switch it back, and it breaks. I do not know enough about PHP to say why this is the case, or if my fix is valid. Any ideas?
12:50
@mrmist: The change you suggested actually undoes a fix for a bug that was allowing spam bots to sneak past the protection. Anyone who is not experiencing the same problem should not apply this change. Anyone who is experiencing this problem, please let me know.
You haven’t told me which version of WordPress you are using. I will need to know this. Also, do you know whether you have enabled the WordPress cache?
I’m on holiday at the moment and don’t have my laptop with me but I will look into this when I get back next week.
17:36
Ahh ok. I guess that’s not a great fix then. Unfortunately without the “fix” I can’t use the plugin at all.
I have a feeling that not many people are being affected, because surely you would have heard more responses?
Anyway it’s wordpress 2.2.2, no cache.
Enjoy your holiday!
10:07
i tryied your plugin and is really nice. thank you for your work
16:03
I loved the comment limit per post option, but it’s gone in the new version.. WHY?
16:50
Hi James, I’m back!
I have just uploaded and activated “Comment Timeout” and realized that once activated, WordPress will no longer send me emails whenever somebody leaves me a comment. And once I deactivated the plugin, I received email notifications whenever a new comment is posted.
Is this a bug?
04:12
Hi James,
Try on the plugin, seems like I can reply the comments when I am logged in to my wordpress admin.
It kept saying this “Sorry, comments are closed for this item.”
I am using the latest version of the plugin
01:54
Is there asp version for the script? Thanks
18:49
Love it, love it, love it!!
The plug-in seems to be working really well.
19:36
@Josie: are you looking for Link Limits?
@OHR: No, this is WordPress specific. I know that some ASP.NET blog software such as Subtext and dasBlog have automatic comment closing functionality but it is not quite so flexible. If it’s classic ASP you mean, do people still use that?
@Pelf: I might have known you’d show up — you seem to be pretty good at putting me through the mill! Which other plugins are you using? It may be related to the problem that some other people have been reporting about it erroneously closing comments.
@Everyone else who has reported problems: I take it you are all on PHP 4 — is this correct? Sorry for the delay in tackling this one — I should be able to give it some attention in the next few days now that I am back from holiday.
20:27
Yeah mine is 4.3.9. No worries about the delay, real life quite often takes over from blogworld.
14:34
Why has the comment limit per post bit gone ??? - I loved it and its not there in the new edition
02:14
Excellent plugin - thanks!
10:14
Thanks for your reply, I’m not looking for link limits. I’m looking for a setting that let me limit the number of comments per post. For example I want to close comments after 30 comments in a post!
20:45
Thanks for the plugin. A good and usefull help for my blog…
19:30
I also just got the error message “Sorry, comments are closed for this item” even on new posts.
I modified the preprocess_comment($comment) function.
Replace:$post = get_post($comment[’comment_post_ID’]);
With: $post = get_post($comment->comment_post_ID);
It works now.
00:14
@Josie: It seems there is a demand for this feature — I will probably either restore it in version 2.1 or release it as a separate plugin. What does everyone think?
@Daniel: As I mentioned above, I don’t think that this is the problem. However, I have spotted something that may be causing problems. A couple of lines further down, the line that says:
should actually say this:
I’ve corrected this in version 2.0.1. Can you let me know if it makes a difference?
10:31
Hi James, does commet-timeout work well with wp 2.3? Could you consider including it in the official compatibility list?
http://codex.wordpress.org/Plugins/Plugin_Compatibility/2.3
12:09
I haven’t tested it with WordPress 2.3 yet — haven’t had time — but I expect that it should work. If anyone can confirm that it does or runs across any issues, let me know and I will look into it when I get a chance.
18:42
I have blog in Wordpress 2.2.3 and this plugin work great. Thank’s
09:01
Hello!
Pleasingly, the fix above seems to have worked in my case. I also suppose that it explains why not everyone experienced the bug, because it would depend if you allow pings or not.
So 2.0.1 seems good for me.
11:40
I’ve just upgraded to WordPress 2.3 and Comment Timeout 2.0.1, and initially it seems to be working. Comments on old posts seem to be blocked, comments on new ones not. Of course, I upgraded about ten minutes ago, so I’ve not been able to check for more subtle problems, but it doesn’t crash the system.
11:52
Maybe another simple plugin would be great. But in the meanwhile… can you give me a download link (or send it to my mail) to the previous version of comment timeout where the comment limit option was available? Thank youuuu!
20:45
It’s available here.
14:03
Thank youuu
07:37
Hi, thanks for the plugin & for the fix (it certainly happens when pingbacks are disabled).

I have a feature-request, just a suggetion: I’d like the ‘add to moderation queue’ option to apply to older posts but not all. I mean adding a number of days after which the comments are just closed.
So the schedule for a post would be: Comments open | comments on pop. post | moderation queue | comments closed.
09:10
Hmmm, I’m not too sure about that one — it’s probably over-complicating things, though if there is sufficient demand for it I may consider it.
Then again I could always let Zawinski’s Law prevail and expand it until it can read mail…
23:28
When someone accesses the trackback address on a closed post (say, mysite.com/somepost/trackback), they get redirected to the post itself (mysite.com/somepost/). Can this plugin, or WordPress itself, be configured to return a 403 or 404 in this case?
00:00
@Eric: Off the top of my head, I think that’s a feature of the WordPress core rather than CT. You’d probably need another plugin to do what you’re asking.
@Josie and anyone else who’s interested: you may be interested to know that there is already another plugin called Cap Comments that places a limit on the number of comments in a blog post. I haven’t tried it myself so I don’t know how well it works.
00:15
Suggested feature: The ability to change the date format shown in the “Comments for this post will be closed on…” message via the admin.
I was able to change the date to a typical American format (”February 11, 2008″) by editing the line 525 in comment-timeout.php (v 2.0), changing this:
echo 'on ' . date('j F Y', $ct1);to this:
echo 'on ' . date('F j, Y', $ct1);However, more “plug & play” users may have trouble with this, so having a choice of some common date formats would be nice. For the do-it-yourselfers that aren’t familiar with date formatting, here’s some more info on date and time in WordPress.
22:07
Great plug-in James!
Works great and is easy to use!
One question though: I’m running a Dutch website. I’ve managed to change the message ‘Comments for this post will be closed’ to a Dutch sentence, but the names of the months are still in English. The site uses the Dutch language, but your plug-in doesn’t seem to care about that and keeps it in English.
Is there a way to change this so that also the name of the months of your plug-in are in Dutch?
Thanks in advance!
Joram, The Netherlands
12:39
Hi,
Thanks for this great plugin, it works great.
I’ve got one question: How do i translate the date? My whole blog is in Dutch (including the date and time). When viewing the plugin the date is in englisch
How to retrieve dutch times as used in WP???
Regards!
00:19
Hi James,
Fantastic plug-in, thank you for your continued work on it. I’m wondering if it has the capability to change the placement of the ‘Comments for this post will expire…’ text in a template? I’m redesigning and would like to integrate the output with my design, since at the moment it’s just tacked automatically at the bottom.
Could you include a ‘template tag’ (oh I hate that term in Wordpress) to override the automatic insertion?
00:17
Thanks for the plugin! Is it compatible with Wordpress 2.3.2?
17:45
It is compatible with WordPress 2.3, yes.
14:03
hi James,
Is this comment plug-in compatible with different than WP programme? as currently im using a tool name BLUEVODA to create my website. Do this plug-in also support BLUEVODA??
17:40
Unfortunately not — it’s WordPress specific.
18:48
James,
Thank you very much for your software! I’ve been wondering how I would handle the situation of people posting on my old posts. Now I know! I’m going to add it to my blog.
11:04
What about a version officially compatible with 2.5?
12:55
I haven’t tested it properly on WordPress 2.5 yet, but as far as I am aware, it should work correctly without modification.
04:37
Hi James,
I’m building a “Newspaper” type of site using WP 2.3.3 (Will not upgrade till 2.51 is out, 2.5 is buggy) and will be installing this plugin but before I do, would it affect the number of comments on pages also? And would it interfere with DMSGuestbook, which uses it’s own templates?
Thanks,
Gene