'fieldset', '#title' => 'Help Link Tooltips', '#collapsible' => TRUE, '#collapsed' => TRUE, ); $form['beautytips_help']['beautytips_drupal_help'] = array( '#type' => 'checkbox', '#title' => 'Display Help link popups', '#default_value' => variable_get('beautytips_drupal_help', FALSE), ); if (module_exists('advanced_help')) { $form['beautytips_help']['beautytips_advanced_help'] = array( '#type' => 'checkbox', '#title' => 'Display Advanced Help link popups', '#default_value' => variable_get('beautytips_advanced_help', FALSE), ); } return $form; } /** * Implementation of hook_menu_alter() */ function beautytips_drupal_help_menu_change(&$items) { if (variable_get('beautytips_drupal_help', FALSE)) { $items['admin/help']['page callback'] = 'beautytips_drupal_help_main'; $items['admin/help']['file path'] = drupal_get_path('module', 'beautytips') . '/includes'; $items['admin/help']['file'] = 'drupal_help.inc'; } } /** * Menu callback; prints a page listing a glossary of Drupal terminology. * Beautytips added for the help links */ function beautytips_drupal_help_main() { // Add in beautytips on page - admin/help $options['bt_drupal_help_page'] = array( 'cssSelect' => '.help-items li a', 'ajaxPath' => array(0 => "$(this).attr('href')", 1 => '.clear-block p'), 'trigger' => array(0 => 'mouseover', 1 => 'click'), 'width' => 350, ); beautytips_add_beautytips($options); require_once drupal_get_path('module', 'help') . '/help.admin.inc'; // Add CSS $help_path = drupal_get_path('module', 'help'); drupal_add_css($help_path .'/help.css', 'module', 'all', FALSE); $output = '
'. t('Help is available on the following items:') .'
'. help_links_as_list(); return $output; } /** * Implementation of hook_theme_registry_alter */ function beautytips_drupal_help_theme_change(&$theme_registry) { if (module_exists('help') && variable_get('beautytips_drupal_help', FALSE)) { // Override theme_more_help_link for more-help stuff $theme_registry['more_help_link']['function'] = 'theme_beautytips_drupal_help_more_help_link'; $theme_registry['more_help_link']['file'] = drupal_get_path('module', 'beautytips') . '/includes/drupal_help.inc'; } if (module_exists('advanced_help') && variable_get('beautytips_advanced_help', FALSE)) { // Override theme_advanced_help_topic for advanced help $theme_registry['advanced_help_topic']['function'] = 'theme_beautytips_advanced_help_topic'; $theme_registry['advanced_help_topic']['file'] = drupal_get_path('module', 'beautytips') . '/includes/drupal_help.inc'; } } /** * Returns code that emits the 'more help'-link. * Overrides theme_more_help_link */ function theme_beautytips_drupal_help_more_help_link($url) { $options = array(); $options['bt_drupal_help'] = array( 'cssSelect' => '.more-help-link a', 'ajaxPath' => array(0 => "$(this).attr('href')", 1 => '.clear-block p'), 'trigger' => array(0 => 'mouseover', 1 => 'click'), 'width' => 350, ); beautytips_add_beautytips($options); return '