diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-08-23 10:11:10 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-08-23 10:11:10 +0000 |
commit | c485b545550faa036e1c35b2296c39d85b8cfca9 (patch) | |
tree | 914be9ff79eed714c49a1eea92d75a1259b270a9 /modules | |
parent | 60ce4e054efdc1a311b83032c7daec1f3a6a42ea (diff) | |
download | brdo-c485b545550faa036e1c35b2296c39d85b8cfca9.tar.gz brdo-c485b545550faa036e1c35b2296c39d85b8cfca9.tar.bz2 |
- Fixed a number of small user experience inconsistencies pointed out by
Keith.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/book.module | 2 | ||||
-rw-r--r-- | modules/book/book.module | 2 | ||||
-rw-r--r-- | modules/comment.module | 8 | ||||
-rw-r--r-- | modules/comment/comment.module | 8 | ||||
-rw-r--r-- | modules/forum.module | 29 | ||||
-rw-r--r-- | modules/forum/forum.module | 29 |
6 files changed, 42 insertions, 36 deletions
diff --git a/modules/book.module b/modules/book.module index 85f70c7f6..a0f52f5e1 100644 --- a/modules/book.module +++ b/modules/book.module @@ -412,7 +412,7 @@ function book_view($node, $main = 0) { // build the tree from bottom to top to have the book index in $level for navigation later $path = book_location($node); $trail[] = l(t("Home"), ""); - $trail[] = l(t("books"), "book"); + $trail[] = l(t("Books"), "book"); foreach ($path as $level) { $trail[] = l($level->title, "node/view/$level->nid"); } diff --git a/modules/book/book.module b/modules/book/book.module index 85f70c7f6..a0f52f5e1 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -412,7 +412,7 @@ function book_view($node, $main = 0) { // build the tree from bottom to top to have the book index in $level for navigation later $path = book_location($node); $trail[] = l(t("Home"), ""); - $trail[] = l(t("books"), "book"); + $trail[] = l(t("Books"), "book"); foreach ($path as $level) { $trail[] = l($level->title, "node/view/$level->nid"); } diff --git a/modules/comment.module b/modules/comment.module index 3bff35e22..99ecb50d7 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -685,7 +685,7 @@ function comment_render($node, $cid = 0) { if ((variable_get("comment_controls", 0) == 0) || (variable_get("comment_controls", 0) == 2)) { print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n"; - theme("box", "", theme("comment_controls", $threshold, $mode, $order, $comments_per_page)); + theme("comment_controls", $threshold, $mode, $order, $comments_per_page); print form_hidden("nid", $nid); print "</div></form>"; } @@ -726,7 +726,7 @@ function comment_render($node, $cid = 0) { if ((variable_get("comment_controls", 0) == 1) || (variable_get("comment_controls", 0) == 2)) { print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n"; - theme("box", "", theme("comment_controls", $threshold, $mode, $order, $comments_per_page)); + theme("comment_controls", $threshold, $mode, $order, $comments_per_page); print form_hidden("nid", $nid); print "</div></form>"; } @@ -1268,10 +1268,10 @@ function comment_controls($threshold = 1, $mode = 3, $order = 1, $comments_per_p $output .= " ". form_submit(t("Save settings")); - $output = form_item(t("Comment viewing options"), $output, t("Select your preferred way to display the comments and click 'Save settings' to activate your changes.")); + $output = form_item(NULL, $output, t("Select your preferred way to display the comments and click 'Save settings' to activate your changes.")); } - return $output; + return theme("box", t("Comment viewing options"), $output); } function comment_moderation_form($comment) { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 3bff35e22..99ecb50d7 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -685,7 +685,7 @@ function comment_render($node, $cid = 0) { if ((variable_get("comment_controls", 0) == 0) || (variable_get("comment_controls", 0) == 2)) { print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n"; - theme("box", "", theme("comment_controls", $threshold, $mode, $order, $comments_per_page)); + theme("comment_controls", $threshold, $mode, $order, $comments_per_page); print form_hidden("nid", $nid); print "</div></form>"; } @@ -726,7 +726,7 @@ function comment_render($node, $cid = 0) { if ((variable_get("comment_controls", 0) == 1) || (variable_get("comment_controls", 0) == 2)) { print "<form method=\"post\" action=\"". url("comment") ."\"><div>\n"; - theme("box", "", theme("comment_controls", $threshold, $mode, $order, $comments_per_page)); + theme("comment_controls", $threshold, $mode, $order, $comments_per_page); print form_hidden("nid", $nid); print "</div></form>"; } @@ -1268,10 +1268,10 @@ function comment_controls($threshold = 1, $mode = 3, $order = 1, $comments_per_p $output .= " ". form_submit(t("Save settings")); - $output = form_item(t("Comment viewing options"), $output, t("Select your preferred way to display the comments and click 'Save settings' to activate your changes.")); + $output = form_item(NULL, $output, t("Select your preferred way to display the comments and click 'Save settings' to activate your changes.")); } - return $output; + return theme("box", t("Comment viewing options"), $output); } function comment_moderation_form($comment) { diff --git a/modules/forum.module b/modules/forum.module index a1220f8e2..35f4b8e2b 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -145,15 +145,19 @@ function forum_link($type, $node = 0, $main = 0) { function forum_view($node, $main = 0) { - $term_data = array_shift(taxonomy_node_get_terms($node->nid)); - if (!$term_data) { - // we are previewing - $term_data = taxonomy_get_term($node->taxonomy[0]); - } - $voc = taxonomy_get_vocabulary($term_data->vid); + if ($main == 0) { + $term_data = array_shift(taxonomy_node_get_terms($node->nid)); + if (!$term_data) { + // we are previewing + $term_data = taxonomy_get_term($node->taxonomy[0]); + } + $voc = taxonomy_get_vocabulary($term_data->vid); + + $trail[] = l(t("Home"), NULL); + $trail[] = l(t("Forums"), "forum"); + $trail[] = l($term_data->name, "forum/$term_data->tid"); - if (!$main) { - $node->title = l($voc->name, "forum") ." » ". l($term_data->name, "forum/$term_data->tid") ." » $node->title"; + print "<div class=\"path\">". implode($trail, " » ") ."</div>"; } $node->teaser = check_output($node->teaser); @@ -462,7 +466,7 @@ function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_p */ $trail[] = l(t("Home"), ""); - $trail[] = l(t("forums"), "forum"); + $trail[] = l(t("Forums"), "forum"); if ($parents) { $parents = array_reverse($parents); @@ -471,14 +475,12 @@ function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_p $title = $p->name; } else { - $trail[] = l(strtolower($p->name), "forum/$p->tid"); + $trail[] = l($p->name, "forum/$p->tid"); } } } $output = "<div id=\"forum\">"; - $output .= "<div class=\"path\">". implode($trail, " » ") ."</div>"; - $output .= "<div class=\"title\">$title</div>"; $output .= theme("forum_theme_list", $forums, $parents, $tid); if ($tid) { @@ -488,7 +490,8 @@ function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_p $output .= "</div>"; theme("header"); - theme("box", NULL, $output); + print "<div class=\"path\">". implode($trail, " » ") ."</div>"; + theme("box", $title, $output); theme("footer"); } diff --git a/modules/forum/forum.module b/modules/forum/forum.module index a1220f8e2..35f4b8e2b 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -145,15 +145,19 @@ function forum_link($type, $node = 0, $main = 0) { function forum_view($node, $main = 0) { - $term_data = array_shift(taxonomy_node_get_terms($node->nid)); - if (!$term_data) { - // we are previewing - $term_data = taxonomy_get_term($node->taxonomy[0]); - } - $voc = taxonomy_get_vocabulary($term_data->vid); + if ($main == 0) { + $term_data = array_shift(taxonomy_node_get_terms($node->nid)); + if (!$term_data) { + // we are previewing + $term_data = taxonomy_get_term($node->taxonomy[0]); + } + $voc = taxonomy_get_vocabulary($term_data->vid); + + $trail[] = l(t("Home"), NULL); + $trail[] = l(t("Forums"), "forum"); + $trail[] = l($term_data->name, "forum/$term_data->tid"); - if (!$main) { - $node->title = l($voc->name, "forum") ." » ". l($term_data->name, "forum/$term_data->tid") ." » $node->title"; + print "<div class=\"path\">". implode($trail, " » ") ."</div>"; } $node->teaser = check_output($node->teaser); @@ -462,7 +466,7 @@ function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_p */ $trail[] = l(t("Home"), ""); - $trail[] = l(t("forums"), "forum"); + $trail[] = l(t("Forums"), "forum"); if ($parents) { $parents = array_reverse($parents); @@ -471,14 +475,12 @@ function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_p $title = $p->name; } else { - $trail[] = l(strtolower($p->name), "forum/$p->tid"); + $trail[] = l($p->name, "forum/$p->tid"); } } } $output = "<div id=\"forum\">"; - $output .= "<div class=\"path\">". implode($trail, " » ") ."</div>"; - $output .= "<div class=\"title\">$title</div>"; $output .= theme("forum_theme_list", $forums, $parents, $tid); if ($tid) { @@ -488,7 +490,8 @@ function forum_theme_display($forums, $topics, $parents, $tid, $sortby, $forum_p $output .= "</div>"; theme("header"); - theme("box", NULL, $output); + print "<div class=\"path\">". implode($trail, " » ") ."</div>"; + theme("box", $title, $output); theme("footer"); } |