Link to home
Start Free TrialLog in
Avatar of itkadmin
itkadminFlag for Canada

asked on

Changing date format in a drupal template

Hello
I am trying to customize comment.tpl.php (not the core template of course)

I would like the date to render as "time ago" I've seen this as an option in views, but I have no clue how to get the same thing in a template.

here is what I have
<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
  <?php print $picture ?>
  <div class="content"<?php print $content_attributes; ?>>
    <?php
      // We hide the comments and links now so that we can render them later.
      hide($content['links']);
     print ($id); 
	 print ".&nbsp;&nbsp;";
	 print ($author);
	 print "&nbsp;";
      print strip_tags (render($content));
    ?>
    <br>
    <?php print ($created); ?>
  </div>

</div>

Open in new window


What do I need to do?
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of itkadmin

ASKER

thanks
Thanks for the points and best of luck with your project! ~Ray