From 5d36c704496fee766912269edd9daf6979d52f56 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Sat, 8 Jun 2002 16:17:29 +0000 Subject: - improved module descriptions. - removed admin options for queue and comment module if the modules are not loaded. - nodes are now auto promoted when queue module isn't enabled. - moderation result block is now visible by the node author. --- modules/node.module | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'modules/node.module') diff --git a/modules/node.module b/modules/node.module index a12e61ad9..149e675bf 100644 --- a/modules/node.module +++ b/modules/node.module @@ -15,7 +15,7 @@ function node_help() { } function node_system($field){ - $system["description"] = t("You'll need this too."); + $system["description"] = t("The core that allows content to be submitted to the site."); return $system[$field]; } @@ -494,7 +494,7 @@ function node_admin_nodes() { $output .= "\n"; $output .= " \n"; while ($node = db_fetch_object($result)) { - $output .= ""; + $output .= ""; } $output .= "
titletypeauthorstatusoperations
". l(check_output($node->title), array("id" => $node->nid)) ."$node->type". format_name($node) ."". ($node->status ? t("published") : t("not published")) ."". la(t("edit node"), array("mod" => "node", "op" => "edit", "id" => $node->nid)) ."". la(t("delete node"), array("mod" => "node", "op" => "delete", "id" => $node->nid)) ."
". l(check_output($node->title), array("id" => $node->nid)) ."". module_invoke($node->type, "node", "name") ."". format_name($node) ."". ($node->status ? t("published") : t("not published")) ."". la(t("edit node"), array("mod" => "node", "op" => "edit", "id" => $node->nid)) ."". la(t("delete node"), array("mod" => "node", "op" => "delete", "id" => $node->nid)) ."
"; @@ -878,10 +878,16 @@ function node_form($edit, $error = NULL) { $output .= form_textfield(t("Authored on"), "date", $edit->date, 20, 25, $error["date"]); $output .= "
"; $output .= form_select(t("Set public/published"), "status", $edit->status, array("Disabled", "Enabled")); - $output .= form_select(t("Queue for moderation"), "moderate", $edit->moderate, array("Disabled", "Enabled")); + // TODO: move this to the queue.module + if (module_exist("queue")) { + $output .= form_select(t("Queue for moderation"), "moderate", $edit->moderate, array("Disabled", "Enabled")); + } $output .= form_select(t("Promote to front page"), "promote", $edit->promote, array("Disabled", "Enabled")); $output .= form_select(t("Static on front page"), "static", $edit->static, array("Disabled", "Enabled")); - $output .= form_select(t("Allow users comments"), "comment", $edit->comment, array("Disabled", "Read only", "Read/Write")); + // TODO: move this to the comment.module + if (module_exist("comment")) { + $output .= form_select(t("Allow users comments"), "comment", $edit->comment, array("Disabled", "Read only", "Read/Write")); + } $output .= form_select(t("Create new revision"), "revision", $edit->revision, array("Disabled", "Enabled")); } @@ -906,7 +912,7 @@ function node_add($type) { if ($type && node_access("create", $type)) { // Initialize settings - $output = node_form(array("uid" => $user->uid, "name" => $user->name, "type" => $type, "status" => 1, "moderate" => 1, "comment" => 2)); + $output = node_form(array("uid" => $user->uid, "name" => $user->name, "type" => $type, "status" => 1, "promote" => !module_exist("queue"), "moderate" => module_exist("queue"), "comment" => module_exist("queue") ? 2 : 0)); } else { -- cgit v1.2.3