diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-12-10 20:35:20 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-12-10 20:35:20 +0000 |
commit | 7ce686c152416dc3a240861840f9c18791e38762 (patch) | |
tree | f771ce209303d39fed6915d1f90d5fc0030e3f23 /modules/story/story.module | |
parent | eceead1819b8e480725db17816d1b2af4f3fd768 (diff) | |
download | brdo-7ce686c152416dc3a240861840f9c18791e38762.tar.gz brdo-7ce686c152416dc3a240861840f9c18791e38762.tar.bz2 |
o Permission improvements:
+ Removed the "post content" permission and replaced it by more fine-grained permissions such as "maintain static pages", "maintain personal blog", "maintain stories", etc.
o Usability improvements to teasers:
+ Teaser forms are no more. Teasers are extracted automatically but can also be instructed using a delimiter "---". Furthermore, when a post it too short for a teaser, the user won't be bother with teaser stuff anymore.
+ Added an option to set the teaser length, or to disable teasers all together.
+ When previewing a post, both the short (if any) and the full version of a post are shown. This addresses a common complaint; for example, when writing a book page there was no way you could preview the short version of your post.
+ Forum posts can be teasered now. This is particularly helpful in the context of drupal.org where we promote forum topics.
o Bugfix: replaced all PHP short tags (<?) with long tags (<?php).
o Bugfix: removed hard-coded dependence on comment module.
o Bugfix: when the queue module was disabled, it was not possible to approve updated book pages.
o Bugfix: applied modified version of Marco's node_teaser() fix.
Diffstat (limited to 'modules/story/story.module')
-rw-r--r-- | modules/story/story.module | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/story/story.module b/modules/story/story.module index 475c7d78f..2d7c31131 100644 --- a/modules/story/story.module +++ b/modules/story/story.module @@ -26,13 +26,17 @@ function story_node($field) { return $info[$field]; } +function story_perm() { + return array("create stories"); +} + function story_access($op, $node) { if ($op == "view") { return $node->status; } if ($op == "create") { - return 1; + return user_access("create stories"); } } @@ -44,10 +48,10 @@ function story_save($op, $node) { if ($op == "create") { if (user_access("administer nodes")) { - return array("body" => filter($node->body), "teaser" => filter($node->teaser)); + return array(); } else { - return array("body" => filter($node->body), "moderate" => 1, "teaser" => filter($node->teaser)); + return array("moderate" => 1); } } @@ -56,12 +60,12 @@ function story_save($op, $node) { } if ($op == "update") { - return array("body" => filter($node->body), "teaser" => filter($node->teaser)); + return array(); } } function story_link($type) { - if ($type == "menu.create" && user_access("post content")) { + if ($type == "menu.create" && user_access("create stories")) { $links[] = lm(t("create story"), array("mod" => "node", "op" => "add", "type" => "story"), "", array("title" => t("Add a new story."))); } @@ -91,10 +95,6 @@ function story_form(&$node, &$help, &$error) { } - if ($node->teaser) { - $output .= form_textarea(t("Teaser"), "teaser", $node->teaser, 60, 5, $error["teaser"]); - } - if (function_exists("taxonomy_node_form")) { $output .= implode("", taxonomy_node_form("story", $node)); } |