By opdavies on
I'm currently setting up 2 Drupal sites for different clients, and I'd like to change the 'Posted By' information displayed on the top of the nodes.
On one site I'd just like to re-order the information displayed, however, on the other site I'd like to remove the user reference and just have the date and time the node was created.
I've looked through the node.tpl.php and page.tpl.php files within my theme folder, but I can't see where to change it.
Thanks!
Ollie.
Comments
It might depend on the theme
It might depend on the theme you are using. In Nitobe, it's part of node.tpl.php, and also in Garland. In the latter, the $submitted variable is simply printed; in Nitobe, the $date and $name variables are used instead.
I've looked at the
I've looked at the node.tpl.php for the Zen theme, and it seems that it is also using just the $submitted variable. But, I assume that this must be defined somewhere? I've just installed the Theme Developer module to see if that gives me any more information.
I've looked at the
I've looked at the node.tpl.php for the Zen theme, and it seems that it is also using just the $submitted variable. But, I assume that this must be defined somewhere? I've just installed the Theme Developer module to see if that gives me any more information.
I believe the $submitted
I believe the $submitted variable is created in theme_node_submitted(), and Garland's own version of it (which overwrites the default one) is phptemplate_node_submitted(). You could give your theme your own version of phptemplate_node_submitted() (or call it
<themename>_node_submitted(), whatever you prefer) and produce a version of $submitted that fits your needs.Tutorial to format 'Submitted by...'
This tutorial from Codegobbler should help.