Hello.
I'd like to delete the author from the "submitted" string. The content of the variable $submitted should be only date and hour, but i'm not able to do it from the administration.
What can i do?

Comments

ugerhard’s picture

You can override the variable in the template.php of your theme, specifically in the function _phptemplate_variables. Have a look at

http://drupal.org/node/16383

The same mechanism applies for overriding existing variables.

Alternatively you could just delete the $submitted printout from your node.tpl.php and insert something like

<?php print format_date($node->created, 'small')) ?>

See http://api.drupal.org/api/function/format_date/5

Cosmy’s picture

Great it works.
But if i want to use the format_date in template.php to override the $submitted variable that is the code:

function _phptemplate_variables($hook, $vars) {
switch($hook) {
case 'node' :
$vars['submitted'] = format_date($vars['node']->created, 'small');
break;
}
return $vars;
}