Index: modules/node/content_types.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v retrieving revision 1.78 diff -u -r1.78 content_types.inc --- modules/node/content_types.inc 29 Jun 2009 14:24:56 -0000 1.78 +++ modules/node/content_types.inc 29 Jun 2009 16:55:26 -0000 @@ -185,9 +185,9 @@ $form['display']['teaser_length'] = array( '#type' => 'select', '#title' => t('Length of trimmed posts'), - '#default_value' => 600, + '#default_value' => variable_get('teaser_length_' . $type->type, 600), '#options' => drupal_map_assoc(array(0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000), '_node_characters'), - '#description' => t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited' . Note that this setting will only affect new or updated content and will not affect existing teasers.") + '#description' => t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'.") ); $form['old_type'] = array( '#type' => 'value', Index: modules/node/node.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v retrieving revision 1.55 diff -u -r1.55 node.admin.inc --- modules/node/node.admin.inc 28 Jun 2009 03:56:43 -0000 1.55 +++ modules/node/node.admin.inc 29 Jun 2009 16:55:27 -0000 @@ -31,9 +31,9 @@ ); $form['teaser_length'] = array( '#type' => 'select', '#title' => t('Length of trimmed posts'), - '#default_value' => 600, + '#default_value' => variable_get('teaser_length', 600), '#options' => drupal_map_assoc(array(0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000), '_node_characters'), - '#description' => t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited' . Note that this setting will only affect new or updated content and will not affect existing teasers.") + '#description' => t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'.") ); $form['node_preview'] = array( Index: modules/field/modules/text/text.module =================================================================== RCS file: /cvs/drupal/drupal/modules/field/modules/text/text.module,v retrieving revision 1.13 diff -u -r1.13 text.module --- modules/field/modules/text/text.module 22 Jun 2009 09:10:04 -0000 1.13 +++ modules/field/modules/text/text.module 29 Jun 2009 16:55:26 -0000 @@ -317,7 +317,8 @@ return $element['#item']['safe_summary']; } else { - return text_summary($element['#item']['safe'], $instance['settings']['text_processing'] ? $element['#item']['format'] : NULL); + $size = variable_get('teaser_length_' . $element['#bundle'], 600); + return text_summary($element['#item']['safe'], $instance['settings']['text_processing'] ? $element['#item']['format'] : NULL, $size); } }