| 1 |
<?php
|
| 2 |
// $Id: template.php,v 1.2 2008/09/19 05:08:31 khalemi Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Add custom.css if file exist.
|
| 6 |
*/
|
| 7 |
$custom_css = path_to_theme() .'/custom.css';
|
| 8 |
if (file_exists($custom_css)) {
|
| 9 |
drupal_add_css($custom_css, 'theme');
|
| 10 |
}
|
| 11 |
|
| 12 |
function phptemplate_body_class($sidebar_right) {
|
| 13 |
if ($sidebar_right != '') {
|
| 14 |
$class = 'sidebar-right';
|
| 15 |
}
|
| 16 |
|
| 17 |
return $class ? $class : 'sidebar-right';
|
| 18 |
}
|
| 19 |
|
| 20 |
/**
|
| 21 |
* Return a themed mission trail.
|
| 22 |
*
|
| 23 |
* @return
|
| 24 |
* a string containing the mission output, or execute PHP code snippet if
|
| 25 |
* mission is enclosed with <?php ?>.
|
| 26 |
*/
|
| 27 |
function hwctravel_mission() {
|
| 28 |
$mission = theme_get_setting('mission');
|
| 29 |
if (preg_match('/^<\?php/', $mission)) {
|
| 30 |
$mission = drupal_eval($mission);
|
| 31 |
}
|
| 32 |
else {
|
| 33 |
$mission = filter_xss_admin($mission);
|
| 34 |
}
|
| 35 |
return isset($mission) ? $mission : '';
|
| 36 |
}
|
| 37 |
|
| 38 |
/**
|
| 39 |
* Return a themed breadcrumb trail.
|
| 40 |
*
|
| 41 |
* @param $breadcrumb
|
| 42 |
* An array containing the breadcrumb links.
|
| 43 |
* @return a string containing the breadcrumb output.
|
| 44 |
*/
|
| 45 |
function phptemplate_breadcrumb($breadcrumb) {
|
| 46 |
if (!empty($breadcrumb)) {
|
| 47 |
return '<div class="breadcrumb">'. implode('', $breadcrumb) .'</div>';
|
| 48 |
}
|
| 49 |
}
|
| 50 |
|
| 51 |
/**
|
| 52 |
* Return a cascade primary links.
|
| 53 |
* Clone implementation from user_block().
|
| 54 |
*
|
| 55 |
* @return
|
| 56 |
* a themed cascade primary links.
|
| 57 |
*/
|
| 58 |
function phptemplate_get_primary_links() {
|
| 59 |
return theme('menu_tree', variable_get('menu_primary_menu', 0));
|
| 60 |
}
|