? block.patch ? hide-unpublished-230270-10-5x.patch ? hide-unpublished-230270-2-5x.patch ? hide-unpublished-230270-2.patch ? modr8_add_nid_to_replacements.patch Index: README.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/modr8/README.txt,v retrieving revision 1.3.2.2 diff -u -p -r1.3.2.2 README.txt --- README.txt 16 Aug 2007 02:58:04 -0000 1.3.2.2 +++ README.txt 2 Apr 2008 22:58:31 -0000 @@ -26,7 +26,8 @@ in the moderation queue listing for user For these users, approving a post in the queue will also publish it. However, posts to be moderated should generally be set to be published so that users without the "administer nodes" permission can also effectively work as -moderators. +moderators. The visibilty of unpublished posts for users with "administer nodes" +permission can be toggled on the settings page. Visit the settings page to customize the e-mail messages and set other defaults (path: admin/settings/modr8). Index: modr8.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/modr8/modr8.module,v retrieving revision 1.5.2.13 diff -u -p -r1.5.2.13 modr8.module --- modr8.module 6 Mar 2008 16:29:42 -0000 1.5.2.13 +++ modr8.module 2 Apr 2008 22:58:31 -0000 @@ -191,8 +191,9 @@ function modr8_page() { require_once drupal_get_path('module', 'modr8'). '/modr8_admin.inc'; $is_published = ''; - if (!user_access('administer nodes')) { - // Users who don't have the 'administer nodes' permission can only see published nodes. + if (!user_access('administer nodes') || variable_get('modr8_hide_unpublished', FALSE)) { + // Users who don't have the 'administer nodes' permission can only see published nodes, + // or some sites don't want to moderate unpublished nodes. $is_published = 'n.status = 1 AND '; } $count_sql = db_rewrite_sql('SELECT COUNT(*) FROM {node} n WHERE '. $is_published .' n.moderate = 1'); @@ -260,8 +261,9 @@ function modr8_block($op = 'list', $delt if (user_access('moderate content')){ $block['subject'] = t('Moderation queue'); $is_published = ''; - if (!user_access('administer nodes')) { - // Users who don't have the 'administer nodes' permission can only see published nodes. + if (!user_access('administer nodes') || variable_get('modr8_hide_unpublished', FALSE)) { + // Users who don't have the 'administer nodes' permission can only see + // published nodes, and some sites don't want to moderate unpublished nodes. $is_published = 'n.status = 1 AND '; } $count = db_result(db_query(db_rewrite_sql('SELECT COUNT(*) FROM {node} n WHERE '. $is_published .' n.moderate = 1'))); @@ -284,7 +286,7 @@ function theme_modr8_message($teaser = F else { switch ($op) { case 'view': - drupal_set_message(t("The post has been submitted for moderation and won't be listed publicly until it has been approved."), 'error'); + drupal_set_message(t("The post has been submitted for moderation and won't be listed publicly until it has been approved."), 'warning'); break; case 'node_form': drupal_set_message(t('This %type will be submitted for moderation and will not be accessible to other users until it has been approved.', array('%type' => node_get_types('name', $nodetype)))); Index: modr8_admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/modr8/modr8_admin.inc,v retrieving revision 1.2.2.14 diff -u -p -r1.2.2.14 modr8_admin.inc --- modr8_admin.inc 6 Mar 2008 16:29:42 -0000 1.2.2.14 +++ modr8_admin.inc 2 Apr 2008 22:58:32 -0000 @@ -20,6 +20,11 @@ function modr8_settings_form() { '#options' => drupal_map_assoc(array(5, 10, 15, 20, 25, 50, 75, 100, 150, 200)), '#default_value' => variable_get('modr8_nodes_per_page', 10), ); + $form['modr8_hide_unpublished'] = array( + '#type' => 'checkbox', + '#title' => t("Hide unpublished posts; don't show them in the queue even for admins who can view them."), + '#default_value' => variable_get('modr8_hide_unpublished', FALSE), + ); $period = drupal_map_assoc(array(86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 7257600), 'format_interval'); $period[0] = t('Never'); $form['modr8_log_clear'] = array(