chameleon_node

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

themes/chameleon/chameleon.theme, строка 114

Версии
5 – 6
chameleon_node($node, $teaser = 0, $page = 0)

Код

<?php
function chameleon_node($node, $teaser = 0, $page = 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['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array(
    'title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small'))),
    'html' => TRUE) : array();

  $terms = array();
  if (module_exists('taxonomy')) {
    $terms = taxonomy_link("taxonomy terms", $node);
  }

  $links = array_merge($submitted, $terms);
  if (isset($node->links)) {
    $links = array_merge($links, $node->links);
  }
  if (count($links)) {
    $output .= '<div class="links">'. theme('links', $links, array('class' => 'links inline')) ."</div>\n";
  }

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

  return $output;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему