Simpler author / date / comment links
This is a very simple modification to the code you use in node.tpl.php so you can display your author/date/comments metadata a minimally.
If you want this:
By jibbajabba on 21 Feb | 1 comment
Rather than something like this:
February 21, 2007 - 10:06am
jibbajabba's blog | 1 comment
You can use this snippet in your node.tpl.php file:
By <?php print $name; ?> on <?php print format_date($node->created, 'custom', 'd M'); ?> |
<?php
print $node->comment_count . ' comment';
if ($node->comment_count != 1) { print 's'; }
?>
Clean-up
Better use http://api.drupal.org/api/function/format_plural/.
Better leave the node object alone, as much as possible.
Use
$nameinstead of$node->nameto get a link in the right context.By <?php print $name; ?> on <?php print format_date($created, 'custom', 'd M'); ?> | <?php print format_plural($comment_count, '1 comment', '@count comments'); ?>