From 20b4b7166f851221eef4c845d396af2efd581822 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 6 Dec 2001 17:33:05 +0000 Subject: - book.module: + Added (1) support for "PHP pages" (dynamic pages), and (2) made it possible to link other node types into the book's tree/outline. It works just fine, yet the only (obvious) downside of (2) is that the navigation tree/links gets "interrupted" when you view non-book pages in the book. [SQL update required, see update.php] + Tidied up the book table. [SQL update required, see update.php] - various updates: + Fine-tuned the new node system. + Updated the inline/code documentation. + Improved teaser handling of all node types. + Made several small usability improvements to the node admin pages. --- modules/blog/blog.module | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'modules/blog/blog.module') diff --git a/modules/blog/blog.module b/modules/blog/blog.module index f8cdb7922..7e7662a4f 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -227,7 +227,6 @@ function blog_page_last() { function blog_form(&$node, &$help, &$error) { global $nid, $iid; - if (isset($node->body)) { /* @@ -260,6 +259,10 @@ function blog_form(&$node, &$help, &$error) { } } + if ($node->teaser) { + $output .= form_textarea(t("Teaser"), "teaser", $node->teaser, 60, 5, $error["teaser"]); + } + $output = form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", ""))); return $output; @@ -311,7 +314,12 @@ function blog_link($type, $node = 0) { } if ($type == "node" && $node->type == "blog") { - $links[] = "uid\">". strtr(t("%a's blog"), array("%a" => $node->name)) .""; + if (blog_access("update", $node)) { + $links[] = "nid\">". t("update this blog") .""; + } + else { + $links[] = "uid\">". strtr(t("%a's blog"), array("%a" => $node->name)) .""; + } } return $links ? $links : array(); -- cgit v1.2.3