From 7ce686c152416dc3a240861840f9c18791e38762 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 10 Dec 2002 20:35:20 +0000 Subject: 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 (status; } if ($op == "create") { - return user_access("post content"); + return user_access("create forum topics"); } } function forum_perm() { - return array("post forum topics without approval"); + return array("create forum topics"); } function forum_conf_options() { @@ -53,11 +53,7 @@ function forum_save($op, $node) { } if ($op == "create") { - if (user_access("post forum topics without approval")) { - $moderation = array("body" => filter($node->body), "moderate" => 0, "status" => 1); - } else { - $moderation = array("body" => filter($node->body), "moderate" => 1, "status" => 0); - } + $moderation = array("body" => filter($node->body), "moderate" => 0, "status" => 1); return array_merge($moderation, array("tid", "icon_num", "shadow")); } @@ -120,11 +116,6 @@ function forum_link($type, $node = 0, $main = 0) { $links[] = lm(t("forum"), array("mod" => "forum")); } - if ($type == "menu.create" && user_access("post content")) { - // I had complains that having this link leads people not to choose a forum, and always post in the first forum. - #$links[] = lm(t("create forum topic"), array("mod" => "node", "op" => "add", "type" => "forum"), "", array("title" => t("Start a new forum topic."))); - } - if (!$main && $type == "node" && $node->type == "forum") { // get previous and next topic @@ -650,8 +641,8 @@ function forum_topic_list($topics, $num_topics, $sortby, $forum_per_page, $offse $output .= " "; } - if (user_access("post content")) { - $output .= "
". lm(t("start new topic"), array("mod" => "node", "op" => "add", "type" => "forum", "tid" => $tid)) ."
"; + if (user_access("create forum topics")) { + $output .= "
". lm(t("create new forum topic"), array("mod" => "node", "op" => "add", "type" => "forum", "tid" => $tid)) ."
"; } if (count($topics) >= $forum_per_page) { -- cgit v1.2.3