Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/theme/nimble/lib.php
Go to the documentation of this file.
00001 <?php
00002 
00010 function nimble_process_css($css, $theme) {
00011 
00012     // Set the link color
00013     if (!empty($theme->settings->linkcolor)) {
00014         $linkcolor = $theme->settings->linkcolor;
00015     } else {
00016         $linkcolor = null;
00017     }
00018     $css = nimble_set_linkcolor($css, $linkcolor);
00019 
00020         // Set the link hover color
00021     if (!empty($theme->settings->linkhover)) {
00022         $linkhover = $theme->settings->linkhover;
00023     } else {
00024         $linkhover = null;
00025     }
00026     $css = nimble_set_linkhover($css, $linkhover);
00027     
00028     
00029     // Set the background color
00030     if (!empty($theme->settings->backgroundcolor)) {
00031         $backgroundcolor = $theme->settings->backgroundcolor;
00032     } else {
00033         $backgroundcolor = null;
00034     }
00035     $css = nimble_set_backgroundcolor($css, $backgroundcolor);
00036     
00037     
00038     
00039 
00040     // Return the CSS
00041     return $css;
00042 }
00043 
00048 function nimble_set_linkcolor($css, $linkcolor) {
00049     $tag = '[[setting:linkcolor]]';
00050     $replacement = $linkcolor;
00051     if (is_null($replacement)) {
00052         $replacement = '#2a65b1';
00053     }
00054     $css = str_replace($tag, $replacement, $css);
00055     return $css;
00056 }
00057 
00058 function nimble_set_linkhover($css, $linkhover) {
00059     $tag = '[[setting:linkhover]]';
00060     $replacement = $linkhover;
00061     if (is_null($replacement)) {
00062         $replacement = '#222222';
00063     }
00064     $css = str_replace($tag, $replacement, $css);
00065     return $css;
00066 }
00067 
00068 
00069 function nimble_set_backgroundcolor($css, $backgroundcolor) {
00070     $tag = '[[setting:backgroundcolor]]';
00071     $replacement = $backgroundcolor;
00072     if (is_null($replacement)) {
00073         $replacement = '#454545';
00074     }
00075     $css = str_replace($tag, $replacement, $css);
00076     return $css;
00077 }
00078 
 All Data Structures Namespaces Files Functions Variables Enumerations