'. $vars['sidebar_left'] .'';
}
if ($vars['sidebar_right'] != '') {
$vars['right'] = '
';
}
break;
case 'node':
$node = $vars['node'];
switch ($node->type) {
case 'blog':
$vars['blog_date'] = clean_blog_date($node);
break;
}
break;
case 'comment':
$comment = $vars['comment'];
$vars['comment_date'] = clean_comment_date($comment);
break;
}
return $vars;
}
/**
* Override, make sure Drupal doesn't return empty
*
* Return a themed help message.
*
* @return a string containing the helptext for the current page.
*/
function phptemplate_help() {
$help = menu_get_active_help();
// Drupal sometimes returns empty
so strip tags to check if empty
if (strlen(strip_tags($help)) > 1) {
return ''. $help .'
';
}
}
/**
* Override, use a better default breadcrumb separator.
*
* Return a themed breadcrumb trail.
*
* @param $breadcrumb
* An array containing the breadcrumb links.
* @return a string containing the breadcrumb output.
*/
function phptemplate_breadcrumb($breadcrumb) {
if (count($breadcrumb) > 1) {
$breadcrumb[] = drupal_get_title();
if ($breadcrumb) {
return ''. implode(' › ', $breadcrumb) ."
\n";
}
}
}
/**
* Formats calendar style dates for blog posts.
*
* @param $node
* The node object from which to extract submitted date information.
* @return themed date.
*/
function clean_blog_date($node) {
$day = format_date($node->created, 'custom', "j");
$month = format_date($node->created, 'custom', "M");
$year = format_date($node->created, 'custom', "Y");
$output = ''. $day .'';
$output .= ''. $month .'';
$output .= ''. $year .'';
return $output;
}
/**
* Formats calendar style dates for comments.
*
* @param $comment
* The comment object from which to extract submitted date information.
* @return themed date.
*/
function clean_comment_date($comment) {
$day = format_date($comment->timestamp, 'custom', 'd M');
$time = format_date($comment->timestamp, 'custom', 'H:i');
$output = ''. $day .'';
$output .= ''. $time .'';
return $output;
}