? mw.patch
? tmp.patch
Index: excerpt.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/excerpt/excerpt.info,v
retrieving revision 1.2
diff -u -F^f -p -r1.2 excerpt.info
--- excerpt.info	13 Apr 2007 21:32:27 -0000	1.2
+++ excerpt.info	11 Nov 2008 04:54:50 -0000
@@ -1,3 +1,4 @@
 ; $Id $
 name = Excerpt
 description = Allows users to manually control the teaser for a node.
+core = 6.x
Index: excerpt.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/excerpt/excerpt.module,v
retrieving revision 1.12
diff -u -F^f -p -r1.12 excerpt.module
--- excerpt.module	27 Mar 2008 11:54:15 -0000	1.12
+++ excerpt.module	11 Nov 2008 04:54:51 -0000
@@ -40,13 +40,8 @@ function excerpt_nodeapi(&$node, $op, $a
 /**
  * Implementation of hook_form_alter().
  */
-function excerpt_form_alter($form_id, &$form) {
-  if ($form_id == 'node_type_form' && isset($form['identity']['type'])) {
-    $form['workflow']['excerpt'] = array(
-      '#type' => 'fieldset',
-      '#title' => t('Excerpt'),
-      '#weight' => 0,
-    );
+function excerpt_form_alter(&$form, $form_state, $form_id) {
+  if ($form_id == 'node_type_form') {
     $form['workflow']['excerpt']['excerpt'] = array(
       '#type' => 'radios',
       '#title' => t('Teaser'),
@@ -54,21 +49,59 @@ function excerpt_form_alter($form_id, &$
       '#options' => array(t('Auto-generated'), t('Manual excerpt')),
       '#description' => t('Choose whether the node teaser must be generated automatically or manually entered by the author.'),
     );
+    if (!module_exists('content')) {
     $form['workflow']['excerpt']['excerpt_wt'] = array(
       '#type' => 'weight',
       '#title' => t('Weight of Teaser field'),
       '#default_value' => variable_get('excerpt_wt_'. $form['#node_type']->type, 0),
     );
   }
-  else if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id && variable_get('excerpt_'. $form['type']['#value'], 1)) {
+  }
+  else if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) {
     $form['teaser'] = array(
       '#type' => 'textarea',
       '#title' => t('Teaser'),
       '#default_value' => $form['#node']->teaser,
       '#cols' => 60,
       '#rows' => 6,
-      '#weight' => variable_get('excerpt_wt_'. $form['type']['#value'], 0),
+      '#weight' => module_exists('content') ? content_extra_field_weight($form['type']['#value'], 'teaser') : variable_get('excerpt_wt_'. $form['type']['#value'], 0),
       '#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.'),
     );
+
+    $form['body_field']['body']['#default_value'] = $form['#node']->body;
+
+    if(isset($form['body_field']['teaser_js'])) {
+      unset($form['body_field']['teaser_js']);
+      unset($form['body_field']['teaser_include']);
+
+      if(!empty($form['body_field']['#after_build'])) {
+        if ($id = array_search('node_teaser_js', $form['body_field']['#after_build'])) {
+          unset($form['body_field']['#after_build'][$id]);
+        }
+        if($id = array_search('node_teaser_include_verify', $form['body_field']['#after_build'])) {
+          unset($form['body_field']['#after_build'][$id]);
+        }
+      }
+    }
+  }
+}
+
+
+/**
+ * Implementation of hook_content_extra_fields.
+ */
+function excerpt_content_extra_fields($type_name) {
+  $type = node_get_types('type', $type_name);
+  $extra = array();
+
+  if (variable_get('excerpt_'. $type_name, 1)) {
+    $extra['teaser'] = array(
+      'label' => t('Excerpt'),
+      'description' => t('Manual excerpt'),
+      'weight' => variable_get('excerpt_wt_'. $type_name, 0),
+    );
   }
+
+  return $extra;
 }
+
