I don't like the way Drupal formats the "Submitted by..." text for nodes and comments. So, I did a little bit of digging and found the offending code in the theme_node_submitted() and theme_comment_submitted() functions of node.module and comment.module respectively. These two functions are easy to override at the theme level by making a copy in your template.php file, and renaming the function to fit with your theme (replace theme with the name of your theme). I made mine look like this:
function kirkdesigns_node_submitted($node) {
return t('Posted by !username on @date', array(
'!username' => theme('username', $node),
'@date' => format_date($node->created, 'custom', 'd M Y')
));
} That took care of the "submitted by..." for all of my nodes. And the following snippet took care of the comments:
function kirkdesigns_comment_submitted($comment) {
return t('Posted by !username on @date at about @time.', array(
'!username' => theme('username', $comment),
'@date' => format_date($comment->timestamp, 'custom', 'd M Y'),
'@time' => format_date($comment->timestamp, 'custom', 'H:i')
));
} It's only a small change, but it's the little things that make the difference.

Comments
how to call ?
I"ve put this into my template.php file and it is not changing the output of my node pages. Do you have to call then function from some place for this to work?
Drupal 7 Fix
The theme_comment_submitted function no longer exists in Drupal 7. The Drupal manual explains how to fix the problem. http://drupal.org/update/themes/6/7#submitted_by
Add new comment