Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#7942 closed enhancement (fixed)

Enable pretty permalinks for comment paging

Reported by: viper007bond's profile Viper007Bond Owned by:
Milestone: 2.7 Priority: high
Severity: normal Version: 2.7
Component: Comments Keywords: has-patch needs-testing
Focuses: Cc:

Description

Suggested format: .../comment-page-1/ (matches plugin and is nice looking IMO)

If someone doesn't beat me to it, I can probably handle it.

Attachments (4)

7492.diff (6.7 KB) - added by DD32 16 years ago.
7942.diff (2.0 KB) - added by DD32 16 years ago.
7942.2.diff (3.0 KB) - added by Viper007Bond 16 years ago.
Bug fix of DD32's patch for when newest page is showed by default
7942.3.diff (1.1 KB) - added by DD32 16 years ago.
redirect post-name/comment-page-xx/ => post-name/ when paging disabled

Download all attachments as: .zip

Change History (17)

#1 @markjaquith
16 years ago

Go for it. Agree on using that format to match the plugin.

#2 @DD32
16 years ago

It'd be nice to support comment paging on attachments too(Just incase someone else does it, and only does it for Posts|Pages), I went to implement this ticket.. However, Got confused quickly in WP_Rewrite::generate_rewrite_rules() as for how its doing its black magic :)

#3 @ryan
16 years ago

  • Component changed from General to Comments
  • Owner anonymous deleted

@DD32
16 years ago

#4 @DD32
16 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

attachment 7492.diff added.

  • ../comment-page-xx/ support for pages/posts/attachments (anything with comments)
  • canonical redirection for ?cpage=xx to comment-page-xx
  • comment pagination links use pretty links if enabled
  • Yes, This patch is for this ticket, even though i managed to muddle the ticket number up in the filename..

#5 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [9300]) pretty permalinks for comment paging. Props Viper007Bind. fixes #7942

#6 @ryan
16 years ago

Duh, propped the wrong person and even spelt that wrong.

#7 @ryan
16 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

previous_comments_link() and next_comments_link() also need to be updated.

What do we do if both the post and comments are paged? Paging comments while on page 2 of the post should preserve the post page 2 in the links?

#8 @DD32
16 years ago

What do we do if both the post and comments are paged? Paging comments while on page 2 of the post should preserve the post page 2 in the links?

Another Rewrite rule will need to be added to the Paged rules for that, And some funky coding will need to happen inside the function to get the right orderings of the page/xx/comment-page-xx/ i believe

@DD32
16 years ago

#9 @DD32
16 years ago

attachment 7942.diff added.

  • (previous|next)_comments_link() converted to permalinks
  • It'd be nice to condense that If branch together, But i'm not 100% on the logic behind it, So i've left it as 2 branches.

#10 @ryan
16 years ago

  • Priority changed from normal to high

@Viper007Bond
16 years ago

Bug fix of DD32's patch for when newest page is showed by default

#11 @markjaquith
16 years ago

(In [9318]) Enable pretty permalinks for previous_ and next_comments_link(). props DD32, Viper007Bond. see #7942

@DD32
16 years ago

redirect post-name/comment-page-xx/ => post-name/ when paging disabled

#12 @markjaquith
16 years ago

(In [9322]) Redirect away from paged comments permalinks when comment paging has been turned off. props DD32. see #7942

#13 @ryan
16 years ago

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