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/forum/forum.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/forum/forum.module')
-rw-r--r-- | modules/forum/forum.module | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module index e7a250a68..cfe9dc4cd 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -18,12 +18,12 @@ function forum_access($op, $node) { return $node->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 .= "<td width=\"33%\"> </td>"; } - if (user_access("post content")) { - $output .= "<td width=\"33%\"><div align=\"center\" style=\"font-style: bold;\">". lm(t("start new topic"), array("mod" => "node", "op" => "add", "type" => "forum", "tid" => $tid)) ."</div></td>"; + if (user_access("create forum topics")) { + $output .= "<td width=\"33%\"><div align=\"center\" style=\"font-style: bold;\">". lm(t("create new forum topic"), array("mod" => "node", "op" => "add", "type" => "forum", "tid" => $tid)) ."</div></td>"; } if (count($topics) >= $forum_per_page) { |