Drupal Tip: Modifying the "Submitted By" Text in Posts and Comments for the Zen Theme
By marie on February 1, 2011
There are many methods for changing the "Submitted by" text in Drupal. Most are very simple code additions, but are not compatible with the Zen theme. If you have tried over and over to change this and nothing happens, here is the answer. I ran into this myself and a lot of digging turned up the fact that Zen refers to the submitted text with a different variable.
In your comment.tpl.php, simply change
Change this
<?php
print t('by !username on !datetime.',
array('!username' => $author, '!datetime' => $created));
?>
print t('by !username on !datetime.',
array('!username' => $author, '!datetime' => $created));
?>
To this
<?php print t('Submitted '); ?><?php print t('by '); ?><?php print $author; ?><?php print t(' '); ?><?php print (format_interval(time() - $node->created));?><?php print t('ago '); ?>
Latest Blog Posts
- 1 of 2
- ››

Comments
When you buy a Launch X431 scan tool from any of our agents, in fact, you are not just buying a tool that you buy a complete package, we have our own technical diagnostic support lines (not premium rate numbers) to understand all your diagnostic levels.
Why do we need to change this?
google
Why do we need to change this?
google
Yes absolutely! Thanks for checking. :)
Would it be okay with you if I linked to this page from my website? Just asking since some people don't allow linking to their sites if you don't take their permission.
Post new comment