Changeset 1268

Show
Ignore:
Timestamp:
11/07/07 16:05:15 (1 year ago)
Author:
ben
Message:

Changed the way the toolbar and toolbar CSS works; introduced toolbar:box.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/toolbar/lib.php

    r1067 r1268  
    22 
    33    function toolbar_pagesetup() { 
     4        /* 
    45        global $CFG, $metatags; 
    56        require_once($CFG->dirroot.'lib/filelib.php'); // to ensure file_get_contents() 
     
    78        $css = str_replace("{{url}}", $CFG->wwwroot, $css); 
    89        $metatags .= $css; 
     10        */ 
    911    } 
    1012     
     
    2426            $toolbar = file_get_contents($CFG->dirroot . "mod/toolbar/toolbarloggedout.inc"); 
    2527        } 
     28         
     29        if ($vars[1] == 'box') { 
     30                $css = file_get_contents($CFG->dirroot . "mod/toolbar/css-box"); 
     31        } else { 
     32                $css = file_get_contents($CFG->dirroot . "mod/toolbar/css"); 
     33        } 
     34        $css = str_replace("{{url}}", $CFG->wwwroot, $css); 
     35        $toolbar .= "<style type=\"text/css\">{$css}</style>"; 
     36         
    2637        $toolbar = str_replace("{{url}}", $CFG->wwwroot, $toolbar); 
    2738        $toolbar = str_replace("{{menu}}", templates_variables_substitute(array(array(),"menu")), $toolbar);