Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#7741 closed enhancement (fixed)

Close comments for old posts

Reported by: ryan's profile ryan Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

Add discussion option to close comments on posts older than x days.

Attachments (1)

7741.diff (6.0 KB) - added by ryan 16 years ago.

Download all attachments as: .zip

Change History (14)

@ryan
16 years ago

#1 @mrmist
16 years ago

I see you've written the patch for this, so it's probably late to mention now, but there is a "comment timeout" plugin that provides this functionality.

#2 @DD32
16 years ago

Question: It looks like that patch closes Pingbacks too after x days? Tracking pingbacks and trackbacks for older posts might still be a requested feature.

Also, By doing it that way(no db queries), is it still possible to re-enable comments on a per-post basis if the user wishes for comments to be enabled on the older post?

#3 @ryan
16 years ago

Pingbacks and trackbacks are closed too. Posts cannot be enabled individually. This is a simple "Don't bother me" feature that I think doesn't need those options. When I turn this on I'm saying I don't want to be bothered with moderating comments or trackbacks on any old posts, period.

#4 @jacobsantos
16 years ago

phpDoc has /** at the beginning and a space before the */. Looks good to me. I think it is better than having to download a plugin to do the same thing.

#5 @jacobsantos
16 years ago

  • Type changed from defect to enhancement

Isn't this an enhancement?

#6 follow-up: @ryan
16 years ago

(In [8892]) Close comments for old posts. see #7741

#7 follow-up: @ryan
16 years ago

Committed what I had and leaving open for discussion.

#8 in reply to: ↑ 6 @ShaneF
16 years ago

Replying to ryan:

(In [8892]) Close comments for old posts. see #7741

+1, looks good on my end. I hate it when spam gets in the way on the old posts.

#9 in reply to: ↑ 7 @ShropDave
16 years ago

Replying to ryan:

Committed what I had and leaving open for discussion.

Looks good. However although the comment form won't be shown, if the form POST request is still sent won't the posted comment to an old post still be processed as the post status hasn't actually changed?

#10 @ryan
16 years ago

Yes, a direct POST will still be processed so it is still a spam target. The current implementation is intended as a low overhead solution that doesn't do any DB writes when loading the page, but that might not be adequate if spammers can end run it. Something to consider when assessing the tradeoffs. I do like to avoid doing DB writes for front page loads.

#11 @ryan
16 years ago

Actually, we can do the old post check when we fetch the status in wp-comments-post.php. Anyone want to do a patch?

#12 @ryan
16 years ago

(In [9015]) Make pings_open() and comments_open() aware of old post settings. see #7741

#13 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.