Closed (fixed)
Project:
Amazon associate tools
Version:
5.x-1.0-beta
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
6 Jan 2007 at 23:59 UTC
Updated:
11 Jan 2007 at 17:39 UTC
There is no straightforward way to disable the Search Amazon.com tab on the Search pages. See http://drupal.org/node/85137
The suggested generic solution at http://drupal.org/node/68792 is messy.
I can think of two ways to implement this:
1) Add in code for a setting to optionally disable the tab
2) Add in another permission, eg "Search Amazon.com" in the function amazon_perm(), and check for that permission when the tab is inserted (by changeing the 'access' => TRUE line in the following code in amazon.module)
$items[] = array('path' => 'search/amazon',
'title' => ('Amazon.com'),
'access' => TRUE,
'type' => MENU_LOCAL_TASK,
'callback' => 'amazon_search_page');
This seems cleaner, is much simpler, and is what a number of other modules do before inserting menu tabs.
Please could you consider implementing it?
Thanks a lot.
Comments
Comment #1
Prometheus6 commentedI can do that. I'll add the new permission.
I'm in the middle of a major change for 5.x so it will be a couple of days,
Comment #2
Prometheus6 commentedCheck the 5.x HEAD version.
http://ftp.osuosl.org/pub/drupal/files/projects/amazontools-HEAD.tar.gz
Comment #3
Prometheus6 commented