Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently on the forums listing page, in the Last post column, it displays time ago and username, but it would be lots handy for the user to see the linked title.
Something like this(node title is trimmed):
This is node title...
2 hours ago
by Admin
Couldn't prepare a working patch; http://drupal.org/node/144292 needs to gets in.
Comment | File | Size | Author |
---|---|---|---|
#39 | d7-forum-last-post.patch | 4.25 KB | Gurpartap Singh |
#38 | forum.module.rej_.txt | 2.54 KB | NaheemSays |
#32 | d7-forum-last-post.patch | 5.42 KB | Gurpartap Singh |
#30 | phpbb_forum_last_thread.jpg | 2.51 KB | psicomante |
#27 | template.patch | 634 bytes | zeta ζ |
Comments
Comment #1
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedThis is a usability feature, users usually see last update in a forum, but Drupal's forum provides no link to the latest post, making the user go into the forum and look at them. Most of the time it's just easier for the user to directly goto the latest post in any forum.
Patch is simple, but can be improved?
Comment #2
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedHere's a screen shot.
Comment #3
ChrisKennedy CreditAttribution: ChrisKennedy commentedThis is a tricky situation, as it falls into the same problems as #new links don't work across multiple pages. We probably don't want to propagate that bug into a second interface area.
Comment #4
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedComment #5
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedWell, currently we are not linking to latest comment, but the node with latest comment. Btw, already working on that thing.
Comment #6
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedOk this has the requested feature. Please review that part, if it looks good, maybe it can be put into comment.module as a function(which returns an array -- the third argument for
l()
) and use wherever necessary.Comment #7
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedPage thing needs work.
Comment #8
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedIt seems way to complex requiring lots of code, which should probably be going into comment.module at this issue http://drupal.org/node/6162
So untill that is fixed, we can have link to the node itself, at least.
Comment #9
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedRe-roll. It's a little bit of code to review..
Comment #10
webchickThis looks like a great usability improvement!
But IMO this code is kind of weird....
What you're doing is passing in display parameters (and hard-coding HTML) in an API function. What I would recommend doing instead is changing this to a theme function, with core only providing the "show_title" way, and if people want to override that, they can do so in their themes.
Also, +1 to linking to #new. I know #new has problems on pagers, but when that bug finally gets sorted out, we can just fix it in both places, imo. Linking to the node without jumping to the new comment on the 90%+ forum posts that *don't* have multiple pages is a usability detriment, because people might not realize there are new replies unless they're observing closely.
Comment #11
webchickAlso, why
n.title AS node_title
? title is fine. It's more consistent with how this is called elsewhere, and $thread->title is descriptive enough.Comment #12
Gurpartap Singh CreditAttribution: Gurpartap Singh commented_forum_format() is a helper function for theme functions in the module. And we want to display titles only on forum's listing. Not on node listing inside a particular forum. So that function is called for both of those listings, and we are setting the argument to send title to true only in one of them(i.e. forum listing page say ?q=forum).
Other than theme function, is there any other suggested/alternate way?
Comment #13
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedBump
Comment #14
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedRe-roll.
Comment #15
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedThis time for new forum template files.
Comment #16
merlinofchaos CreditAttribution: merlinofchaos commentedI think this needs another reroll.
Comment #17
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedRe-roll.
Comment #18
catchSo 6162 is fixed, which surely means a re-roll here.
What's the chances of this making it in as a usability improvement in D6? I guess slim, but won't up to 7.x just yet.
Comment #19
catchComment #20
webchickI don't see any reason to bump to 7.x. This breaks no APIs, and it a usability enhancement.
Comment #21
denney CreditAttribution: denney commentedCan anyone provide a simple patch for the latest 5.x version?
Comment #22
denney CreditAttribution: denney commentedNevermind, patched it myself.
Comment #23
PanchoMoving feature requests to the D7 queue.
Comment #24
Liam McDermott CreditAttribution: Liam McDermott commentedMarking #9844: Display name of active thread in forum overview as duplicate of this.
Comment #25
SamRose CreditAttribution: SamRose commented@denny (or anyone, really) how exactly were you able to apply this patch to 5.x? 5.x seems to be rejecting everything for me when I try to apply?
Comment #26
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedIs this approach worth committing? If there's any other, please point direct way to implement :)
Comment #27
zeta ζ CreditAttribution: zeta ζ commentedThis is my modification of the patched template file;- a little less? complex, and easier to theme.
Comment #28
catchThis still doesn't deal with the pagin issue (per node/6162). - also this is now in advanced_forum (although there's performance issues with the current implementation) http://drupal.org/node/268273
Comment #29
catchComment #30
psicomante CreditAttribution: psicomante commentedWhat do you think of phpbb style?
Comment #31
Michellere: #28: The performance issues have now been taken care of. Still might be worth getting this into core, though, as I override a big chunk of core to get it working.
Michelle
Comment #32
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedNow addressing #6162: #new links don't work on paged threads
Comment #33
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedComment #34
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedComment #36
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedHm, patch applies fine, and passes all tests.
Comment #37
catchGurpartap - did you cvs up?
Comment #38
NaheemSays CreditAttribution: NaheemSays commentedWhen trying to apply, hunk 2 failed to apply. attached is the reject file.
Comment #39
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedyo update
Comment #40
NaheemSays CreditAttribution: NaheemSays commentedtested and it all works, however it is confusing as it does not link to the latest post - just the node with the latest comment. Is this the desired behaviour?
I would have thought it best to jump to the last comment of the node? (maybe the performance cost is too high?)
Comment #41
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedComment #42
catchInstead of comment_num_new() could do SELECT MAX(cid) then link to the comment/$cid#comment-$cid URLs, shouldn't be any different in terms of performance.
Comment #43
jhodgdonThis patch should not use truncate_utf8(), especially not with the word-splitting set to TRUE. This will not work for CJK languages. See
http://drupal.org/node/269911#comment-2795478
and #200185: truncate_utf8() is used as a substring function
Comment #44
jhodgdonRelated issue on truncate_utf8():
#768040: truncate_utf8() only works for latin languages (and drupal_substr has a bug)
Comment #45
jhodgdonThe comments in #43 are wrong now -- truncate_utf8() is being fixed up so it can be used for any character set in #768040: truncate_utf8() only works for latin languages (and drupal_substr has a bug).
Comment #46
Oleksa-1 CreditAttribution: Oleksa-1 commentedit is easy way to implement it in phpbb style
Comment #47
luck777 CreditAttribution: luck777 commentedthis patch is not working on latest drupal 7 build. blank page error at topic-list view.
fix please.
Comment #48
luck777 CreditAttribution: luck777 commented#39: d7-forum-last-post.patch queued for re-testing.
Comment #50
crosshairs CreditAttribution: crosshairs commentedHi, any updates on the useability of this patch? Seems to be a much requested feature