Index: modules/quicktags/quicktags.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/quicktags/quicktags.module,v retrieving revision 1.18 diff -u -r1.18 quicktags.module --- modules/quicktags/quicktags.module 22 Aug 2006 12:18:46 -0000 1.18 +++ modules/quicktags/quicktags.module 9 Oct 2006 12:28:43 -0000 @@ -2,16 +2,6 @@ // $Id: quicktags.module,v 1.18 2006/08/22 12:18:46 ber Exp $ /** - * Implementation of hook_help(). - */ -function quicktags_help($section) { - switch($section) { - case 'admin/modules#description': - return t('Allows Drupal to use quicktags around the textarea for easier user input'); - } -} - -/** * Implementation of hook_perm(). */ function quicktags_perm() { @@ -22,7 +12,6 @@ * Implementation of hook_settings(). */ function quicktags_settings() { - $form['quicktags_options'] = array( '#type' => 'fieldset', '#title' => t('Quicktags options'), @@ -34,9 +23,8 @@ '#options' => array(0 => t('Everywhere'), 1 => t('Only nodes'), 2 => t('Nodes and comments')), '#description' => t('Where to show the quicktags toolbar.'), ); - - - return $form; + + return system_settings_form($form); } /** @@ -44,8 +32,17 @@ */ function quicktags_menu($may_cache) { $items = array(); - - if ($may_cache) { + + if (!$may_cache) { + $items[] = array( + 'path' => 'admin/settings/quicktags', + 'title' => t('Quicktags'), + 'description' => 'Configure Quicktags options.', + 'callback' => 'drupal_get_form', + 'callback arguments' => 'quicktags_settings', + 'access' => user_access('administer site configuration') + ); + } else { $items[] = array( 'path' => 'quicktags', 'callback' => 'quicktags_javascript', @@ -113,12 +110,10 @@ $path = drupal_get_path('module','quicktags'); //Add the stylesheet - $stylesheet = $path .'/quicktags.css'; - drupal_set_html_head(theme_stylesheet_import(base_path() . $stylesheet)); + drupal_add_css($path .'/quicktags.css'); //Add the static file - $javascript = $path .'/quicktags.js'; - drupal_add_js($javascript); + drupal_add_js($path .'/quicktags.js'); //Add the dynamically generated file drupal_add_js('?q=quicktags'); @@ -154,7 +149,7 @@ * location; // optional: onclick action omit the (). */ function quicktags_quicktags_insert() { - $path = base_path() . drupal_get_path('module','quicktags') .'/'; + $path = base_path() . drupal_get_path('module','quicktags') .'/images/'; $items = array( 'ed_italic' => array(