| 1 |
<?php
|
| 2 |
// $Id: template.php,v 1.2.2.2 2009/04/25 06:19:22 hswong3i Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Return a themed mission trail.
|
| 6 |
*
|
| 7 |
* @return
|
| 8 |
* a string containing the mission output, or execute PHP code snippet if
|
| 9 |
* mission is enclosed with <?php ?>.
|
| 10 |
*/
|
| 11 |
function phptemplate_mission() {
|
| 12 |
$mission = theme_get_setting('mission');
|
| 13 |
if (preg_match('/^<\?php/', $mission)) {
|
| 14 |
$mission = drupal_eval($mission);
|
| 15 |
}
|
| 16 |
else {
|
| 17 |
$mission = filter_xss_admin($mission);
|
| 18 |
}
|
| 19 |
return isset($mission) ? $mission : '';
|
| 20 |
}
|
| 21 |
|
| 22 |
/**
|
| 23 |
* Generates IE CSS links for LTR and RTL languages.
|
| 24 |
*/
|
| 25 |
function phptemplate_get_ie_styles() {
|
| 26 |
global $language;
|
| 27 |
|
| 28 |
$iecss = '<link type="text/css" rel="stylesheet" media="all" href="'. base_path() . path_to_theme() .'/fix-ie.css" />';
|
| 29 |
if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
|
| 30 |
$iecss .= '<style type="text/css" media="all">@import "'. base_path() . path_to_theme() .'/fix-ie-rtl.css";</style>';
|
| 31 |
}
|
| 32 |
|
| 33 |
return $iecss;
|
| 34 |
}
|