summaryrefslogtreecommitdiff
path: root/modules/blog
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-09-20 15:11:41 +0000
committerDries Buytaert <dries@buytaert.net>2003-09-20 15:11:41 +0000
commit00a62647bc7af43e15de61cd47801b475be4bd9c (patch)
tree901f13ba6ece9db0f7301e9e90c7ea08b71077fb /modules/blog
parent2fbc7fcf27b34445b7d0714f22a6e3e7f52d2389 (diff)
downloadbrdo-00a62647bc7af43e15de61cd47801b475be4bd9c.tar.gz
brdo-00a62647bc7af43e15de61cd47801b475be4bd9c.tar.bz2
- Committed Nick's _content improvements.
Diffstat (limited to 'modules/blog')
-rw-r--r--modules/blog/blog.module37
1 files changed, 22 insertions, 15 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index b3fb6ca8e..852d1c58e 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -125,10 +125,10 @@ function blog_page_user($uid) {
$account = user_load(array((is_numeric($uid) ? "uid" : "name") => $uid, "status" => 1));
// Breadcrumb navigation:
- $trail[] = l(t("Home"), NULL);
- $trail[] = l(t("Blogs"), "blog");
- $trail[] = t("%name's blog", array("%name" => $account->name));
- theme("breadcrumb", $trail);
+ $breadcrumb[] = l(t("Home"), NULL);
+ $breadcrumb[] = l(t("Blogs"), "blog");
+ $breadcrumb[] = t("%name's blog", array("%name" => $account->name));
+ theme("breadcrumb", $breadcrumb);
$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)) {
@@ -142,9 +142,9 @@ function blog_page_last() {
global $user;
// Breadcrumb navigation:
- $trail[] = l(t("Home"), NULL);
- $trail[] = t("Blogs");
- theme("breadcrumb", $trail);
+ $breadcrumb[] = l(t("Home"), NULL);
+ $breadcrumb[] = t("Blogs");
+ theme("breadcrumb", $breadcrumb);
$result = pager_query("SELECT nid FROM {node} WHERE type = 'blog' AND status = 1 ORDER BY nid DESC", variable_get("default_nodes_main", 10));
@@ -229,19 +229,26 @@ function blog_page() {
}
-function blog_view($node, $main = 0) {
- if ($main == 0) {
- // Breadcrumb navigation:
- $node->trail[] = l(t("Home"), NULL);
- $node->trail[] = l(t("%name's blog", array("%name" => $node->name)), "blog/$node->uid");
- }
-
+function blog_content($node) {
$node->teaser = check_output($node->teaser);
$node->body = check_output($node->body);
-
return $node;
}
+function blog_view($node, $main = 0) {
+ if ($main == 0) {
+ // Breadcrumb navigation
+ $breadcrumb[] = l(t("Home"), NULL);
+ $breadcrumb[] = l(t("%name's blog", array("%name" => $node->name)), "blog/$node->uid");
+ // print the breadcrumb
+ theme("breadcrumb",$breadcrumb);
+ }
+ // prepair the node content
+ $node = blog_content($node);
+ // print the node
+ theme("node", $node, $main);
+}
+
function blog_link($type, $node = 0, $main) {
global $user;