Index: taxonomy_list.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_list/taxonomy_list.module,v
retrieving revision 1.8
diff -U3 -r1.8 taxonomy_list.module
--- taxonomy_list.module	7 Dec 2006 05:35:50 -0000	1.8
+++ taxonomy_list.module	31 Jan 2007 19:33:06 -0000
@@ -12,11 +12,8 @@
 function taxonomy_list_help($section) {
   switch ($section) {
     case 'admin/help#taxonomy_list':
-      $output = '<p>'. t('The taxonomy module is one of the most popular features because users often want to create categories to organize content by type. This module enable the page to display the list of items in each category.') .'</p>';
+      $output = '<p>'. t('The <em>Taxonomy List</em> module adds pages that list all terms in a vocabulary (category). In addition, when the <em>Taxonomy Image</em> module is installed, these lists can include an icon for each term.') .'</p>';
       return $output;
-
-    case 'admin/modules#description':
-      return t('Enables the list of content categories (A.K.A. the Taxonomy).');
   }
 }

@@ -33,13 +30,23 @@
 function taxonomy_list_menu($may_cache) {
   $items = array();

-  $items[] = array('path' => 'taxonomy/vocabulary',
-    'title' => t(""),
-    'callback' => 'taxonomy_list_show',
-    'access' => user_access('access content'),
-    'type' => MENU_CALLBACK);
-
   if ($may_cache) {
+    $items[] = array(
+      'path'               => 'admin/settings/taxonomy-list',
+      'title'              => t('Taxonomy List'),
+      'description'        => t('Customize the way Taxonomy List displays terms on vocabulary pages.'),
+      'callback'           => 'drupal_get_form',
+      'callback arguments' => array('taxonomy_list_admin_settings'),
+      'access'             => user_access('administer site configuration'),
+      'type'               => MENU_NORMAL_ITEM,
+    );
+    $items[] = array(
+      'path'     => 'taxonomy/vocabulary',
+      'title'    => t(''),
+      'callback' => 'taxonomy_list_show',
+      'access'   => user_access('access content'),
+      'type'     => MENU_CALLBACK,
+    );
     $vocabs = taxonomy_get_vocabularies();
     foreach ($vocabs as $v)
     {
@@ -56,25 +63,18 @@
 }

 /**
- * Implementation of hook_settings().
+ * Menu callback; presents the admin settings form.
  */
-function taxonomy_list_settings() {
+function taxonomy_list_admin_settings() {

-  $form['info']['taxonomy_list_info'] = array(
-    '#type'  => 'item',
+  $form['taxonomy_list_info'] = array(
     '#value' => t('<p>The taxonomy_list module enable the URL to browse into each vocabulary, using the format of :</p>')
              .  t('<code>"taxonomy/vocabulary/&lt;vid&gt;"</code>')
              .  t('<p>Together with the taxonomy_image.module, the list can be displayed with a image icon.</p>')
   );

-  $form['settings'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Settings'),
-    '#collapsible' => FALSE,
-  );
-
-  $form['settings']['taxonomy_list_list_mode'] = array(
-    '#type' => 'select',
+  $form['taxonomy_list_list_mode'] = array(
+    '#type' => 'radios',
     '#title' => t('List Mode'),
     '#default_value' => variable_get('taxonomy_list_list_mode', 0),
     '#options' => array(
@@ -86,39 +86,39 @@
                     . t('<li>Hierarchical - Subcategories as a table inside their parent\'s cell</li>')
                     . t('<li>Flat - All terms are listed as the same level in the grid</li>')
                     . t('</ul'),
-  );
+  );

-  $form['settings']['taxonomy_list_cell_per_row'] = array(
+  $form['taxonomy_list_cell_per_row'] = array(
     '#type' => 'textfield',
     '#title' => t('Terms per row'),
     '#default_value' => variable_get('taxonomy_list_cell_per_row', 2),
     '#description' => t('Number of terms to be displayed on the same row.'),
-  );
+  );

-  $form['settings']['taxonomy_list_txt_blk_attr'] = array(
+  $form['taxonomy_list_txt_blk_attr'] = array(
     '#type' => 'textfield',
     '#title' => t('Text attributes'),
     '#default_value' => variable_get('taxonomy_list_txt_blk_attr', ''),
     '#description' => t('Identify the HTML attributes for the &lt;div&gt; block of the term name and description text.'),
-  );
+  );

-  if ( module_exists('taxonomy_image') ) {
-    $form['settings']['taxonomy_list_show_image'] = array(
+  if (module_exists('taxonomy_image')) {
+    $form['taxonomy_list_show_image'] = array(
       '#type' => 'checkbox',
       '#title' => t('Show taxonomy image?'),
       '#default_value' => variable_get('taxonomy_list_show_image', 1),
       '#description' => t('Display the taxonomy image? (taxonomy_image.module is required) If disabled, following configurations will be ignored'),
-    );
+    );

-    $form['settings']['taxonomy_list_img_blk_attr'] = array(
+    $form['taxonomy_list_img_blk_attr'] = array(
       '#type' => 'textfield',
       '#title' => t('Image attributes'),
       '#default_value' => variable_get('taxonomy_list_img_blk_attr', 'align="left"'),
       '#description' => t('Identify the HTML attributes for the &lt;div&gt; block of the image.'),
-    );
+    );
   }

-  return $form;
+   return system_settings_form($form);
 }

 /**
