Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/theme/overlay/lib.php
Go to the documentation of this file.
00001 <?php
00002 function overlay_set_linkcolor($css, $linkcolor) {
00003     $tag = '[[setting:linkcolor]]';
00004     $replacement = $linkcolor;
00005     if (is_null($replacement)) {
00006         $replacement = '#428ab5';
00007     }
00008     $css = str_replace($tag, $replacement, $css);
00009     
00010 
00011     return $css;
00012 }
00013 
00014 function overlay_set_headercolor($css, $headercolor) {
00015     $tag = '[[setting:headercolor]]';
00016     $replacement = $headercolor;
00017     if (is_null($replacement)) {
00018         $replacement = '#2a4c7b';
00019     }
00020     $css = str_replace($tag, $replacement, $css);
00021     
00022 
00023     return $css;
00024 }
00025 
00026 
00027 function overlay_set_customcss($css, $customcss) {
00028     $tag = '[[setting:customcss]]';
00029     $replacement = $customcss;
00030     if (is_null($replacement)) {
00031         $replacement = '';
00032     }
00033     $css = str_replace($tag, $replacement, $css);
00034     return $css;
00035 }
00036 
00037 
00038 
00039 
00040 
00041 function overlay_process_css($css, $theme) {
00042        
00043      if (!empty($theme->settings->linkcolor)) {
00044         $linkcolor = $theme->settings->linkcolor;
00045     } else {
00046         $linkcolor = null;
00047     }
00048     $css = overlay_set_linkcolor($css, $linkcolor);
00049         
00050          if (!empty($theme->settings->headercolor)) {
00051         $headercolor = $theme->settings->headercolor;
00052     } else {
00053         $headercolor = null;
00054     }
00055     $css = overlay_set_headercolor($css, $headercolor);
00056         
00057      if (!empty($theme->settings->customcss)) {
00058         $customcss = $theme->settings->customcss;
00059     } else {
00060         $customcss = null;
00061     }
00062     $css = overlay_set_customcss($css, $customcss);
00063     
00064     return $css;
00065     
00066     
00067     
00068 }
00069 
 All Data Structures Namespaces Files Functions Variables Enumerations