You are here

function timeago_comment in Timeago 6

Same name and namespace in other branches
  1. 5 timeago.module \timeago_comment()
  2. 7 timeago.module \timeago_comment()

hook_comment implementation

Sets $comment->timeago available in comment.tpl.php

File

./timeago.module, line 121

Code

function timeago_comment(&$comment, $op) {
  switch ($op) {
    case 'view':
      $timeago = theme('timeago_posted', format_date($comment->timestamp, variable_get('timeago_node_dateformat_title', 'large')), timeago_prepare($comment->timestamp, time(), false, variable_get('timeago_node_round', 3), variable_get('timeago_node_maxdate', '32556926'), 'medium'));
      $comment->timeago = $timeago;
      break;
  }
}