format the "submitted by" text in Drupal
I initially used the "submitted by" Drupal module but had a problem with the date appearing correctly using that module. So... placing this function in the template.tpl.php did the trick...
thanks to Tom, found this on codegobbler.com
The theme name just get's replaced by whatever your theme name is:
This is for posts:
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') )); }
and this for 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:s') )); }
