Index: excerpt.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/excerpt/excerpt.module,v
retrieving revision 1.5
diff -u -F^f -r1.5 excerpt.module
--- excerpt.module	23 Apr 2005 03:37:00 -0000	1.5
+++ excerpt.module	29 Dec 2005 06:07:15 -0000
@@ -12,24 +12,40 @@ function excerpt_help($section) {
 
 function excerpt_nodeapi(&$node, $op, $arg) {
   switch ($op) {
-    case 'settings':
-      return form_radios(t('Teasers'), "excerpt_$node->type", variable_get("excerpt_$node->type", 1), array(t('Auto-generated'), t('Manual excerpt')), t('Choose whether teasers are generated automatically or can be entered manually by the author.'));
-    case 'form post':
-      if (variable_get("excerpt_$node->type", 1)) {
-        $output = form_textarea(t('Excerpt'), 'teaser', $node->teaser, 60, 10, t('Enter an excerpt for this item. It will be shown on listing pages along with a <em>read more</em> link which leads to the full view. Leave empty to auto-generate one from the body.'));
-      }
-      break;
     case 'validate':
       if (trim($node->teaser) == '') {
         $node->teaser = node_teaser($node->body);
       }
       break;
-    case 'view':
-      $node->readmore = $node->teaser !== $node->body;
-      break;
   }
-
-  return $output;
 }
 
-?>
\ No newline at end of file
+function excerpt_form_alter($form_id, &$form) {
+  if (isset($form['type'])) {
+    
+    if ($form['type']['#value'] .'_node_settings' == $form_id) {
+      $form['excerpt'] = array('#type' => 'fieldset', '#title' => t('Excerpt'));
+      $form['excerpt']['excerpt_options_'. $form['type']['#value']] = array(
+        '#type' => 'radios',
+        '#title' => t('Teasers'),
+        '#default_value' => variable_get("excerpt_$node->type", 1),
+        '#options' => array(t('Auto-generated'), t('Manual excerpt')),
+        '#description' => t('Choose whether teasers are generated automatically or can be entered manually by the author.')
+      );
+    }
+  
+    if ($form['type']['#value'] .'_node_form' == $form_id && variable_get('excerpt_options_'. $node->type, 1)) {
+      $node = $form['#node'];
+      $form['teaser'] = array(
+        '#type' => 'textarea',
+        '#title' => t('Teaser'),
+        '#default_value' => $node->teaser,
+        '#cols' => 60,
+        '#rows' => 5,
+        '#weight' => -17.5,
+        '#description' => t('Enter an excerpt for this item. It will be shown on listing pages along with a <em>read more</em> link which leads to the full view. Leave empty to auto-generate one from the body.')
+      );
+    }
+  
+  }
+}
\ No newline at end of file
