Most other forums have the posibility to jump to the last comment instead to the first post (node).
I´m asked from a lot of user if I can change this in the forum.
Possible?

CommentFileSizeAuthor
#3 last_comment.jpg24.42 KBWolfgang62
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Seldell’s picture

If you look in theme.inc, you have a function which is used on post's page template in order to create the link to the last post in a button.

<?php
if ($posts > 1) {
    $variables['first_new_post_link'] = advanced_forum_first_new_post_link($variables['node'], $variables['comment_count']);
  }

  // Link to last post in topic.
  $variables['last_post_link'] = advanced_forum_last_post_link($node);
?>

I guess that advanced_forum_last_post_link is good :)

Cheers !

Wolfgang62’s picture

How can I setup views to make this link possible?
I can´t find an argument to set it up.

Wolfgang62’s picture

FileSize
24.42 KB

I would like to see something like in the attached file.

Russell Mann’s picture

Any news on *how* to do this?

Russell Mann’s picture

I may have a way....

By starting with a View on Comments, you can get the last comment link. Then you can associate back up to the forums. Working backwards. Haven't finished it yet, but it looks promising.

wfragakis’s picture

Just sorted it out. Not that bad really and odd not a default but oh well.

Edit Advanced Forum topic list (Content) Master view
Add relationship: Comment: Last Comment
Add field Comment ID with relationship to Last Comment

This gets you 80% of the way there, the rest is formatting. I was in a rush so I did the following (I'll probably do a nice icon later)

Place (Last Comment) Comment: ID prior to Content: Comment Author, exclude display and rewrite result as link node/[nid]#comment-[cid] and rewrite field output to something human readable such as Last post, etc so the link doesn't just read the comment id

Edit Content: Comment Author to rewrite [cid] by [last_comment_name] or whatever you prefer
The reason for doing it this way is that the forum format has a line break as the spacer and the comment link will appear on a new line otherwise.

Finally, go to Format Settings and set the (Last Comment) Comment: ID heading as Last Post.