From cccb132c81e82cc01ca7f014d185c1ecce864377 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 21 Apr 2001 14:19:20 +0000 Subject: - Addition: added a "promote" field to the node table, which makes "promoting nodes" to the main page possible. Stories and reviews could be promoted by default, but - on accasion a good book entry could be manually promoted too. Thus all existing content types can be shown on the main page, not just stories. Requires a SQL update, see 2.00-to-x.xx.sql! - Addition: implemented "auto-post new submissions" feature to disable or by-pass the moderation queue in addition to "moderate new submissions". TODO: admin moderation versus registered user moderation. - Addition: added category and topic support to page.module. --- modules/structure.module | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) (limited to 'modules/structure.module') diff --git a/modules/structure.module b/modules/structure.module index 5fa361bd9..8bcc21978 100644 --- a/modules/structure.module +++ b/modules/structure.module @@ -2,15 +2,13 @@ $module = array("admin" => "structure_admin"); -$mstatus = array("post new submissions", "moderate new submissions"); - function content_types($name, $module) { global $types; if ($module[type]) $types[$name] = $name; } function category_form($edit = array()) { - global $types, $mstatus; + global $types; $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); @@ -29,25 +27,26 @@ function category_form($edit = array()) { $output .= "
\n"; $output .= "The content type to bind or associate this category with.

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

\n"; - - $output .= "Submission settings:
\n"; - foreach ($mstatus as $key=>$value) $options3 .= ""; - $output .= "
\n"; - $output .= "What to do with new submissions in this category.

\n"; - - $output .= "Post, dump and expiration threshold:
\n"; - foreach ($threshold_post as $value) $options4 .= ""; - $output .= "\n"; - foreach ($threshold_dump as $value) $options5 .= ""; - $output .= "\n"; - foreach ($threshold_expire as $value) $options6 .= ""; - $output .= "
\n"; - - $output .= "Specify the post, dump and expiration threshold for moderation purpose.

\n"; + $output .= "By default, allow or dissallow users to post comments in this category.

\n"; + + $output .= "Promote:
\n"; + foreach (node_promote_status() as $key=>$value) $options3 .= ""; + $output .= "
\n"; + $output .= "By default, promote new submissions in this category to the front page.

\n"; + + $output .= "Submission:
\n"; + foreach (node_submission_status() as $key=>$value) $options4 .= ""; + $output .= "
\n"; + foreach ($threshold_post as $value) $options5 .= ""; + $output .= "\n"; + foreach ($threshold_dump as $value) $options6 .= ""; + $output .= "\n"; + foreach ($threshold_expire as $value) $options7 .= ""; + $output .= "
\n"; + $output .= "What to do with new submissions in this category?
Specify the post, dump and expiration threshold for moderation purpose.

\n"; if ($edit[cid]) { $output .= "\n"; @@ -64,14 +63,12 @@ function category_form($edit = array()) { } function category_overview() { - global $mstatus; - $result = db_query("SELECT * FROM category ORDER BY name"); $output .= "\n"; - $output .= " \n"; + $output .= " \n"; while ($category = db_fetch_object($result)) { - $output .= " \n"; + $output .= " \n"; } $output .= "
nametypecommentssubmissionsoperations
nametypecommentpromotesubmissionsoperations
". 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
". check_output($category->name) ."". check_output($category->type) ."". node_comment_status($category->comment) ."". node_promote_status($category->promote) ."". node_submission_status($category->submission) ."". ($category->submission ? "
post: $category->post, dump: $category->dump, expire: $category->expire" : "") ."
cid\">edit category
\n"; return $output; -- cgit v1.2.3