? greybox_fix.patch Index: greybox.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/greybox/greybox.module,v retrieving revision 1.1 diff -u -r1.1 greybox.module --- greybox.module 23 Oct 2006 19:42:14 -0000 1.1 +++ greybox.module 12 Dec 2006 02:20:37 -0000 @@ -3,8 +3,8 @@ /** * Implementation of hook_nodeapi(). */ -function greybox_nodeapi(&$node, $op) { - if ($op == "view" && variable_get("greybox_enable", true)) { +function greybox_init() { + if (variable_get("greybox_enable", true)) { greybox_add_files(); } } @@ -22,15 +22,18 @@ function greybox_menu($maycache) { $items = array(); - $items[] = array( - 'path' => 'admin/settings/greybox', - 'title' => t('greybox'), - 'description' => t('Greybox settings'), - 'callback' => 'drupal_get_form', - 'callback arguments' => 'greybox_settings', - 'access' => user_access('administer greybox'), - 'type' => MENU_NORMAL_ITEM - ); + if ($maycache) { + $items[] = array( + 'path' => 'admin/settings/greybox', + 'title' => t('greybox'), + 'description' => t('Greybox settings'), + 'callback' => 'drupal_get_form', + 'callback arguments' => 'greybox_settings', + 'access' => user_access('administer greybox'), + 'type' => MENU_NORMAL_ITEM + ); + } + return $items; } @@ -46,7 +49,6 @@ "#collapsible" => TRUE, "#collapsed" => FALSE, ); - // Add Checkbox for Greybox Plus. $form["greybox_options"]["greybox_enable"] = array( "#type" => "checkbox", "#title" => t("Use Greybox"),