Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/theme/arialist/lib.php
Go to the documentation of this file.
00001 <?php
00002 
00010 function arialist_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 = arialist_set_linkcolor($css, $linkcolor);
00019 
00020     // Set the region width
00021     if (!empty($theme->settings->regionwidth)) {
00022         $regionwidth = $theme->settings->regionwidth;
00023     } else {
00024         $regionwidth = null;
00025     }
00026     $css = arialist_set_regionwidth($css, $regionwidth);
00027 
00028     // Set the custom CSS
00029     if (!empty($theme->settings->customcss)) {
00030         $customcss = $theme->settings->customcss;
00031     } else {
00032         $customcss = null;
00033     }
00034     $css = arialist_set_customcss($css, $customcss);
00035 
00036     // Return the CSS
00037     return $css;
00038 }
00039 
00047 function arialist_set_linkcolor($css, $linkcolor) {
00048     $tag = '[[setting:linkcolor]]';
00049     $replacement = $linkcolor;
00050     if (is_null($replacement)) {
00051         $replacement = '#f25f0f';
00052     }
00053     $css = str_replace($tag, $replacement, $css);
00054     return $css;
00055 }
00056 
00065 function arialist_set_regionwidth($css, $regionwidth) {
00066     $tag = '[[setting:regionwidth]]';
00067     $doubletag = '[[setting:regionwidthdouble]]';
00068     $replacement = $regionwidth;
00069     if (is_null($replacement)) {
00070         $replacement = 250;
00071     }
00072     $css = str_replace($tag, $replacement.'px', $css);
00073     $css = str_replace($doubletag, ($replacement*2).'px', $css);
00074     return $css;
00075 }
00076 
00084 function arialist_set_customcss($css, $customcss) {
00085     $tag = '[[setting:customcss]]';
00086     $replacement = $customcss;
00087     if (is_null($replacement)) {
00088         $replacement = '';
00089     }
00090     $css = str_replace($tag, $replacement, $css);
00091     return $css;
00092 }
 All Data Structures Namespaces Files Functions Variables Enumerations