Definition

chameleon_node($node, $teaser = 0)
drupal/themes/chameleon/chameleon.theme, line 116

Code

function chameleon_node($node, $teaser = 0) {

  $output  = "<div class=\"node" . ((!$node->status) ? ' node-unpublished' : '') . (($node->sticky) ? ' sticky' : '') . "\">\n";

  if (!$page) {
    $output .= " <h2 class=\"title\">" . ($teaser ? l($node->title, "node/$node->nid") : check_plain($node->title)) . "</h2>\n";
  }

  $output .= " <div class=\"content\">\n";

  if ($teaser && $node->teaser) {
    $output .= $node->teaser;
  }
  elseif (isset($node->body)) {
    $output .= $node->body;
  }

  $output .= " </div>\n";

  $submitted = '';
  if (theme_get_setting("toggle_node_info_$node->type")) {
    $submitted = t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small')));
  }

  $terms = '';
  if (!empty($node->content['links']['terms'])) {
    $terms = drupal_render($node->content['links']['terms']);
  }
  
    $links = '';
  if ($node->content['links']) {
    $links = drupal_render($node->content['links']);
  }

  if (!empty($terms) || !empty($links)) {
    $output .= '<div class="links">' . $terms . $links . $submitted . "</div>\n";
  }

  $output .= "</div>\n";
  
    if ($node->content['comments']) {
    $output .= drupal_render($node->content['comments']);
  }

  return $output;
}