=== modified file 'sites/all/modules/import_html/coders_php_library/tidy-functions.inc'
--- sites/all/modules/import_html/coders_php_library/tidy-functions.inc	2009-10-30 14:42:06 +0000
+++ sites/all/modules/import_html/coders_php_library/tidy-functions.inc	2010-01-26 04:03:39 +0000
@@ -242,8 +242,8 @@
     $form['HTMLTidy_status']=array(
       '#value' => t("<p>HTMLTidy is present and correct: %message </p>", array('%message' => $warning ) )
     );
-    $form['HTMLTidy']['#collapsible'] = TRUE;
-    $form['HTMLTidy']['#collapsed'] = TRUE;
+//    $form['HTMLTidy']['#collapsible'] = TRUE;
+//    $form['HTMLTidy']['#collapsed'] = TRUE;
   }
 
   $form['HTMLTidy']['htmltidy_apppath'] = array(

=== modified file 'sites/all/modules/import_html/import_html.module'
--- sites/all/modules/import_html/import_html.module	2010-01-25 04:39:34 +0000
+++ sites/all/modules/import_html/import_html.module	2010-01-26 21:27:20 +0000
@@ -136,62 +136,74 @@
   $items[IMPORT_HTML_ADMIN_PATH] = array(
     'title' => 'Import HTML',
     'description' => "Import/Export an entire site or directory to/from static HTML",
-
+/*
     // Use the built-in Overview menu thing
     'page callback' => 'system_admin_menu_block_page',
     'file' => 'system.admin.inc',
     'file path' => drupal_get_path('module', 'system'),
-
+*/
+    'page callback' => 'import_html_profiles_page',
+    'file' => 'import_html_ui.inc',
     'access arguments' => array('access import_html'),
     'type' => MENU_NORMAL_ITEM,
   );
-  $items[IMPORT_HTML_ADMIN_PATH .'/settings'] = array(
-    'title' => 'Import HTML Settings',
-    'description' => 'Adjust the import_html options and settings.',
-    'page callback' => 'drupal_get_form',
-    'file' => 'import_html_ui.inc',
+// This also goes to the 'entry page' now (instead of the import page)
+  $items[IMPORT_HTML_ADMIN_PATH .'/import_site'] = array(
+    'title' => 'Profiles',
+    'description' => "Import/Export an entire site or directory to/from static HTML",
     'weight' => 1,
-    'page arguments' => array('import_html_admin_settings'),
-    'access arguments' => array('administer site configuration'),
-    'type' => MENU_NORMAL_ITEM,
+    'page callback' => 'import_html_profiles_page',
+    'file' => 'import_html_ui.inc',
+    'access arguments' => array('access import_html'),
+    'type' => MENU_LOCAL_TASK,
   );
+  // Only keep this as a callback, for the time being
   $items[IMPORT_HTML_ADMIN_PATH .'/profile'] = array(
-    'title' => 'Manage profiles',
+    'title' => 'Edit Profile', // This title also goes into the individual profile edit screen. Look at later.
     'description' => 'Edit multiple import profiles.',
     'page callback' => 'import_html_profiles_page',
     'file' => 'import_html_ui.inc',
-    'weight' => 2,
     'access arguments' => array('administer site configuration'),
-    'type' => MENU_NORMAL_ITEM,
+    'type' => MENU_CALLBACK,
   );
-  $items[IMPORT_HTML_ADMIN_PATH .'/import_site'] = array(
+  $items[IMPORT_HTML_ADMIN_PATH .'/import_site/%'] = array(
     'title' => 'Import HTML Site',
     'description' => "Import/Export an entire site to/from static HTML",
-    'weight' => -1,
+//    'weight' => -1,
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('import_html_process_form'),
+    'page arguments' => array('import_html_process_form', 4),
     'file' => 'import_html_ui.inc',
     'access arguments' => array('access import_html'),
-    'type' => MENU_NORMAL_ITEM,
+    'type' => MENU_CALLBACK,
   );
   $items[IMPORT_HTML_ADMIN_PATH .'/demo'] = array(
     'title' => 'Demo',
-    'weight' => 3,
+    'weight' => 2,
     'description' => 'Demonstrate or test HTML Import on one file.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('import_html_demo_form'),
     'file' => 'import_html_ui.inc',
     'access arguments' => array('access import_html'),
-    'type' => MENU_NORMAL_ITEM,
+    'type' => MENU_LOCAL_TASK,
   );
   $items[IMPORT_HTML_ADMIN_PATH .'/results'] = array(
     'title' => 'Import Results Summary',
-    'weight' => 5,
+    'weight' => 3,
     'description' => "View log of recent import messages",
     'page callback' => 'import_html_results',
     'file' => 'import_html_ui.inc',
     'access arguments' => array('access import_html'),
-    'type' => MENU_NORMAL_ITEM,
+    'type' => MENU_LOCAL_TASK,
+  );
+  $items[IMPORT_HTML_ADMIN_PATH .'/settings'] = array(
+    'title' => 'Settings',
+    'description' => 'Adjust the import_html options and settings.',
+    'page callback' => 'drupal_get_form',
+    'file' => 'import_html_ui.inc',
+    'weight' => 4,
+    'page arguments' => array('import_html_admin_settings'),
+    'access arguments' => array('administer site configuration'),
+    'type' => MENU_LOCAL_TASK,
   );
 
   return $items ? $items : array();
@@ -215,26 +227,14 @@
 function import_html_help($path, $arg) {
   switch ($path) {
     case 'admin/build/modules#description' :
-      return t("Import/Export an entire site to/from static HTML");
     case 'admin/build/modules/import_html' :
       return t("Import/Export an entire site to/from static HTML");
     case 'admin/help#import_html' :
       return file_get_contents(drupal_get_path("module", "import_html") ."/help/import_html_help.html");
     case IMPORT_HTML_ADMIN_PATH :
-      return l("DO check the help page, this is a complex process", 'admin/help/import_html');
+    case 'admin/build/import_html/import_site' :
     case 'admin/settings/import_html' :
       return l("DO check the help page, this is a complex process", 'admin/help/import_html');
-    case 'admin/build/import_html/import_site' :
-      $output = t("<p>
-          For background, remember to read <a href='!help_link'>the Import Html help page</a>.
-          The <a href='!settings_link'>settings page</a> contains the config options.
-        </p>",
-        array(
-          '!help_link' => url('admin/help/import_html'),
-          '!settings_link' => url(IMPORT_HTML_ADMIN_PATH .'/settings'),
-        )
-      );
-      return $output;
 
     case 'admin/build/import_html/demo' :
       return t("<p>

=== modified file 'sites/all/modules/import_html/import_html_ui.inc'
--- sites/all/modules/import_html/import_html_ui.inc	2010-01-25 04:39:34 +0000
+++ sites/all/modules/import_html/import_html_ui.inc	2010-01-26 22:13:59 +0000
@@ -25,11 +25,9 @@
 // SETTINGS and PROFILES
 
 /**
- * Display the import_html options and settings.
+ * Display the import_html settings.
  *
  * Settings menu callback
- *
- * Display the default profile
  */
 function import_html_admin_settings($form_state) {
 
@@ -58,28 +56,8 @@
   // Warn, fix a known problem with large batch jobs.
   import_html_check_max_allowed_packet();
 
-  $profile_id = import_html_current_profile_id();
-  $form['default_profile'] = import_html_profile_settings($form_state, $profile_id);
-  $form['#submit'][] = 'import_html_profile_settings_submit';
-  $form['#validate'][] = 'import_html_profile_settings_validate';
-
-
-  $form['import_html_proceed'] = array(
-    '#type' => 'submit',
-    '#value' => t("Proceed to import"),
-    '#submit' => array('import_html_goto_process'),
-    '#prefix' => '<br/>',
-    #'#attributes' => array('style' => 'font-size:2em;'),
-    '#attributes' => array('style' => 'font-size:2em; height:2.4em; margin-top:0em'),
-  );
-
-  // Links to other profiles
-  $form['other_profiles'] = array(
-    '#type' => 'markup',
-    '#value' => '<h3>'. t('Other Profiles:') .'</h3>'. import_html_profiles_page(),
-  );
 
-  return $form;
+  return system_settings_form($form);
 }
 
 /**
@@ -145,23 +123,30 @@
  */
 function import_html_profiles_page($profile_id = NULL) {
   if (!$profile_id) {
+    $admin_access = user_access('administer site configuration');
+
     // Just return links to all other profiles
     $import_html_profiles = variable_get('import_html_profiles', array());
-    $links = array();
+    $rows = array();
     foreach ($import_html_profiles as $profile_id => $profile) {
-      $links[] = array(
-        'title' => $profile_id,
-        'href' => IMPORT_HTML_ADMIN_PATH .'/profile/'. $profile_id,
-      );
+      $rows[] = array(l($profile_id, IMPORT_HTML_ADMIN_PATH .'/import_site/'. $profile_id),
+        ($admin_access ? l('edit profile', IMPORT_HTML_ADMIN_PATH .'/profile/'. $profile_id) . '&nbsp;&nbsp;&nbsp;&nbsp;' : '')
+          . l('import HTML site', IMPORT_HTML_ADMIN_PATH .'/import_site/'. $profile_id));
+    }
+    $header = array(t('Profile'), t('Actions'));
+    $output = theme('table', $header, $rows);
+    $output .= l('New profile', IMPORT_HTML_ADMIN_PATH .'/profile/new');
+  }
+  else {
+    // Render profile form
+    if ((isset($_POST['op']) && $_POST['op'] == t('Delete')) || !empty($_POST['confirm'])) {
+      $output = drupal_get_form('import_html_profile_settings_confirm_delete', $profile_id);
+    }
+    else {
+      $output = drupal_get_form('import_html_profile_settings', $profile_id);
     }
-    $links[] = array(
-      'title' => t('New'),
-      'href' => IMPORT_HTML_ADMIN_PATH .'/profile/'.'new',
-    );
-    return theme('links', $links);
   }
-  // Else, render this given profile
-  return drupal_get_form('import_html_profile_settings', $profile_id);
+  return $output;
 }
 
 
@@ -180,14 +165,15 @@
   }
 
   $form = array();
+/*No need for a summary on top of the edit screen. The settings are already there.
   if ($profile_id != 'new') {
     $form['summary'] = array('#value' => import_html_profile_summary($profile));
-  }
+  }*/
   $form['profile_id'] = array(
     '#title' => t("Profile ID"),
     '#type' => 'textfield',
     '#required' => TRUE,
-    '#default_value' => $profile_id,
+    '#default_value' => $profile_id == 'new' ? '' : $profile_id,
   );
   if ($profile_id != 'new') {
     $form['profile_id']['#default_value'] = $profile_id;
@@ -201,7 +187,7 @@
     '#type' => 'fieldset',
     '#title' => t('Import and Content Analysis Options'),
     '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
+    //'#collapsed' => TRUE,
   );
   $form['extraction'][] = array(
     '#value' => '<p>'. t("How the content is extracted from the source documents.") .'</p>',
@@ -340,7 +326,7 @@
     '#type' => 'fieldset',
     '#title' => t("Replication Options"),
     '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
+    //'#collapsed' => TRUE,
   );
   $form['replication'][] = array(
     '#value' => '<p>'. t("How and where the imported content is reproduced on this site.") .'</p>',
@@ -479,13 +465,15 @@
     "),
   );
 
-  $vocabs = taxonomy_get_vocabularies();
   $freetagging_vocabs = array(0 => t('<none>'));
+  if (module_exists('taxonomy')) {
+    $vocabs = taxonomy_get_vocabularies();
   foreach ($vocabs as $vid => $vocab) {
     if ($vocab->tags) {
       $freetagging_vocabs[$vid] = $vocab->name;
     }
   }
+  }
 
   $form['replication']['freetag_vocab'] = array(
     '#title' => t('Absorb keywords as tags'),
@@ -508,7 +496,7 @@
     '#type' => 'fieldset',
     '#title' => t("Advanced Import Tuning"),
     '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
+    //'#collapsed' => TRUE,
   );
 
   $form['advanced']["help"] = array(
@@ -610,10 +598,9 @@
   );
   $form['delete'] = array(
     '#type' => 'submit',
-    '#value' => t('Delete Profile'),
-    '#submit' => array('import_html_profile_settings_delete'),
+    '#value' => t('Delete'),
   );
-//  $form['#redirect'] = IMPORT_HTML_ADMIN_PATH .'/profile';
+  $form['#redirect'] = IMPORT_HTML_ADMIN_PATH;
 
   return $form;
 }
@@ -654,7 +641,7 @@
       '%import_html_current_subsection' => variable_get('import_html_current_subsection', ""),
       '!dest_virtual_path' => l($dest_virtual_path, $dest_virtual_path ),
       '!dest_file_root' => l($dest_file_root, $dest_file_root),
-      '!settings_url' => url(IMPORT_HTML_ADMIN_PATH .'/settings'),
+      '!settings_url' => url(IMPORT_HTML_ADMIN_PATH .'/profile/' . $profile['profile_id']),
       '!translation_template' => l(basename($profile['translation_template']), $profile['translation_template']),
       '%default_document' => $profile['default_document'],
       '%create_menus' => $profile['create_menus']?'will':'will not',
@@ -782,17 +769,21 @@
 }
 
 /**
- * Form button handler
+ * Form callback
+ */
+function import_html_profile_settings_confirm_delete($form, $profile_id) {
+  return confirm_form(array(), t('Are you sure you want to delete the profile %name?', array('%name' => $profile_id)), 'admin/build/import_html', NULL, t('Delete'), t('Cancel'));
+}
+
+/**
+ * Form submit handler
  */
-function import_html_profile_settings_delete($form, &$form_state) {
+function import_html_profile_settings_confirm_delete_submit($form, &$form_state) {
   import_html_profile($form_state['values']['profile_id'], FALSE);
   drupal_set_message(t('%profile_id Profile Deleted', array('%profile_id' => $form_state['values']['profile_id'])));
-  drupal_goto(IMPORT_HTML_ADMIN_PATH .'/profile');
-
-  return;
+  // will redirect to path set in confirm_form()
 }
 
-
 /**
  * This is a subset of the general settings - these options are also reproduced
  * on later action pages where they can be tweaked closer to the action. So
@@ -944,7 +935,7 @@
  *
  * Parameters and return as per usual with FAPI
  */
-function import_html_process_form(&$form_state) {
+function import_html_process_form(&$form_state, $profile_id = NULL) {
   $form = array();
   $steps = 3;
 
@@ -958,7 +949,13 @@
 
   $form['title'] = array('#value' => t('<h3>Step %step of %steps</h3>', array('%step' => $form_state['storage']['step'], '%steps' => $steps)));
 
-  $profile_id = isset($form_state['values']['profile_id']) ? $form_state['values']['profile_id'] : import_html_current_profile_id();
+  if (isset($form_state['values']['profile_id'])) {
+    // Form state gets preference over function argument
+    $profile_id = $form_state['values']['profile_id'];
+  }
+  elseif (empty($profile_id)) {
+    $profile_id = import_html_current_profile_id();
+  }
   $profile = import_html_profile($profile_id);
   // Display this on every page - help knowing just what's happening
   $form['profile_info'] = array(
@@ -1004,24 +1001,25 @@
 
       $import_html_profiles = variable_get('import_html_profiles', array());
       $profile_options = array_combine(array_keys($import_html_profiles), array_keys($import_html_profiles));
-      $form['profile_id'] = array(
+/*      $form['profile_id'] = array(
         '#type' => 'select',
         '#title' => 'Import settings profile',
         '#options' => $profile_options,
         '#default_value' => $profile_id,
       );
+      */
+      $form['profile_id'] = array('#type' => 'value', '#value' => $profile_id);
       $form['#submit'][] = 'import_html_profile_switcher_submit';
 
+      $form['summary'] = array('#value' => import_html_profile_summary($profile) ) ;
 
       // Also allow last-minute or transient profile settings adjustments
       $form['import_html_settings'] = import_html_subsettings_form($profile);
       $form['import_html_settings']['#type'] = 'fieldset';
-      $form['import_html_settings']['#title'] = t("More Settings");
+      $form['import_html_settings']['#title'] = t("Overrideable Profile Settings");
       $form['import_html_settings']['#collapsible'] = TRUE;
       $form['import_html_settings']['#collapsed'] = TRUE;
 
-      $form['summary'] = array('#value' => import_html_profile_summary($profile) ) ;
-
       if (!module_exists('path')) {
         drupal_set_message(t("The <b>path</b> module is not enabled! If you try to import pages without paths, I can do it, but links won't work and you'll find it hard to find the pages again.'"), 'warning');
       }

