How Can I Take Off The Time Stamp From The Recent Comment Block?

I looked everywhere and can't seem to find where this lil piece of code is at.

I would really appreciate it. Thanks for your time.

Comments

rdilauro’s picture

I would like some of that... I just want to drop off the Sec's field
Days,Hours and Mins are enough and where would I abbreviate Hours to Hrs?

lost305’s picture

I feel I can figure this out if I'm just pointed in the right direction.

wwwoliondorcom’s picture

Removing Time stamp from recent comment block

Hello,

I would also like to know how to remove time and date in the coments ?

Thanks.

bioshock’s picture

Go to modules/comment.module

find this function

function theme_comment_block() {
  $result = db_query_range(db_rewrite_sql('SELECT c.nid, c.subject, c.cid, c.timestamp FROM {comments} c INNER JOIN {node} n ON n.nid = c.nid WHERE n.status = 1 AND c.status = %d ORDER BY c.timestamp DESC', 'c'), COMMENT_PUBLISHED, 0, 10);
  $items = array();
  while ($comment = db_fetch_object($result)) {
    $items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .'<br />'. t('%time ago', array('%time' => format_interval(time() - $comment->timestamp)));
  }
  return theme('item_list', $items);
}

change it to

function theme_comment_block() {
  $result = db_query_range(db_rewrite_sql('SELECT c.nid, c.subject, c.cid, c.timestamp FROM {comments} c INNER JOIN {node} n ON n.nid = c.nid WHERE n.status = 1 AND c.status = %d ORDER BY c.timestamp DESC', 'c'), COMMENT_PUBLISHED, 0, 10);
  $items = array();
  while ($comment = db_fetch_object($result)) {
    $items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) ;
  }
  return theme('item_list', $items);
}

save it

WorldFallz’s picture

nope-- theme functions exist precisely so you don't have to hack core and create a fork. Copy the function to your theme's template.php file and modify as desired.