From 2474121c33ac20684508657f787321945f7ec3c3 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 10 Dec 2006 21:07:15 +0000 Subject: - Patch # #87145 by Steven: usability improvement: easier break-tag. --- modules/node/node.module | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index 476242f24..78c9cc13d 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -145,8 +145,8 @@ function node_teaser($body, $format = NULL) { $size = variable_get('teaser_length', 600); - // find where the delimiter is in the body - $delimiter = strpos($body, ''); + // Find where the delimiter is in the body + $delimiter = strpos($body, ''); // If the size is zero, and there is no delimiter, the entire body is the teaser. if ($size == 0 && $delimiter === FALSE) { @@ -723,8 +723,7 @@ function node_prepare($node, $teaser = FALSE) { */ function node_build_content($node, $teaser = FALSE, $page = FALSE) { // Remove the delimiter (if any) that separates the teaser from the body. - // TODO: this strips legitimate uses of '' also. - $node->body = str_replace('', '', $node->body); + $node->body = str_replace('', '', $node->body); // The 'view' hook can be implemented to overwrite the default function // to display nodes. @@ -2173,7 +2172,7 @@ function node_preview($node) { function theme_node_preview($node) { $output = '
'; if ($node->teaser && $node->teaser != $node->body) { - drupal_set_message(t('The trimmed version of your post shows what your post looks like when promoted to the main page or when exported for syndication. You can insert the delimiter "<!--break-->" (without the quotes) to fine-tune where your post gets split.')); + drupal_set_message(t('The trimmed version of your post shows what your post looks like when promoted to the main page or when exported for syndication. You can insert the delimiter "<break>" (without the quotes) to fine-tune where your post gets split.')); $output .= '

'. t('Preview trimmed version') .'

'; $output .= node_view(drupal_clone($node), 1, FALSE, 0); $output .= '

'. t('Preview full version') .'

'; -- cgit v1.2.3