You are here

function timeago_nodeapi in Timeago 6

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

hook_nodeapi implementation

File

./timeago.module, line 106

Code

function timeago_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
  switch ($op) {
    case 'load':
      return array(
        'timeago' => theme('timeago_posted', format_date($node->created, variable_get('timeago_node_dateformat_title', 'large')), timeago_prepare($node->created, time(), false, variable_get('timeago_node_round', 3), variable_get('timeago_node_maxdate', '32556926'), 'medium')),
      );
      break;
  }
}