You are here

function advanced_forum_last_post_link in Advanced Forum 5

Same name and namespace in other branches
  1. 6.2 advanced_forum.module \advanced_forum_last_post_link()
  2. 6 advanced_forum.module \advanced_forum_last_post_link()
  3. 7.2 advanced_forum.module \advanced_forum_last_post_link()
1 call to advanced_forum_last_post_link()
advanced_forum_preprocess_advanced_forum_topic_header in ./advanced_forum.module
Preprocesses template variables for the topic header template.

File

./advanced_forum.module, line 1416
Enables the look and feel of other popular forum software.

Code

function advanced_forum_last_post_link($node) {
  $last_comment_id = advanced_forum_last_post_in_topic($node->nid);
  $last_page = advanced_forum_get_last_page($node);
  $query = $last_page > 0 ? "page={$last_page}" : NULL;
  return l(t('Last post'), "node/{$node->nid}", NULL, $query, "comment-{$last_comment_id}");
}