You are here

function timeago_preprocess_node in Timeago 6.2

Implementation of hook_preprocess_node().

File

./timeago.module, line 93
Adds support for the Timeago jQuery library.

Code

function timeago_preprocess_node(&$variables) {
  if (variable_get('timeago_node', 1)) {
    $node = $variables['node'];
    $variables['date'] = timeago_format_date($node->created, $variables['date']);
    if (theme_get_setting('toggle_node_info_' . $node->type)) {

      // We could override theme('node_submitted'), but our override would get overridden by themes.
      $variables['submitted'] = t('Submitted by !username !datetime', array(
        '!username' => $variables['name'],
        '!datetime' => $variables['date'],
      ));
    }
  }
}