diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-11-03 18:38:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-11-03 18:38:30 +0000 |
commit | a2e6910902bfb1263e1b6363e2c29ede68f89918 (patch) | |
tree | baa89d2d8bcd814f73d5108466024bd13ea7159d /modules/forum.module | |
parent | 4d8b485fad960ea6551111e58f8c59df053b4456 (diff) | |
download | brdo-a2e6910902bfb1263e1b6363e2c29ede68f89918.tar.gz brdo-a2e6910902bfb1263e1b6363e2c29ede68f89918.tar.bz2 |
- Made the node forms support "help texts": it is not possible to configure
Drupal to display submission guidelines, or any other kind of explanation
such as "NO TEST POSTS", for example.
- Added node versioning: it is possible to create revisions, to view old
revisions and to roll-back to older revisions. You'll need to apply a
SQL update.
I'm going to work on the book module now, so I might be changing a few
things to enable collaborative, moderated revisions - but feel free to
send some first feedback, if you like.
- Added some configuration options which can be used to set the minimum
number of words a blog/story should consist of. Hopefully this will
be usefull to stop the (almost empty) test blogs.
- Various improvements:
+ Fine-tuned new node permission system.
+ Fine-tuned the functions in node.inc.
+ Fine-tuned some forms.
+ XHTML-ified some code.
Diffstat (limited to 'modules/forum.module')
-rw-r--r-- | modules/forum.module | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/modules/forum.module b/modules/forum.module index 1eec66753..e826fb95e 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -8,12 +8,9 @@ function forum_node($field) { } function forum_access($op, $node) { - if ($op == "view") { - return $node->nid && $node->status && !$node->moderate; + return ($node->nid && $node->status && !$node->moderate); } - - return user_access("adminster nodes"); } function forum_link($type) { @@ -30,15 +27,13 @@ function forum_view($node) { $theme->box(t("Discussion forum"), $output); } -function forum_form($node, $error) { - +function forum_form($node, $help, $error) { $output .= form_textarea("Body", "body", $node->body, 60, 10); return $output; } function forum_save() { - if ($node->nid) { return array(); } @@ -63,13 +58,13 @@ function forum_page() { if (user_access("access content")) { $result = db_query("SELECT nid FROM node WHERE type = 'forum' ORDER BY title"); - $output .= "<TABLE BORDER=\"0\" CELLSPACING=\"4\" CELLPADDING=\"4\">\n"; - $output .= " <TR><TH>". t("Forum") ."</TH><TH>". t("Comments") ."</TH><TH>". t("Last comment") ."</TH></TR>"; + $output .= "<table border=\"0\" cellspacing=\"4\" cellpadding=\"4\">"; + $output .= " <tr><th>". t("Forum") ."</th><th>". t("Comments") ."</th><th>". t("Last comment") ."</th></tr>"; while ($node = db_fetch_object($result)) { $node = node_load(array("nid" => $node->nid)); - $output .= " <TR><TD><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A><BR><SMALL>". check_output($node->body, 1) ."</SMALL></TD><TD ALIGN=\"center\">". forum_num_comments($node->nid) ."</TD><TD ALIGN=\"center\">". forum_last_comment($node->nid) ."</TD></TR>"; + $output .= " <tr><td><a href=\"node.php?id=$node->nid\">". check_output($node->title) ."</a><br /><small>". check_output($node->body, 1) ."</small></td><td align=\"center\">". forum_num_comments($node->nid) ."</td><td align=\"center\">". forum_last_comment($node->nid) ."</td></tr>"; } - $output .= "</TABLE>\n"; + $output .= "</table>"; $theme->header(); $theme->box(t("Discussion forum"), $output); |