From 5d36c704496fee766912269edd9daf6979d52f56 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Sat, 8 Jun 2002 16:17:29 +0000 Subject: [PATCH] - 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/aggregator.module | 2 +- modules/aggregator/aggregator.module | 2 +- modules/archive.module | 2 +- modules/archive/archive.module | 2 +- modules/block.module | 2 +- modules/block/block.module | 2 +- modules/blog.module | 2 +- modules/blog/blog.module | 2 +- modules/bloggerapi.module | 2 +- modules/comment.module | 2 +- modules/comment/comment.module | 2 +- modules/drupal.module | 2 +- modules/drupal/drupal.module | 2 +- modules/import.module | 2 +- modules/jabber.module | 2 +- modules/locale.module | 2 +- modules/locale/locale.module | 2 +- modules/node.module | 16 +++++++++++----- modules/node/node.module | 16 +++++++++++----- modules/page.module | 2 +- modules/page/page.module | 2 +- modules/poll.module | 2 +- modules/poll/poll.module | 2 +- modules/queue.module | 4 ++-- modules/search.module | 2 +- modules/search/search.module | 2 +- modules/statistics.module | 2 +- modules/statistics/statistics.module | 2 +- modules/story.module | 2 +- modules/story/story.module | 2 +- modules/system.module | 2 +- modules/system/system.module | 2 +- modules/taxonomy.module | 2 +- modules/taxonomy/taxonomy.module | 2 +- modules/tracker.module | 2 +- modules/tracker/tracker.module | 2 +- modules/user.module | 2 +- modules/user/user.module | 2 +- 38 files changed, 59 insertions(+), 47 deletions(-) diff --git a/modules/aggregator.module b/modules/aggregator.module index 59ddccd78e9..e50b77c5bd1 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -12,7 +12,7 @@ function import_help() { } function import_system($field){ - $system["description"] = t("Used to import syndicated content (ie. news feeds)"); + $system["description"] = t("Used to aggregate syndicated content (RSS and RDF)."); return $system[$field]; } diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 59ddccd78e9..e50b77c5bd1 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -12,7 +12,7 @@ function import_help() { } function import_system($field){ - $system["description"] = t("Used to import syndicated content (ie. news feeds)"); + $system["description"] = t("Used to aggregate syndicated content (RSS and RDF)."); return $system[$field]; } diff --git a/modules/archive.module b/modules/archive.module index 459fe34f075..4c0cf4bc1c6 100644 --- a/modules/archive.module +++ b/modules/archive.module @@ -2,7 +2,7 @@ // $Id$ function archive_system($field){ - $system["description"] = t("Displays calendar navigation to old content."); + $system["description"] = t("Displays a calendar to navigation old content."); return $system[$field]; } diff --git a/modules/archive/archive.module b/modules/archive/archive.module index 459fe34f075..4c0cf4bc1c6 100644 --- a/modules/archive/archive.module +++ b/modules/archive/archive.module @@ -2,7 +2,7 @@ // $Id$ function archive_system($field){ - $system["description"] = t("Displays calendar navigation to old content."); + $system["description"] = t("Displays a calendar to navigation old content."); return $system[$field]; } diff --git a/modules/block.module b/modules/block.module index 638f0dc0861..5c7ab47f7a5 100644 --- a/modules/block.module +++ b/modules/block.module @@ -39,7 +39,7 @@ function block_help() { } function block_system($field){ - $system["description"] = t("Displays content in small boxes, generally along the side of the page."); + $system["description"] = t("Controls the boxes that are displayed around the main content."); return $system[$field]; } diff --git a/modules/block/block.module b/modules/block/block.module index 638f0dc0861..5c7ab47f7a5 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -39,7 +39,7 @@ function block_help() { } function block_system($field){ - $system["description"] = t("Displays content in small boxes, generally along the side of the page."); + $system["description"] = t("Controls the boxes that are displayed around the main content."); return $system[$field]; } diff --git a/modules/blog.module b/modules/blog.module index 28f669225a1..15020a1d27b 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -2,7 +2,7 @@ // $Id$ function blog_system($field){ - $system["description"] = t("Enables keeping an online journal."); + $system["description"] = t("Enables users to keep a blog or online journal."); return $system[$field]; } diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 28f669225a1..15020a1d27b 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -2,7 +2,7 @@ // $Id$ function blog_system($field){ - $system["description"] = t("Enables keeping an online journal."); + $system["description"] = t("Enables users to keep a blog or online journal."); return $system[$field]; } diff --git a/modules/bloggerapi.module b/modules/bloggerapi.module index c663762a435..68a6120c128 100644 --- a/modules/bloggerapi.module +++ b/modules/bloggerapi.module @@ -365,7 +365,7 @@ function bloggerapi_perm() { } function bloggerapi_system($field){ - $system["description"] = t("Allows users post to Drupal via alternate methods or different tools."); + $system["description"] = t("Enables users to post using tools or applications that support the Blogger API."); return $system[$field]; } diff --git a/modules/comment.module b/modules/comment.module index 22c7c8aaa17..0adf660eceb 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -14,7 +14,7 @@ function comment_help() { } function comment_system($field){ - $system["description"] = t("Enables user commenting."); + $system["description"] = t("Enables user to comment on content (nodes)."); return $system[$field]; } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 22c7c8aaa17..0adf660eceb 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -14,7 +14,7 @@ function comment_help() { } function comment_system($field){ - $system["description"] = t("Enables user commenting."); + $system["description"] = t("Enables user to comment on content (nodes)."); return $system[$field]; } diff --git a/modules/drupal.module b/modules/drupal.module index 1c852e80ca3..7c433a8a0d8 100644 --- a/modules/drupal.module +++ b/modules/drupal.module @@ -1,7 +1,7 @@ \n"; $output .= " titletypeauthorstatusoperations\n"; while ($node = db_fetch_object($result)) { - $output .= "". 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)) .""; + $output .= "". 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)) .""; } $output .= ""; @@ -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 { diff --git a/modules/node/node.module b/modules/node/node.module index a12e61ad906..149e675bf60 100644 --- a/modules/node/node.module +++ b/modules/node/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 { diff --git a/modules/page.module b/modules/page.module index fa53d8bb02f..f326f42549f 100644 --- a/modules/page.module +++ b/modules/page.module @@ -8,7 +8,7 @@ function page_help() { } function page_system($field){ - $system["description"] = t("Enables the creation of persistent site pages that can be added to the navigation system."); + $system["description"] = t("Enables the creation of a static pages that can be added to the navigation system."); return $system[$field]; } diff --git a/modules/page/page.module b/modules/page/page.module index fa53d8bb02f..f326f42549f 100644 --- a/modules/page/page.module +++ b/modules/page/page.module @@ -8,7 +8,7 @@ function page_help() { } function page_system($field){ - $system["description"] = t("Enables the creation of persistent site pages that can be added to the navigation system."); + $system["description"] = t("Enables the creation of a static pages that can be added to the navigation system."); return $system[$field]; } diff --git a/modules/poll.module b/modules/poll.module index c00cdff8303..b355df0135a 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -253,7 +253,7 @@ function poll_save($op, $node) { } function poll_system($field){ - $system["description"] = t("Enables submission of multiple choice questions for voting."); + $system["description"] = t("Allows users to submit multiple choice questions for voting."); return $system[$field]; } diff --git a/modules/poll/poll.module b/modules/poll/poll.module index c00cdff8303..b355df0135a 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -253,7 +253,7 @@ function poll_save($op, $node) { } function poll_system($field){ - $system["description"] = t("Enables submission of multiple choice questions for voting."); + $system["description"] = t("Allows users to submit multiple choice questions for voting."); return $system[$field]; } diff --git a/modules/queue.module b/modules/queue.module index 744b83ddcf7..ab55f953a86 100644 --- a/modules/queue.module +++ b/modules/queue.module @@ -2,7 +2,7 @@ // $Id$ function queue_system($field){ - $system["description"] = t("Enables new content submissions to be rated before being displayed"); + $system["description"] = t("Enables content to be moderated by the community."); return $system[$field]; } @@ -184,7 +184,7 @@ function queue_block() { if ($user->uid) { $node = node_load(array("nid" => $id)); } - if (substr_count($node->users, "$user->uid=") && $node->moderate == 1) { + if (($user->uid == $node->uid && substr_count($node->users, "$user->uid=")) && $node->moderate == 1) { foreach (explode(",", $node->users) as $vote) { if ($vote) { $data = explode("=", $vote); diff --git a/modules/search.module b/modules/search.module index b5ce9403afb..92f7807b54d 100644 --- a/modules/search.module +++ b/modules/search.module @@ -15,7 +15,7 @@ function search_help() { } function search_system($field){ - $system["description"] = t("Enables site wide keyword searching"); + $system["description"] = t("Enables site wide keyword searching."); return $system[$field]; } diff --git a/modules/search/search.module b/modules/search/search.module index b5ce9403afb..92f7807b54d 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -15,7 +15,7 @@ function search_help() { } function search_system($field){ - $system["description"] = t("Enables site wide keyword searching"); + $system["description"] = t("Enables site wide keyword searching."); return $system[$field]; } diff --git a/modules/statistics.module b/modules/statistics.module index c4e1d48d047..da8be898db7 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -15,7 +15,7 @@ function statistics_help() { } function statistics_system($field){ - $system["description"] = t("Gathers and displays site metrics."); + $system["description"] = t("Gathers and displays referers."); return $system[$field]; } diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index c4e1d48d047..da8be898db7 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -15,7 +15,7 @@ function statistics_help() { } function statistics_system($field){ - $system["description"] = t("Gathers and displays site metrics."); + $system["description"] = t("Gathers and displays referers."); return $system[$field]; } diff --git a/modules/story.module b/modules/story.module index 8742be96491..475c7d78f16 100644 --- a/modules/story.module +++ b/modules/story.module @@ -8,7 +8,7 @@ function story_help() { } function story_system($field){ - $system["description"] = t("Enables users to submit stories. These stories are not part of their blogs."); + $system["description"] = t("Enables users to submit stories, articles or similar content."); return $system[$field]; } diff --git a/modules/story/story.module b/modules/story/story.module index 8742be96491..475c7d78f16 100644 --- a/modules/story/story.module +++ b/modules/story/story.module @@ -8,7 +8,7 @@ function story_help() { } function story_system($field){ - $system["description"] = t("Enables users to submit stories. These stories are not part of their blogs."); + $system["description"] = t("Enables users to submit stories, articles or similar content."); return $system[$field]; } diff --git a/modules/system.module b/modules/system.module index 55bdfedba71..2d284e81448 100644 --- a/modules/system.module +++ b/modules/system.module @@ -9,7 +9,7 @@ function system_help() { } function system_system($field){ - $system["description"] = t("You'll need this."); + $system["description"] = t("Configuration system that lets site admins modify the workings of the site."); return $system[$field]; } diff --git a/modules/system/system.module b/modules/system/system.module index 55bdfedba71..2d284e81448 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -9,7 +9,7 @@ function system_help() { } function system_system($field){ - $system["description"] = t("You'll need this."); + $system["description"] = t("Configuration system that lets site admins modify the workings of the site."); return $system[$field]; } diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 695db46d2cb..2bc895b1afd 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -2,7 +2,7 @@ // $Id$ function taxonomy_system($field){ - $system["description"] = t("Enables the organization of content into categories and subcategories."); + $system["description"] = t("Enables the organization of content into categories."); return $system[$field]; } diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 695db46d2cb..2bc895b1afd 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -2,7 +2,7 @@ // $Id$ function taxonomy_system($field){ - $system["description"] = t("Enables the organization of content into categories and subcategories."); + $system["description"] = t("Enables the organization of content into categories."); return $system[$field]; } diff --git a/modules/tracker.module b/modules/tracker.module index 5335b2e6df0..e643c8db592 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -7,7 +7,7 @@ function tracker_help() { } function tracker_system($field){ - $system["description"] = t("Enables tracking of recent and new comments for site readers."); + $system["description"] = t("Enables tracking of recent and new comments for users."); return $system[$field]; } diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index 5335b2e6df0..e643c8db592 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -7,7 +7,7 @@ function tracker_help() { } function tracker_system($field){ - $system["description"] = t("Enables tracking of recent and new comments for site readers."); + $system["description"] = t("Enables tracking of recent and new comments for users."); return $system[$field]; } diff --git a/modules/user.module b/modules/user.module index fcf225514bc..2818952b877 100644 --- a/modules/user.module +++ b/modules/user.module @@ -5,7 +5,7 @@ session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", " session_start(); function user_system($field){ - $system["description"] = t("Enables a user registration system."); + $system["description"] = t("Enables the user registration and login system."); return $system[$field]; } diff --git a/modules/user/user.module b/modules/user/user.module index fcf225514bc..2818952b877 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -5,7 +5,7 @@ session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", " session_start(); function user_system($field){ - $system["description"] = t("Enables a user registration system."); + $system["description"] = t("Enables the user registration and login system."); return $system[$field]; }