From 3f1979aa3cfa2d50789e88bd0a857dec6babb44b Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 19 Apr 2001 19:59:48 +0000 Subject: - Addition: made it so that comments can be enabled/disabled on a node per node basis, rather then on a category per category basis. The default settings for each individual category can be changed though. Example: it can be setup so that - by default - all stories posted to the category "article" will have comments enabled but stories submitted to "announcement" not. Different configuration schemes can easily be added later. Requires a SQL update, see 2.00-to-x.xx.sql/database.mysql. - Addition: made submit.php only use categories that users can actually submit new content to. --- modules/structure.module | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules/structure.module') diff --git a/modules/structure.module b/modules/structure.module index 6e921ec0d..5fa361bd9 100644 --- a/modules/structure.module +++ b/modules/structure.module @@ -2,7 +2,6 @@ $module = array("admin" => "structure_admin"); -$cstatus = array("disabled", "enabled"); $mstatus = array("post new submissions", "moderate new submissions"); function content_types($name, $module) { @@ -11,7 +10,7 @@ function content_types($name, $module) { } function category_form($edit = array()) { - global $types, $cstatus, $mstatus; + global $types, $mstatus; $threshold_post = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, 90, 100); $threshold_dump = array(-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -20, -25, -30); @@ -31,7 +30,7 @@ function category_form($edit = array()) { $output .= "The content type to bind or associate this category with.

\n"; $output .= "Comment settings:
\n"; - foreach ($cstatus as $key=>$value) $options2 .= ""; + foreach (comment_status() as $key=>$value) $options2 .= ""; $output .= "
\n"; $output .= "Allow or dissallow users to post comments in this category.

\n"; @@ -65,14 +64,14 @@ function category_form($edit = array()) { } function category_overview() { - global $cstatus, $mstatus; + global $mstatus; $result = db_query("SELECT * FROM category ORDER BY name"); $output .= "\n"; $output .= " \n"; while ($category = db_fetch_object($result)) { - $output .= " \n"; + $output .= " \n"; } $output .= "
nametypecommentssubmissionsoperations
". check_output($category->name) ."". check_output($category->type) ."". check_output($cstatus[$category->comment]) ."". check_output($mstatus[$category->submission]) ."". ($category->submission ? "
post: $category->post, dump: $category->dump, expire: $category->expire" : "") ."
cid\">edit category
". check_output($category->name) ."". check_output($category->type) ."". comment_status($category->comment) ."". check_output($mstatus[$category->submission]) ."". ($category->submission ? "
post: $category->post, dump: $category->dump, expire: $category->expire" : "") ."
cid\">edit category
\n"; return $output; -- cgit v1.2.3