Versions
5
node_show($node, $cid)
6
node_show($node, $cid, $message = FALSE)
7
node_show($node, $message = FALSE)

Generate a page displaying a single node, along with its comments.

▾ 2 functions call node_show()

node_page_view in drupal-6/modules/node/node.module
Menu callback; view a single node.
poll_results in drupal-6/modules/poll/poll.pages.inc
Callback for the 'results' tab for polls you can vote on

Code

drupal-6/modules/node/node.module, line 1096

<?php
function node_show($node, $cid, $message = FALSE) {
  if ($message) {
    drupal_set_title(t('Revision of %title from %date', array('%title' => $node->title, '%date' => format_date($node->revision_timestamp))));
  }
  $output = node_view($node, FALSE, TRUE);

  if (function_exists('comment_render') && $node->comment) {
    $output .= comment_render($node, $cid);
  }

  // Update the history table, stating that this user viewed this node.
  node_tag_new($node->nid);

  return $output;
}
?>

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options