--- spam1.module 2007-09-08 14:24:22.984375000 -0400 +++ spam.module 2007-09-09 17:40:16.031250000 -0400 @@ -240,12 +240,16 @@ function spam_help($path) { case 'admin/content/node/list/reported': $output = t('The following content has been reported as spam.'); break; - case 'admin/content/spam': + case 'admin/logs/spam': $output = t('If enabled, the spam module will log the various filter actions that lead up to site content being marked as spam or not spam. These logs can be helpful in understanding why certain content was or was not marked as spam.'); - case 'admin/content/spam/custom': + break; + case 'admin/logs/spam/blockedips': + $output = t('The following IPs have been marked as blocked.'); + break; + case 'admin/settings/spam/custom': $output = t('Custom filters allow you to define words, phrases and/or regular expressions to be tested against new content on your site. If your custom filter matches, you can cause this to increase or decrease the probability that the given content is spam. For example, if a comment about "viagra" is completely out of place on your site, you can create a custom filter such that any comment with the word "viagra" in it will always be marked as spam.'); break; - case 'admin/content/spam/url': + case 'admin/settings/spam/url': $output = t('The spam filter\'s Bayesian logic automatically learns spammer web domains. Any new comment or other content containing one of the web domain names listed below will be automatically marked as spam. For example, if "spam.com" is listed below, a new comment containing the text "http://spam.com/great/deals" will be marked as spam.'); $output .= "

"; $output .= t('The advantage that url filters offer is that they are automatically learned by the bayesian filter. However, it is possible to instead block spammer domains by defining an appropriate custom filter.'); @@ -648,15 +652,15 @@ function spam_menu($may_cache) { if ($may_cache) { $items[] = array( - 'path' => 'admin/content/spam', - 'title' => t('Spam filters'), + 'path' => 'admin/logs/spam', + 'title' => t('Spam logs'), 'access' => user_access('administer spam'), 'callback' => 'spam_logs_overview', 'description' => t('Detect and manage spam posts.'), ); $items[] = array( - 'path' => 'admin/content/spam/logs', + 'path' => 'admin/logs/spam/logs', 'title' => t('Logs'), 'access' => user_access('access spam'), 'callback' => 'spam_logs_overview', @@ -665,26 +669,18 @@ function spam_menu($may_cache) { ); $items[] = array( - 'path' => 'admin/content/spam/logs/entry', - 'access' => user_access('access spam'), - 'callback' => 'spam_logs_entry', - 'type' => MENU_LOCAL_CALLBACK, - ); - - $items[] = array( - 'path' => 'admin/content/spam/custom', - 'title' => t('Custom filters'), + 'path' => 'admin/logs/spam/blockedips', + 'title' => t('Blocked IPs'), 'access' => user_access('administer spam'), - 'callback' => 'spam_custom_filter_overview', + 'callback' => 'spam_blocked_ips_overview', 'type' => MENU_LOCAL_TASK, ); $items[] = array( - 'path' => 'admin/content/spam/url', - 'title' => t('URL filters'), - 'access' => user_access('administer spam'), - 'callback' => 'spam_url_filter_overview', - 'type' => MENU_LOCAL_TASK, + 'path' => 'admin/content/spam/logs/entry', + 'access' => user_access('access spam'), + 'callback' => 'spam_logs_entry', + 'type' => MENU_LOCAL_CALLBACK, ); $items[] = array( @@ -701,11 +697,8 @@ function spam_menu($may_cache) { 'path' => 'admin/settings/spam', 'title' => t('Spam'), 'access' => user_access('administer spam'), -// 'callback' => 'drupal_get_form', -// 'callback arguments' => array('spam_admin_settings'), 'callback' => 'spam_admin_settings', 'description' => t('Control settings for the spam module.'), -// 'type' => MENU_DEFAULT_LOCAL_TASK, ); $items[] = array( @@ -715,7 +708,7 @@ function spam_menu($may_cache) { 'callback' => 'drupal_get_form', 'callback arguments' => array('spam_admin_settings_filter'), 'description' => t('Select content type filters for the spam module.'), - 'weight' => 1, + 'weight' => -5, 'type' => MENU_LOCAL_TASK, ); @@ -726,7 +719,7 @@ function spam_menu($may_cache) { 'callback' => 'drupal_get_form', 'callback arguments' => array('spam_admin_settings_limits'), 'description' => t('Set filtering limits for the spam module.'), - 'weight' => 2, + 'weight' => -5, 'type' => MENU_LOCAL_TASK, ); @@ -737,7 +730,7 @@ function spam_menu($may_cache) { 'callback' => 'drupal_get_form', 'callback arguments' => array('spam_admin_settings_actions'), 'description' => t('Select actions for the spam module.'), - 'weight' => 3, + 'weight' => -4, 'type' => MENU_LOCAL_TASK, ); @@ -748,16 +741,26 @@ function spam_menu($may_cache) { 'callback' => 'drupal_get_form', 'callback arguments' => array('spam_admin_settings_advanced'), 'description' => t('Set advanced option for the spam module.'), - 'weight' => 4, + 'weight' => -4, 'type' => MENU_LOCAL_TASK, ); $items[] = array( - 'path' => 'admin/content/spam/blockedips', - 'title' => t('Blocked IPs'), + 'path' => 'admin/settings/spam/custom', + 'title' => t('Custom filters'), 'access' => user_access('administer spam'), - 'callback' => 'spam_blocked_ips_overview', + 'callback' => 'spam_custom_filter_overview', + 'type' => MENU_LOCAL_TASK, + 'weight' => -3, + ); + + $items[] = array( + 'path' => 'admin/settings/spam/url', + 'title' => t('URL filters'), + 'access' => user_access('administer spam'), + 'callback' => 'spam_url_filter_overview', 'type' => MENU_LOCAL_TASK, + 'weight' => -3, ); // node admin submenu @@ -1061,6 +1064,8 @@ function spam_spam($name, $arg1, $arg2, $tabs['Limits'] = t('Set filtering limits for the spam module.'); $tabs['Actions'] = t('Select actions for the spam module.'); $tabs['Advanced'] = t('Set advanced option for the spam module.'); + $tabs['Custom Filters'] = t('Define specific rules for identifying spam.'); + $tabs['URL Filters'] = t('List specific URLs that will be identified as spam.'); return $tabs;