--- hovertip.module Fri May 25 15:05:22 2007 +++ hovertip.module Tue Sep 25 12:31:13 2007 @@ -41,7 +41,7 @@ function hovertip_menu($may_cache) { } else { // Call our init hook. See http://api.drupal.org/api/5/function/hook_init - _hovertip_init(); + if (variable_get('hovertip_global_on', 1)) _hovertip_init(); } return $items; } @@ -53,6 +53,12 @@ function hovertip_settings_form() { '#title' => t('Javascript to initialize hovertips'), '#description' => t('The script here will be included in every page.'), '#default_value' => _hovertip_get_javascript(), + ); + $form['hovertip_global_on'] = + array('#type' => 'checkbox', + '#title' => t('Activate Hovertip Globally'), + '#description' => t('Should Hovertip be active globally on the site. Turn off if you will call \'_hovertip_init()\' from inside your theme.'), + '#default_value' => variable_get('hovertip_global_on', 1), ); return system_settings_form($form); }