Index: excerpt.module
===================================================================
--- excerpt.module	(revision 554)
+++ excerpt.module	(working copy)
@@ -2,10 +2,61 @@
 // $Id: excerpt.module,v 1.6.4.3 2008/03/27 11:34:50 smk Exp $
 
 /**
+ * Implementation of hook_menu().
+ */
+function excerpt_menu($may_cache) {
+  $items = array();
+  if ($may_cache) {
+		$items[] = array(
+			'path' => 'admin/settings/excerpt',
+			'title' => t('Excerpt'),
+			'description' => t('Set weight option for excerpts on edit pages.'),
+			'callback' => 'drupal_get_form',
+			'callback arguments' => array('excerpt_admin_settings'),
+			'access' => user_access('administer site configuration'),
+			'type' => MENU_NORMAL_ITEM,
+		);
+  }
+  return $items;
+}
+
+
+/**
+ * Module configuration settings
+ * @return settings HTML or deny access
+ */
+function excerpt_admin_settings() {
+  $form['excerpt_default'] = array(
+    '#type' => 'radios',
+    '#title' => t('Teaser'),
+    '#default_value' => variable_get('excerpt_default', 1),
+    '#options' => array(t('Auto-generated'), t('Manual excerpt')),
+    '#description' => t('Set a global default for whether node teasers must be generated automatically or manually entered by the author.'),
+  );
+  $form['excerpt_weight'] = array(
+    '#type' => 'weight',
+    '#title' => t('Weight'),
+    '#default_value' => variable_get("excerpt_weight", 0),
+    '#description' => t('Set a global default for the excerpt weight. Heavier items will sink and the lighter ones will be positioner nearer the top.'),
+    '#required' => FALSE,
+  );
+  $form['excerpt_required'] = array(
+    '#type' => 'radios',
+    '#title' => t('Require excerpt field to be filled in'),
+    '#default_value' => variable_get("excerpt_required", 0),
+    '#description' => t('Set a global default for whether a manually entered teaser is required or not.'),
+    '#options' => array(t('No'), t('Yes')),
+    '#required' => FALSE,
+    '#weight' => 0,
+  );
+  return system_settings_form($form);
+}
+
+/**
  * Implementation of hook_nodeapi().
  */
 function excerpt_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
-  if (variable_get('excerpt_'. $node->type, 1)) {
+  if (variable_get('excerpt_'. $node->type, variable_get('excerpt_default', 1))) {
     switch ($op) {
       case 'submit':
         // Due to the presence of the teaser field in the node form,
@@ -50,24 +101,32 @@
     $form['workflow']['excerpt']['excerpt'] = array(
       '#type' => 'radios',
       '#title' => t('Teaser'),
-      '#default_value' => variable_get('excerpt_'. $form['#node_type']->type, 1),
+      '#default_value' => variable_get('excerpt_'. $form['#node_type']->type, variable_get('excerpt_default', 1)),
       '#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.'),
     );
     $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),
+      '#default_value' => variable_get('excerpt_wt_'. $form['#node_type']->type, variable_get("excerpt_weight", 0)),
     );
+    $form['workflow']['excerpt']['excerpt_req'] = array(
+      '#type' => 'radios',
+      '#title' => t('Excerpt required?'),
+      '#options' => array(t('No'), t('Yes')),
+      '#default_value' => variable_get('excerpt_req_'. $form['#node_type']->type, variable_get("excerpt_required", 0)),
+      '#description' => t('Choose whether a manually entered excerpt is optional or mandatory.'),
+    );
   }
-  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 && variable_get('excerpt_'. $form['type']['#value'], variable_get('excerpt_default', 1))) {
     $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),
+      '#required' => variable_get('excerpt_req_'. $form['type']['#value'], variable_get("excerpt_required", FALSE)),
+      '#weight' => variable_get('excerpt_wt_'. $form['type']['#value'], variable_get("excerpt_weight", 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.'),
     );
   }
