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	3 Aug 2006 07:49:11 -0000
@@ -233,6 +233,24 @@
   $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['search_result_settings'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Show in search results'),
+    '#description' => t('Select which additional information, besides title and teaser, should be displayed for each search result.'),
+    '#collapsible' => FALSE,
+    '#collapsed' => FALSE,
+  );
+  $form['search_result_settings']['search_result_display_settings'] = array(
+    '#type' => 'checkboxes',
+    '#default_value' => variable_get('search_result_display_settings', array('date', 'author', 'content_type', 'extras')),
+    '#options' => array(
+      'date' => t('Date'),
+      'author' => t('Author'),
+      'content_type' => t('Content type'),
+      'extras' => t('Module-provided fields'),
+    ),
+  );
   // Per module settings
   $form = array_merge($form, module_invoke_all('search', 'admin'));
 
@@ -1228,16 +1246,19 @@
 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']) {
+
+  $display_settings = variable_get('search_result_display_settings', array('date', 'author', 'content_type', 'extras'));
+
+  if ($item['type'] && $display_settings['content_type']) {
     $info[] = $item['type'];
   }
-  if ($item['user']) {
+  if ($item['user'] && $display_settings['author']) {
     $info[] = $item['user'];
   }
-  if ($item['date']) {
+  if ($item['date'] && $display_settings['date']) {
     $info[] = format_date($item['date'], 'small');
   }
-  if (is_array($item['extra'])) {
+  if (is_array($item['extra']) && $display_settings['extras']) {
     $info = array_merge($info, $item['extra']);
   }
   $output .= ' <dd>'. ($item['snippet'] ? '<p>'. $item['snippet'] . '</p>' : '') . '<p class="search-info">' . implode(' - ', $info) .'</p></dd>';
