diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-12-06 17:33:05 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-12-06 17:33:05 +0000 |
commit | 20b4b7166f851221eef4c845d396af2efd581822 (patch) | |
tree | d922952bac8cdacae68139b8ffa9008fe19b3174 /modules/blog/blog.module | |
parent | 2b01b838c802226ad8f097aa5b7f4512de73d8e7 (diff) | |
download | brdo-20b4b7166f851221eef4c845d396af2efd581822.tar.gz brdo-20b4b7166f851221eef4c845d396af2efd581822.tar.bz2 |
- 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.
Diffstat (limited to 'modules/blog/blog.module')
-rw-r--r-- | modules/blog/blog.module | 12 |
1 files changed, 10 insertions, 2 deletions
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[] = "<a href=\"module.php?mod=blog&op=view&id=$node->uid\">". strtr(t("%a's blog"), array("%a" => $node->name)) ."</a>"; + if (blog_access("update", $node)) { + $links[] = "<a href=\"module.php?mod=node&op=edit&id=$node->nid\">". t("update this blog") ."</a>"; + } + else { + $links[] = "<a href=\"module.php?mod=blog&op=view&id=$node->uid\">". strtr(t("%a's blog"), array("%a" => $node->name)) ."</a>"; + } } return $links ? $links : array(); |