From 904a6172b08ab0900f34a1b8cfd22452920d2f61 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 13 Oct 2002 15:05:35 +0000 Subject: - Made some usability improvements. Needs more work but I had my take for today ... --- modules/forum/forum.module | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'modules/forum/forum.module') diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 633bbf56d..43faa4772 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -96,9 +96,9 @@ function forum_block() { $content .= "

".lm(t("browse forums"), array("mod" => "forum"))."

"; } } - $blocks[0][subject] = t("Forum active topics"); + $blocks[0][subject] = t("Most active forum topics"); $blocks[0][content] = $content; - $blocks[0][info] = t("Forum active topics"); + $blocks[0][info] = t("Most active forum topics"); return $blocks; } @@ -293,7 +293,7 @@ function _forum_last_reply($nid) { function _forum_format($topic) { if ($topic) { - return format_date($topic->timestamp, "small")."
".t("by")." ". format_name($topic); + return "". format_date($topic->timestamp, "small")."
".t("by")." ". format_name($topic) ."
"; } else { return message_na(); @@ -527,9 +527,9 @@ function forum_forum_list($forums, $parents, $tid) { } } } - $t[] = lm(t("forum"), array("mod" => "forum")); + $t[] = lm(t("Discussion forum"), array("mod" => "forum")); - $output .= "\n"; + $output .= "
\n"; $output .= " "; if ($forums) { $output .= ""; @@ -537,26 +537,26 @@ function forum_forum_list($forums, $parents, $tid) { foreach ($forums as $forum) { if ($forum->container) { - $output .= " "; + $output .= " "; } else { if ($user->uid) $new_topics = $forum->num_topics - $forum->old_topics; $icon = _forum_get_folder_icon($new_topics); $output .= " "; - $output .= ""; $output .= ""; } } @@ -598,10 +598,10 @@ function forum_topic_browser() { function forum_topic_list($topics, $num_topics, $sortby, $forum_per_page, $offset) { global $theme, $id, $status, $tid, $user; - $output .= "
(".t("%a topics, %b topics per page, page %c of %d", array("%a" => $num_topics, "%b" => $forum_per_page, "%c" => ceil(($offset + 1)/$forum_per_page), "%d" => ceil($num_topics/$forum_per_page))).")
"; + $output .= "
" .t("%a topics, %b topics per page, page %c of %d", array("%a" => $num_topics, "%b" => $forum_per_page, "%c" => ceil(($offset + 1)/$forum_per_page), "%d" => ceil($num_topics/$forum_per_page))) ."
"; if ($topics) { - $output .= "
".implode(" : ", array_reverse($t)) ."". t("topics") ."". t("posts") ."". t("last post") ."
".lm(check_output($forum->name), array("mod" => "forum", "tid" => $forum->tid))."
". ($forum->description ? check_output($forum->description, 1) : "") ."
".lm(check_output($forum->name), array("mod" => "forum", "tid" => $forum->tid))."
". ($forum->description ? check_output($forum->description, 1) : "") ."
 $icon"; + $output .= "
depth*20)."\"> ".lm(check_output($forum->name), array("mod" => "forum", "tid" => $forum->tid))."
". check_output($forum->description, 1); + $output .= "
depth * 20) ."\"> ".lm(check_output($forum->name), array("mod" => "forum", "tid" => $forum->tid))."
". check_output($forum->description, 1); $links = array(); if ($forum->last_post) { - $links[] = l(t("last topic"), array("nid" => $forum->last_post->nid)); + $links[] = l(t("the most recent topic"), array("nid" => $forum->last_post->nid)); } if ($new_topics) { - $links[] = lm(t("first new topic"), array("mod" => "forum", "op" => "first_new", "tid" => $forum->tid)); + $links[] = lm(t("the first new topic"), array("mod" => "forum", "op" => "first_new", "tid" => $forum->tid)); } if ($links) { - $output .= "
(".implode(", ", $links).")"; + $output .= "
Jump to: ".implode(", ", $links); } - $output .= "
".$forum->num_topics.($new_topics ? "
(".t("%a new", array("%a" => $new_topics)).")" : "")."
".$forum->num_posts.""._forum_format($forum->last_post)."
\n"; + $output .= "
\n"; $output .= " "; foreach ($topics as $topic) { @@ -611,8 +611,8 @@ function forum_topic_list($topics, $num_topics, $sortby, $forum_per_page, $offse - - + + "; } else { @@ -620,8 +620,8 @@ function forum_topic_list($topics, $num_topics, $sortby, $forum_per_page, $offse - - + + "; @@ -630,22 +630,22 @@ function forum_topic_list($topics, $num_topics, $sortby, $forum_per_page, $offse $output .= "
  ". t("topic") ."". t("replies") ."". t("posted") ."". t("last reply") ."
"._forum_get_folder_icon($topic->new, $topic->num_comments, $topic->comment_mode)." "._forum_get_icon($topic)."". check_output($topic->title) ."".lm(t("This topic has been moved"), array("mod" => "forum", "tid" => $topic->shadow))."". check_output($topic->title) ."".lm(t("This topic has been moved"), array("mod" => "forum", "tid" => $topic->shadow))."
"._forum_get_folder_icon($topic->new, $topic->num_comments, $topic->comment_mode)." "._forum_get_icon($topic)."".l(check_output($topic->title), array("id" => $topic->nid))."".$topic->num_comments.($topic->new_replies ? " (".t("%a new", array("%a" => $topic->new_replies)).")" : "")."".l(check_output($topic->title), array("id" => $topic->nid))."".$topic->num_comments.($topic->new_replies ? " (".t("%a new", array("%a" => $topic->new_replies)).")" : "")." "._forum_format($topic)." "._forum_format($topic->last_reply)."
\n"; } - + $output .= "
"; $output .= ""; if ($offset > 0) { - $output .= ""; + $output .= ""; } else { $output .= ""; } if (user_access("post content")) { - $output .= ""; + $output .= ""; } if (count($topics) >= $forum_per_page) { - $output .= ""; + $output .= ""; } else { $output .= ""; -- cgit v1.2.3

".lm(t("Previous topics"), array("mod" => "forum", "tid" => $tid, "offset" => ($offset-$forum_per_page)))."

". lm(t("previous topics"), array("mod" => "forum", "tid" => $tid, "offset" => ($offset-$forum_per_page))) ."
 

".lm(t("Start new topic"), array("mod" => "node", "op" => "add", "type" => "forum", "tid" => $tid))."

". lm(t("start new topic"), array("mod" => "node", "op" => "add", "type" => "forum", "tid" => $tid)) ."

".lm(t("Next topics"), array("mod" => "forum", "tid" => $tid, "offset" => ($offset+$forum_per_page)))."

". lm(t("next topics"), array("mod" => "forum", "tid" => $tid, "offset" => ($offset+$forum_per_page))) ."