array( 'tag_field' => 'edit-taxonomy-tags-' . $vocabulary_id, ), ), 'setting'); drupal_add_js($path . '/scripts/tag_editor.js'); drupal_add_css($path . '/scripts/tag_editor.css'); } } /** * Implementation of hook_menu(). */ function tag_editor_menu() { $items = array(); $items['admin/settings/tag_editor'] = array( 'title' => t('Tag editor'), 'description' => t('Configure the tag editor for a specific "Tags"-enabled vocabulary.'), 'page callback' => 'drupal_get_form', 'page arguments' => array('tag_editor_settings'), 'access arguments' => array('administer site configuration'), 'type' => MENU_NORMAL_ITEM, ); return $items; } /** * Menu callback; Returns settings form. */ function tag_editor_settings() { $form = array(); $form['tag_editor_tag_field'] = array( '#type' => 'textfield', '#title' => t('Vocabulary ID'), '#prefix' => '
', '#suffix' => '
', '#description' => t('Configure the tag editor for a specific "Tags"-enabled vocabulary.'), '#default_value' => variable_get('tag_editor_tag_field', NULL), '#required' => TRUE, '#size' => 2, ); return system_settings_form($form); }