diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-01-28 22:10:34 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-01-28 22:10:34 +0000 |
commit | b1fe1c941eeadd471c06babc02dd0d59160578a0 (patch) | |
tree | 201c83c4b1e18ec013280f9fd04c5ed6f8ba3caf /modules/forum | |
parent | 842e223b9b6a27f492c1ac0d5f89854910ebb17c (diff) | |
download | brdo-b1fe1c941eeadd471c06babc02dd0d59160578a0.tar.gz brdo-b1fe1c941eeadd471c06babc02dd0d59160578a0.tar.bz2 |
- Replaced the 'active post' and 'recent post' by better integrated and
easier to understand 'new' links. The 'new' links are clickable both
at the forum overview (to get to the new forum topics) and at the topic
overview (to get to the new comments).
Diffstat (limited to 'modules/forum')
-rw-r--r-- | modules/forum/forum.module | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 4dcbaa061..340535775 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -554,14 +554,6 @@ function theme_forum_list($forums, $parents, $tid) { $links = array(); - if ($new_topics) { - $links[] = l(t("newest topic"), "forum/$forum->tid/new"); - } - - if ($forum->last_post) { - $links[] = l(t("active topic"), "node/view/". $forum->last_post->nid); - } - $description = "<div style=\"margin-left: ". ($forum->depth * 30) ."px;\">\n"; $description .= " <div class=\"name\">". l($forum->name, "forum/$forum->tid") ."</div>\n"; @@ -575,7 +567,7 @@ function theme_forum_list($forums, $parents, $tid) { $rows[] = array( array("data" => $description, "class" => "forum"), - array("data" => $forum->num_topics . ($new_topics ? "<br />(". t("%a new", array("%a" => $new_topics)) .")" : ""), "class" => "topics"), + array("data" => $forum->num_topics . ($new_topics ? "<br />(". l(t("%a new", array("%a" => $new_topics)), "forum/$forum->tid", NULL, NULL, 'new') .")" : ""), "class" => "topics"), array("data" => $forum->num_posts, "class" => "posts"), array("data" => _forum_format($forum->last_post), "class" => "last-reply")); } @@ -614,7 +606,7 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset $rows[] = array( array("data" => _forum_icon($topic->new, $topic->num_comments, $topic->comment_mode), "class" => "icon"), array("data" => l($topic->title, "node/view/$topic->nid"), "class" => "topic"), - array("data" => $topic->num_comments . ($topic->new_replies ? "<br />(". t("%a new", array("%a" => $topic->new_replies)) .")" : ""), "class" => "replies"), + array("data" => $topic->num_comments . ($topic->new_replies ? "<br />(". l(t("%a new", array("%a" => $topic->new_replies)), "node/view/$topic->nid", NULL, NULL, 'new') .")" : ""), "class" => "replies"), array("data" => _forum_format($topic), "class" => "created"), array("data" => _forum_format($topic->last_reply), "class" => "last-reply") ); @@ -656,11 +648,17 @@ function _forum_icon($new_posts, $num_posts = 0, $comment_mode = 0) { // default $file = $base_path ."/forum-$icon.gif"; - return "<img src=\"$file\" alt=\"\" title=\"\" />"; + $output = "<img src=\"$file\" alt=\"\" title=\"\" />"; } else { - return " "; + $output = " "; } + + if ($new_posts) { + $output = "<a name=\"new\">$output</a>"; + } + + return $output; } function _forum_user_last_visit($nid) { |