Last updated September 26, 2012. Created on September 26, 2012.
Edited by HongPong. Log in to edit this page.

For those times you'd like to show the 'time ago' of the last comment, if any, on a node, use the following snippet. Goes well near the 'print $submitted' statement.

<?php if ($node->comment_count != '0') {echo t(' - Last comment !interval ago', array('!interval' => format_interval(time() - $node->last_comment_timestamp)));}

Hat tip to dekita for helping me sort this out.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.