diff -urp hovertip/hovertip.info hovertip.new/hovertip.info --- hovertip/hovertip.info 2007-12-12 14:59:59.000000000 -0800 +++ hovertip.new/hovertip.info 2008-05-09 09:25:04.000000000 -0700 @@ -1,5 +1,6 @@ name = Hovertip description = Support for tooltips, via the jquery hovertip plugin. +core = 6.x ; Information added by drupal.org packaging script on 2007-12-12 version = "5.x-1.x-dev" Only in hovertip.new: hovertip.info.orig Only in hovertip.new: .#hovertip.module Only in hovertip.new: #hovertip.module# diff -urp hovertip/hovertip.module hovertip.new/hovertip.module --- hovertip/hovertip.module 2007-12-12 11:23:34.000000000 -0800 +++ hovertip.new/hovertip.module 2008-05-09 10:46:24.000000000 -0700 @@ -15,7 +15,7 @@ function _hovertip_get_javascript() { $default =<< 'admin/settings/hovertip', - 'title' => t('Hovertip settings'), - 'description' => t('Configure the hovertip module'), - 'callback' => 'drupal_get_form', - 'callback arguments' => 'hovertip_settings_form', - 'access' => user_access('administer site configuration'), - 'type' => MENU_NORMAL_ITEM, + $items['admin/settings/hovertip'] = array( + 'title' => 'Hovertip settings', + 'description' => 'Configure the hovertip module', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('hovertip_settings_form'), + 'access arguments' => array('administer site configuration'), + 'type' => MENU_NORMAL_ITEM, ); - } - else { - // Call our init hook. See http://api.drupal.org/api/5/function/hook_init - _hovertip_init(); - $items[] = array('path' => 'hovertip/settings_js', - 'callback' => 'hovertip_settings_js', - 'access' => TRUE, - 'type' => MENU_CALLBACK); - } + $items['hovertip/settings_js'] = array( + 'title' => t('Hovertip'), + 'page callback' => 'hovertip_settings_js', + 'access arguments' => array('access content'), + 'type' => MENU_CALLBACK); + return $items; } -function hovertip_settings_form() { - - $form['hovertip_javascript'] = - array('#type' => 'textarea', - '#title' => t('Javascript to initialize hovertips'), - '#description' => t('The script here will be included in every page.'), - '#default_value' => _hovertip_get_javascript(), +function hovertip_settings_form() { + $form['hovertip_javascript'] = array( + '#type' => 'textarea', + '#title' => t('Javascript to initialize hovertips'), + '#description' => t('The script here will be included in every page.'), + '#default_value' => _hovertip_get_javascript(), ); return system_settings_form($form); } @@ -68,10 +63,10 @@ function hovertip_settings_form() { * reliably call drupal_add_css or drupal_add_js from that function. So * instead we call this function from hook_menu. */ -function _hovertip_init() { - drupal_add_css(drupal_get_path('module', 'hovertip').'/hovertip.css'); - drupal_add_js(drupal_get_path('module', 'hovertip') . '/hovertip.js'); - drupal_add_js('?q=hovertip/settings_js'); +function hovertip_init() { + drupal_add_css(drupal_get_path('module', 'hovertip') .'/hovertip.css'); + drupal_add_js(drupal_get_path('module', 'hovertip') .'/hovertip.js'); + drupal_add_js('hovertip/settings_js'); } function hovertip_settings_js() { @@ -79,5 +74,3 @@ function hovertip_settings_js() { print(_hovertip_get_javascript()); return; } - -?> \ No newline at end of file