Index: excerpt.module
===================================================================
--- excerpt.module	(revision 554)
+++ excerpt.module	(working copy)
@@ -2,10 +2,61 @@
 // $Id: excerpt.module,v 1.6.4.3 2008/03/27 11:34:50 smk Exp $
 
 /**
+ * Implementation of hook_menu().
+ */
+function excerpt_menu($may_cache) {
+  $items = array();
+  if ($may_cache) {
+		$items[] = array(
+			'path' => 'admin/settings/excerpt',
+			'title' => t('Excerpt'),
+			'description' => t('Set weight option for excerpts on edit pages.'),
+			'callback' => 'drupal_get_form',
+			'callback arguments' => array('excerpt_admin_settings'),
+			'access' => user_access('administer site configuration'),
+			'type' => MENU_NORMAL_ITEM,
+		);
+  }
+  return $items;
+}
+
+
+/**
+ * Module configuration settings
+ * @return settings HTML or deny access
+ */
+function excerpt_admin_settings() {
+  $form['excerpt_default'] = array(
+    '#type' => 'radios',
+    '#title' => t('Teaser'),
+    '#default_value' => variable_get('excerpt_default', 1),
+    '#options' => array(t('Auto-generated'), t('Manual excerpt')),
+    '#description' => t('Set a global default for whether node teasers must be generated automatically or manually entered by the author.'),
+  );
+  $form['excerpt_weight'] = array(
+    '#type' => 'weight',
+    '#title' => t('Weight'),
+    '#default_value' => variable_get("excerpt_weight", 0),
+    '#description' => t('Set a global default for the excerpt weight. Heavier items will sink and the lighter ones will be positioner nearer the top.'),
+    '#required' => FALSE,
+  );
+  $form['excerpt_required'] = array(
+    '#type' => 'radios',
+    '#title' => t('Require excerpt field to be filled in'),
+    '#default_value' => variable_get("excerpt_required", 0),
+    '#description' => t('Set a global default for whether a manually entered teaser is required or not.'),
+    '#options' => array(t('No'), t('Yes')),
+    '#required' => FALSE,
+    '#weight' => 0,
+  );
+  return system_settings_form($form);
+}
+
+/**
  * Implementation of hook_nodeapi().
  */
 function excerpt_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
-  if (variable_get('excerpt_'. $node->type, 1)) {
+  if (variable_get('excerpt_'. $node->type, variable_get('excerpt_default', 1))) {
     switch ($op) {
       case 'submit':
         // Due to the presence of the teaser field in the node form,
@@ -50,25 +101,36 @@
     $form['workflow']['excerpt']['excerpt'] = array(
       '#type' => 'radios',
       '#title' => t('Teaser'),
-      '#default_value' => variable_get('excerpt_'. $form['#node_type']->type, 1),
+      '#default_value' => variable_get('excerpt_'. $form['#node_type']->type, variable_get('excerpt_default', 1)),
       '#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.'),
     );
     $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),
+      '#default_value' => variable_get('excerpt_wt_'. $form['#node_type']->type, variable_get("excerpt_weight", 0)),
     );
+    $form['workflow']['excerpt']['excerpt_req'] = array(
+      '#type' => 'radios',
+      '#title' => t('Excerpt required?'),
+      '#options' => array(t('No'), t('Yes')),
+      '#default_value' => variable_get('excerpt_req_'. $form['#node_type']->type, variable_get("excerpt_required", 0)),
+      '#description' => t('Choose whether a manually entered excerpt is optional or mandatory.'),
+    );
   }
-  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 && variable_get('excerpt_'. $form['type']['#value'], variable_get('excerpt_default', 1))) {
+    $is_required = variable_get('excerpt_req_'. $form['type']['#value'], variable_get("excerpt_required", FALSE));
     $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),
-      '#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.'),
+      '#required' => $is_required,
+      '#weight' => variable_get('excerpt_wt_'. $form['type']['#value'], variable_get("excerpt_weight", 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.').
+      ($is_required? '':' '.t('Leave empty to auto-generate one from the body.')),
     );
   }
 }
