Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.185
diff -u -r1.185 search.module
--- modules/search/search.module	31 Jul 2006 11:25:54 -0000	1.185
+++ modules/search/search.module	2 Aug 2006 12:01:49 -0000
@@ -218,21 +218,59 @@
   $count = format_plural($remaining, 'There is 1 item left to index.', 'There are %count items left to index.');
   $percentage = ((int)min(100, 100 * ($total - $remaining) / max(1, $total))) . '%';
   $status = '<p><strong>'. t('%percentage of the site has been indexed.', array('%percentage' => $percentage)) .' '. $count .'</strong></p>';
-  $form['status'] = array('#type' => 'fieldset', '#title' => t('Indexing status'));
+  $form['status'] = array('#type' => 'fieldset', '#title' => t('Indexing status'), '#weight' => -4);
   $form['status']['status'] = array('#type' => 'markup', '#value' => $status);
   $form['status']['wipe'] = array('#type' => 'submit', '#value' => t('Re-index site'));
 
   $items = drupal_map_assoc(array(10, 20, 50, 100, 200, 500));
 
   // Indexing throttle:
-  $form['indexing_throttle'] = array('#type' => 'fieldset', '#title' => t('Indexing throttle'));
+  $form['indexing_throttle'] = array('#type' => 'fieldset', '#title' => t('Indexing throttle'), '#weight' => -3);
   $form['indexing_throttle']['search_cron_limit'] = array('#type' => 'select', '#title' => t('Items to index per cron run'), '#default_value' => variable_get('search_cron_limit', 100), '#options' => $items, '#description' => t('The maximum amount of items that will be indexed in one cron run. Set this number lower if your cron is timing out or if PHP is running out of memory.'));
   // Indexing settings:
-  $form['indexing_settings'] = array('#type' => 'fieldset', '#title' => t('Indexing settings'));
+  $form['indexing_settings'] = array('#type' => 'fieldset', '#title' => t('Indexing settings'), '#weight' => -2);
   $form['indexing_settings']['info'] = array('#type' => 'markup', '#value' => '<em>'. t('<p>Changing the settings below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed.</p><p>The default settings should be appropriate for the majority of sites.</p>') .'</em>');
   $form['indexing_settings']['minimum_word_size'] = array('#type' => 'textfield', '#title' => t('Minimum word length to index'), '#default_value' => variable_get('minimum_word_size', 3), '#size' => 5, '#maxlength' => 3, '#description' => t('The number of characters a word has to be to be indexed. A lower setting means better search result ranking, but also a larger database. Each search query must contain at least one keyword that is this size (or longer).'));
   $form['indexing_settings']['overlap_cjk'] = array('#type' => 'checkbox', '#title' => t('Simple CJK handling'), '#default_value' => variable_get('overlap_cjk', TRUE), '#description' => t('Whether to apply a simple Chinese/Japanese/Korean tokenizer based on overlapping sequences. Turn this off if you want to use an external preprocessor for this instead. Does not affect other languages.'));
 
+// Display settings:
+  $form['display_result_settings'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Display results'),
+    '#description' => t('What to display on the results page'),
+    '#collapsible' => FALSE,
+    '#collapsed' => FALSE,
+    '#weight' => -1
+  );
+  $form['display_result_settings']['search_show_date'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Date'),
+    '#default_value' => variable_get('search_show_date', 1),
+    '#description' => t('Show the date in results'),
+    '#weight' => 1
+  );
+  $form['display_result_settings']['search_show_author'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Author'),
+    '#default_value' => variable_get('search_show_author', 1),
+    '#description' => t('Show the author in results'),
+    '#weight' => 2
+  );
+  $form['display_result_settings']['search_show_type'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Node type'),
+    '#default_value' => variable_get('search_show_type', 1),
+    '#description' => t('Show the node type in results'),
+    '#weight' => 3
+  );
+  $form['display_result_settings']['search_show_extras'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Extras'),
+    '#default_value' => variable_get('search_show_extras', 1),
+    '#description' => t('Show any extras in results'),
+    '#weight' => 4
+  ); 
+
   // Per module settings
   $form = array_merge($form, module_invoke_all('search', 'admin'));
 
@@ -1228,16 +1266,16 @@
 function theme_search_item($item, $type) {
   $output = ' <dt class="title"><a href="'. check_url($item['link']) .'">'. check_plain($item['title']) .'</a></dt>';
   $info = array();
-  if ($item['type']) {
+  if ($item['type'] && variable_get('search_show_type', 1)) {
     $info[] = $item['type'];
   }
-  if ($item['user']) {
+  if ($item['user'] && variable_get('search_show_author', 1)) {
     $info[] = $item['user'];
   }
-  if ($item['date']) {
+  if ($item['date'] && variable_get('search_show_date', 1)) {
     $info[] = format_date($item['date'], 'small');
   }
-  if (is_array($item['extra'])) {
+  if (is_array($item['extra']) && variable_get('search_show_extras', 1)) {
     $info = array_merge($info, $item['extra']);
   }
   $output .= ' <dd>'. ($item['snippet'] ? '<p>'. $item['snippet'] . '</p>' : '') . '<p class="search-info">' . implode(' - ', $info) .'</p></dd>';
