Shouldn't there be a link to:
admin/config/antispam

from:
admin/config

I couldn't see it there.

CommentFileSizeAuthor
#6 antispam-n1062624-6.patch372 bytesDamienMcKenna
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pixture’s picture

I know. I could not figure out how to do it. The modules which belong to a predefined category seems to be automatically shown up in the config page.
Please let me know if someone knows how to do it.

andrewadams2099’s picture

I didn't see it show up in the administration menu either so I just changed the menu links to make it show under a new tab instead.

In antispam.info I changed the line
configure = admin/config/antispam

change to...

configure = "admin/config/spamprevention/antispam"

In antispam.module I change the menu hook to include the following

  // New Menu Block
  $items['admin/config/spamprevention'] = array(
    'title' => 'AntiSpam',
    'description' => 'Use the anti-spam service to protect your site from spam.', 
    'position' => 'right',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  
  // A menu item for the menu block
  $items['admin/config/spamprevention/antispam'] = array(
    'title' => t('AntiSpam'),
    'description' => t('Use the anti-spam service to protect your site from spam.'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array('antispam_settings_form'),
    'access arguments' => array('administer antispam settings'),
    'file' => 'antispam.admin.inc',
    'type' => MENU_NORMAL_ITEM,  // Needs to be normal to show up
  );

or if you wanted instead that the menu item appeared under the Content section you could just edit the following

In antispam.info I changed the line
configure = admin/config/antispam
change to...
configure = "admin/config/content/antispam"

In the menu hook function in antispam.module change the following.

  $items['admin/config/antispam'] = array(
    'title' => t('AntiSpam'),
    'description' => t('Use the anti-spam service to protect your site from spam.'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array('antispam_settings_form'),
    'access arguments' => array('administer antispam settings'),
    'file' => 'antispam.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );

change to

  // This menu item will appear inside the content tab
  $items['admin/config/content/antispam'] = array(
    'title' => t('AntiSpam'),
    'description' => t('Use the anti-spam service to protect your site from spam.'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array('antispam_settings_form'),
    'access arguments' => array('administer antispam settings'),
    'file' => 'antispam.admin.inc',
    'type' => MENU_NORMAL_ITEM, //has to be normal to show up
  );
markpeak’s picture

Confirm, please fix.

mgifford’s picture

Can someone roll up a patch against git? It's always the easiest way for a maintainer to address things.

mgifford’s picture

DamienMcKenna’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Issue summary: View changes
Status: Active » Needs review
FileSize
372 bytes

This'll do it.

DamienMcKenna’s picture

Component: User interface » Miscellaneous
Category: Feature request » Bug report
Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.