How to disable Drupal comment block timestamp?

Drupal is a free software package that allows an individual or a community of users to easily publish, manage and organize a wide variety of content on a website. Official website: http://drupal.org

We will disable the comment block timestamp, something like this:

# Lorem ipsum...
1 weeks 1 day ago
# Lorem ipsum...
1 day ago

After hack:

# Lorem ipsum...
# Lorem ipsum...

This trick requires core hacks, please be careful.

Open the following file with text editor:

modules/comment/comment.module

Find the following line:

$items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .' '. t('@time ago', array('@time' => format_interval(time() - $comment->timestamp)));

Replace the line with:

$items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid);

There you go, its done 🙂

1 Comment

  • Anonymous September 18, 2015 Reply

    Thought I would comment and say neat theme, did you code it on your own? It looks really good!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: