view sites/all/themes/omega/ohm/preprocess/node.preprocess.inc @ 6:a75ead649730

added biblio, admin_menu and reference modules
author danieleb <danielebarchiesi@me.com>
date Fri, 20 Sep 2013 11:18:21 +0100
parents
children
line wrap: on
line source
<?php

/**
 * Implements hook_preprocess_TEMPLATE().
 */
function ohm_preprocess_node(&$variables) {
  $node = $variables['node'];

  $date = format_date($variables['created'], 'long');

  $variables['submitted'] = t('@date | <strong>Author:</strong> !author', array('@date' => $date, '!author' => $variables['name']));

  if (isset($node->comment_count)) {
    $comments = l(t('Comments (@comment_count)', array('@comment_count' => $variables['comment_count'])), 'node/' . $node->nid, array('fragment' => 'comments'));
    $variables['submitted'] .= " | $comments";
  }
}