When you have a lot of comments and some subset are new, it can be a pain to look through and read only the new comments. This patch adds previous/next links next to each "new" notice for the comments using jQuery. I think it will be especially handy for big threads on drupal.org.
I stole this idea from the Texas Legislature's online bill viewer (see, e.g. this bill on redistricting as an example).
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | new.png | 10.05 KB | RobRoy |
| #3 | comment_new_links_0.patch | 2.39 KB | ChrisKennedy |
| comment_new_links.patch | 2.4 KB | ChrisKennedy |
Comments
Comment #1
ChrisKennedy commentedBtw, this patch is currently against d5 until comment.module is working again in HEAD.
Comment #2
ChrisKennedy commentedI probably need to re-implement this to use html anchors rather than javascript, which will be easy.
Comment #3
ChrisKennedy commentedWell, after looking into it for quite a while, it appears that implementing this in HTML would quite a fairly large refactoring of how the "new" link is eventually output and themed in Drupal. Keeping it as a js-only, gracefully degrading feature seems to be the best option.
Re-rolled patch against HEAD.
Comment #4
RobRoy commentedApplies cleanly and works as intended but the UI and styling is a little funky. See screenshot.
Good stuff man!
Comment #5
catchDon't think this will get into D6, and no longer applies.
Ideally it'd be good to have a solution both for this and: http://drupal.org/node/6371 - where the #new anchors disappear on multi-paged threads if just one page is viewed.
Comment #6
David_Rothstein commentedHm, I just came across this... it appears there's a semi-duplicate issue at http://drupal.org/node/205515, which now has a working patch that implements the "next new comment" links entirely via HTML (no javascript).
I'm not marking this as a duplicate just yet (especially since it's older), but since this patch is now a year old and people seem to generally agree that the HTML approach is preferable to javascript in this case, it might be good to concentrate efforts over at the other issue.
Comment #7
ChrisKennedy commentedNah it's a duplicate, and HTML is definitely preferable. I was just too lazy to re-implement.