<?php
// $Id: template.php,v 1.16 2007/10/11 09:51:29 goba Exp $
/*drupal_add_js(path_to_theme().'/jscroller2-1.5.js', 'theme');*/
/**
* Sets the body-tag class attribute.
*
* Adds 'sidebar-left', 'sidebar-right' or 'sidebars' classes as needed.
*/
function phptemplate_body_class($left, $right) {
if ($left != '' && $right != '') {
$class = 'sidebars';
}
else {
if ($left != '') {
$class = 'sidebar-left';
}
if ($right != '') {
$class = 'sidebar-right';
}
}
print ' class="'.
$class .
'"';
}
}
/**
* 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 (!
empty($breadcrumb)) {
return '<div class="breadcrumb">'.
implode(' › ',
$breadcrumb) .
'</div>';
}
}
/**
* Allow themable wrapping of all comments.
*/
function phptemplate_comment_wrapper($content, $node) {
if (!$content || $node->type == 'forum') {
return '<div id="comments">'. $content .'</div>';
}
else {
return '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
}
}
/**
* Override or insert PHPTemplate variables into the templates.
*/
function phptemplate_preprocess_page(&$vars) {
// Hook into color.module
}
}
/**
* Returns the rendered local tasks. The default implementation renders
* them as tabs. Overridden to split the secondary tasks.
*
* @ingroup themeable
*/
function phptemplate_menu_local_tasks() {
}
function phptemplate_comment_submitted($comment) {
return t('!datetime — !username',
'!username' =>
theme('username',
$comment),
));
}
function phptemplate_node_submitted($node) {
return t('!datetime — !username',
'!username' =>
theme('username',
$node),
));
}
/**
* Generates IE CSS links for LTR and RTL languages.
*/
function phptemplate_get_ie_styles() {
$iecss =
'<link type="text/css" rel="stylesheet" media="all" href="'.
base_path() .
path_to_theme() .
'/fix-ie.css" />';
$iecss .=
'<style type="text/css" media="all">@import "'.
base_path() .
path_to_theme() .
'/fix-ie-rtl.css";</style>';
}
return $iecss;
}