diff options
Diffstat (limited to 'modules/blog')
-rw-r--r-- | modules/blog/blog.module | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 773e42283..9de75b81c 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -121,15 +121,14 @@ function blog_feed_last() { node_feed($result, $channel); } -function blog_page_user($uid = 0) { - global $user; +function blog_page_user($uid) { + $account = user_load(array((is_numeric($uid) ? "uid" : "name") => $uid, "status" => 1)); - if ($uid) { - $account = user_load(array((is_numeric($uid) ? "uid" : "name") => $uid, "status" => 1)); - } - else { - $account = $user; - } + // 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"); + 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)); while ($node = db_fetch_object($result)) { @@ -226,6 +225,18 @@ function blog_page() { } +function blog_view($node, $main = 0) { + if ($main == 0) { + // Breadcrumb navigation: + $trail[] = l(t("Home"), NULL); + $trail[] = l(t("%name's blog", array("%name" => $node->name)), "blog/$node->uid"); + + theme("path", $trail, $trail); + } + + theme("node", $node, $main); +} + function blog_link($type, $node = 0, $main) { global $user; |