/[drupal]/contributions/themes/flexible/template.php
ViewVC logotype

Diff of /contributions/themes/flexible/template.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5, Tue May 20 10:26:23 2008 UTC revision 1.6, Mon Jun 2 19:38:25 2008 UTC
# Line 3  Line 3 
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) {
# Line 28  function phptemplate_preprocess_page(&$v Line 29  function phptemplate_preprocess_page(&$v
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     }     }
# Line 99  function phptemplate_preprocess_page(&$v Line 100  function phptemplate_preprocess_page(&$v
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.'&amp;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.'&amp;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

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.2