function theme_node_preview in Drupal 4
Same name and namespace in other branches
- 5 modules/node/node.module \theme_node_preview()
- 6 modules/node/node.pages.inc \theme_node_preview()
- 7 modules/node/node.pages.inc \theme_node_preview()
Display a node preview for display during node creation and editing.
Parameters
$node: The node object which is being previewed.
1 theme call to theme_node_preview()
- node_preview in modules/
node.module - Generate a node preview.
File
- modules/
node.module, line 1880 - The core that allows content to be submitted to the site.
Code
function theme_node_preview($node) {
$output = '<div class="preview">';
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.'));
$output .= '<h3>' . t('Preview trimmed version') . '</h3>';
$output .= node_view(drupal_clone($node), 1, FALSE, 0);
$output .= '<h3>' . t('Preview full version') . '</h3>';
$output .= node_view($node, 0, FALSE, 0);
}
else {
$output .= node_view($node, 0, FALSE, 0);
}
$output .= "</div>\n";
return $output;
}