From fdc379bbf95b5a9c68e328ada26ef07f630e0d7d Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 13 Sep 2003 11:06:29 +0000 Subject: - Some breadcrumb refinements by Nick. --- modules/blog/blog.module | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'modules/blog/blog.module') diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 9de75b81c..dcae01074 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -127,7 +127,7 @@ function blog_page_user($uid) { // Breadcrumb navigation: $trail[] = l(t("Home"), NULL); $trail[] = l(t("Blogs"), "blog"); - $trail[] = l(t("%name's blog", array("%name" => $account->name)), "blog/$account->uid"); + $trail[] = t("%name's blog", array("%name" => $account->name)); theme("path", $trail, $trail); $result = pager_query("SELECT nid FROM {node} WHERE type = 'blog' AND uid = '$account->uid' AND status = 1 ORDER BY nid DESC", variable_get("default_nodes_main", 10)); @@ -141,14 +141,18 @@ function blog_page_user($uid) { function blog_page_last() { global $user; + // Breadcrumb navigation: + $trail[] = l(t("Home"), NULL); + $trail[] = t("Blogs"); + theme("path", $trail, $trail); + $result = pager_query("SELECT nid FROM {node} WHERE type = 'blog' AND status = 1 ORDER BY nid DESC", variable_get("default_nodes_main", 10)); while ($node = db_fetch_object($result)) { - $output = node_view(node_load(array("nid" => $node->nid)), 1); + node_view(node_load(array("nid" => $node->nid)), 1); } - $output .= pager_display(NULL, variable_get("default_nodes_main", 10)); - $output .= "
". l("\"\"", "blog/feed", array("title" => t("Read the XML version of all blogs."))) ."
"; - return $output; + print pager_display(NULL, variable_get("default_nodes_main", 10)); + print "
". l("\"\"", "blog/feed", array("title" => t("Read the XML version of all blogs."))) ."
"; } function blog_form(&$node, &$help, &$error) { @@ -212,7 +216,7 @@ function blog_page() { blog_page_user(arg(1)); } else { - print blog_page_last(); + blog_page_last(); } theme("footer"); } -- cgit v1.2.3