| 3 |
function phptemplate_preprocess_page(&$vars) { |
function phptemplate_preprocess_page(&$vars) { |
| 4 |
|
|
| 5 |
$themepath = path_to_theme(); |
$themepath = path_to_theme(); |
| 6 |
|
$basepath = base_path(); |
| 7 |
|
|
| 8 |
// look for a navigation, content, search links etc |
// look for a navigation, content, search links etc |
| 9 |
foreach ($vars as $key=>$value) { |
foreach ($vars as $key=>$value) { |
| 29 |
if ($css_sheets) { |
if ($css_sheets) { |
| 30 |
$css_sheets = explode("\n", $css_sheets); |
$css_sheets = explode("\n", $css_sheets); |
| 31 |
foreach ($css_sheets as $sheet) { |
foreach ($css_sheets as $sheet) { |
| 32 |
drupal_add_css($themepath.'/'.$sheet, 'theme'); |
drupal_add_css($basepath.$themepath.'/'.$sheet, 'theme'); |
| 33 |
} |
} |
| 34 |
$vars['styles'] = drupal_get_css(); |
$vars['styles'] = drupal_get_css(); |
| 35 |
} |
} |
| 100 |
// output the mode options |
// output the mode options |
| 101 |
$modes .= ' <div class="mode">'.t($mode).''; |
$modes .= ' <div class="mode">'.t($mode).''; |
| 102 |
foreach ($options as $option=>$optiondata) { |
foreach ($options as $option=>$optiondata) { |
| 103 |
$modes .=' <div class="option"><a href="'.$here.'set_'.$mode.'='.$option.'&rand='.rand().'"><img src="/'.$themepath.'/'.$optiondata['image'].'" alt="'.$optiondata['description'].'" title="'.$optiondata['description'].'" /></a></div>'; |
$modes .=' <div class="option"><a href="'.$here.'set_'.$mode.'='.$option.'&rand='.rand().'"><img src="'.$basepath.$themepath.'/'.$optiondata['image'].'" alt="'.$optiondata['description'].'" title="'.$optiondata['description'].'" /></a></div>'; |
| 104 |
} |
} |
| 105 |
|
|
| 106 |
// if the cookie is set for this mode, process the rules |
// if the cookie is set for this mode, process the rules |