--- site_map_old.module	2005-06-05 09:15:53.000000000 -0500
+++ site_map_new.module	2006-02-02 15:10:56.000000000 -0600
@@ -32,21 +32,22 @@ function site_map_perm() {
  * hook_settings() implementation
  */
 function site_map_settings() {
-  $output .= form_textarea(t('Site map message'), 'site_map_message', variable_get('site_map_message', ''), 60, 10, t('Define a message to be displayed above the site map.'));
-  $output .= form_checkbox(t('Show node counts by categories'), 'site_map_show_count', 1, variable_get('site_map_show_count', 1), t('When enabled, this option will show the number of nodes in each taxonomy term.'));
-  $output .= form_checkbox(t('Include RSS links by categories'), 'site_map_show_rss_links', 1, variable_get('site_map_show_rss_links', 1), t('When enabled, this option will show links to the RSS feeds for each category.'));
-  $output .= form_textfield(t('RSS feed depth'), 'site_map_rss_depth', variable_get('site_map_rss_depth', 'all'), 3, 10, t('Specify how many subcategories should be included in the RSS feed.  Enter "all" to include all subcategories or "0" to include no subcategories.'));
-
+  if (!user_access('access administration pages')) {
+    return message_access();
+  }
+  $form['site_map_message'] = array( '#type' => 'textarea', '#title' => t('Site map message'), '#default_value' => variable_get('site_map_message', ''), '#cols' => 60, '#rows' => 10, '#description' => t('Define a message to be displayed above the site map.'));
+  $form['site_map_show_count'] = array( '#type' => 'checkbox', '#title' => t('Show node counts by categories'), '#return_value' => 1, '#default_value' => variable_get('site_map_show_count', 1), '#description' => t('When enabled, this option will show the number of nodes in each taxonomy term.'));
+  $form['site_map_show_rss_links'] = array( '#type' => 'checkbox', '#title' => t('Include RSS links by categories'), '#return_value' => 1, '#default_value' => variable_get('site_map_show_rss_links', 1), '#description' => t('When enabled, this option will show links to the RSS feeds for each category.'));
+  $form['site_map_rss_depth'] = array( '#type' => 'textfield', '#title' => t('RSS feed depth'), '#default_value' => variable_get('site_map_rss_depth', 'all'), '#size' => 3, '#maxlength' => 10, '#description' => t('Specify how many subcategories should be included in the RSS feed.  Enter "all" to include all subcategories or "0" to include no subcategories.'));
+  
   $result = db_query('SELECT vid, name FROM {vocabulary}');
   $value = variable_get('site_map_show_vocabularies', array());
-
   while ($row = db_fetch_object($result)) {
     $options[$row->vid] = $row->name;
   }
-
-  $output .= form_select(t('Categories to include in the site map'), 'site_map_show_vocabularies', $value, $options, NULL, 0, TRUE);
-
-  return $output;
+  $form['site_map_show_vocabularies'] = array( '#type' => 'select', '#title' => t('Categories to include in the site map'), '#default_value' => $value, '#options' => $options, '#description' => NULL, '#extra' => 0, '#multiple' => TRUE);
+  
+  return $form;
 }
 
 /**
