From b9952f537d5f1a102e145b0529c78bc31a1509af Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 16 Apr 2001 11:38:12 +0000 Subject: Large commit, read it carefully, and make the required changes to your theme: - corrected some missing translations in story.module. Oops! - grealty simplified the "moderation threshold mechanism"(tm) so that module writers don't have to worry about this. As a result story.module and book.module became a bit smaller and easier to grasp. - greatly simplified new "category" and "topic" code which is soon going to replace the "section" code. Needs more work though so hang on thight. - includes/section.inc and modules/section.module are replaced by includes/structure.module and modules/structure.module. - beautified example.theme a bit without adding HTML complexity: it is a good example but still useful as a theme - made theme example use "categories" and "topics" --> TAKE A LOOK AT IT AND UPDATE YOUR THEME - made theme marvin use "categories" and "topics" --> TAKE A LOOK AT IT AND UPDATE YOUR THEME - added 2 new "story listings" to administrator interface of story.module to verify story integrity. - optimized comment table a bit (work in progress) --- modules/structure.module | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'modules/structure.module') diff --git a/modules/structure.module b/modules/structure.module index 7404e6b8a..db4e13ea2 100644 --- a/modules/structure.module +++ b/modules/structure.module @@ -3,7 +3,7 @@ $module = array("admin" => "structure_admin"); $cstatus = array("disabled", "enabled: incl. anonymous", "enabled: excl. anonymous"); -$mstatus = array("post new submissions", "queue new submissions"); +$mstatus = array("post new submissions", "moderate new submissions"); include "includes/structure.inc"; @@ -73,9 +73,9 @@ function category_overview() { $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 .= "
nametypecommentssubmissionsthresholdsoperations
nametypecommentssubmissionsoperations
". check_output($category->name) ."". check_output($category->type) ."". check_output($cstatus[$category->comment]) ."". check_output($mstatus[$category->submission]) ."post: $category->post, dump: $category->dump, expire: $category->expirecid\">edit category
". 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
\n"; return $output; @@ -88,7 +88,7 @@ function topic_form($edit = array()) { $output .= "
\n"; $output .= "Name:
\n"; - $output .= "

\n"; + $output .= "
\n"; $output .= "A unique name for this topic like 'science', 'internet', 'culture', etc.

\n"; $output .= "Parent:
\n"; @@ -112,9 +112,9 @@ function topic_overview() { $tree = topic_tree(); $output .= "\n"; - $output .= " \n"; + $output .= " \n"; foreach ($tree as $id=>$name) { - $output .= " \n"; + $output .= " \n"; } $output .= "
nameoperations
nameread accesswrite accessoperations
". check_output($name) ."edit topic
". check_output($name) ."allalledit topic
\n"; return $output; @@ -133,7 +133,7 @@ function structure_overview() { function structure_admin() { global $id, $op, $type, $edit; - print "add new category | add new topic | categories | topics | overview


\n"; + print "add new category | add new topic | overview
\n"; switch ($type) { case "category": @@ -149,14 +149,14 @@ function structure_admin() { break; case "Delete category": print status(category_del($edit[cid])); - print category_overview(); + print structure_overview(); break; case "Save category": print status(category_save($edit)); - print category_overview(); + print structure_overview(); break; default: - print category_overview(); + print structure_overview(); } break; case "topic": @@ -172,14 +172,14 @@ function structure_admin() { break; case "Delete topic": print status(topic_del($edit[tid])); - print topic_overview(); + print structure_overview(); break; case "Save topic": print status(topic_save($edit)); - print topic_overview(); + print structure_overview(); break; default: - print topic_overview(); + print structure_overview(); } break; default: -- cgit v1.2.3