Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/theme/mymobile/config.php
Go to the documentation of this file.
00001 <?php
00002 // This file is part of Moodle - http://moodle.org/
00003 //
00004 // Moodle is free software: you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation, either version 3 of the License, or
00007 // (at your option) any later version.
00008 //
00009 // Moodle is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00016 
00026 // The name of the theme
00027 $THEME->name = 'mymobile';
00028 
00029 // This theme relies on canvas and of course base themes
00030 $THEME->parents = array(
00031     'canvas',
00032     'base',
00033 );
00034 
00035 // Set the stylesheets that we want to include for this theme
00036 $THEME->sheets = array(
00037     'jmobilerc2',
00038     'core',
00039     'media'
00040 );
00041 
00042 // Exclude parent sheets that we don't want
00043 $THEME->parents_exclude_sheets = array(
00044     'base' => array(
00045         'pagelayout',
00046         'dock',
00047         'editor',
00048     ),
00049     'canvas' => array(
00050         'pagelayout',
00051         'tabs',
00052         'editor',
00053     ),
00054 );
00055 
00056 // Disable the dock - this theme does not support it.
00057 $THEME->enable_dock = false;
00058 
00059 // Set up the default layout options. Note that none of these have block
00060 // regions. See the code below this for where and when block regions are added.
00061 $THEME->layouts = array(
00062     'base' => array(
00063         'file' => 'general.php',
00064         'regions' => array(),
00065     ),
00066     'standard' => array(
00067         'file' => 'general.php',
00068         'regions' => array(),
00069     ),
00070     'course' => array(
00071         'file' => 'general.php',
00072         'regions' => array(),
00073     ),
00074     'coursecategory' => array(
00075         'file' => 'general.php',
00076         'regions' => array(),
00077     ),
00078     'incourse' => array(
00079         'file' => 'general.php',
00080         'regions' => array(),
00081     ),
00082     'frontpage' => array(
00083         'file' => 'general.php',
00084         'regions' => array(),
00085     ),
00086     'admin' => array(
00087         'file' => 'general.php',
00088         'regions' => array(),
00089     ),
00090     'mydashboard' => array(
00091         'file' => 'general.php',
00092         'regions' => array(),
00093         'options' => array('nonavbar' => true),
00094     ),
00095     'mypublic' => array(
00096         'file' => 'general.php',
00097         'regions' => array(),
00098     ),
00099     'login' => array(
00100         'file' => 'general.php',
00101         'regions' => array(),
00102         'options' => array('langmenu'=>true, 'nonavbar'=>true),
00103     ),
00104     'popup' => array(
00105         'file' => 'embedded.php',
00106         'regions' => array(),
00107         'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true),
00108     ),
00109     'frametop' => array(
00110         'file' => 'general.php',
00111         'regions' => array(),
00112         'options' => array('nofooter'=>true),
00113     ),
00114     'maintenance' => array(
00115         'file' => 'general.php',
00116         'regions' => array(),
00117         'options' => array('nofooter'=>true, 'nonavbar'=>true),
00118     ),
00119     'embedded' => array(
00120         'file' => 'embedded.php',
00121         'regions' => array(),
00122         'options' => array('nofooter'=>true, 'nonavbar'=>true),
00123     ),
00124     // Should display the content and basic headers only.
00125     'print' => array(
00126         'file' => 'general.php',
00127         'regions' => array(),
00128         'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
00129     ),
00130      // The pagelayout used when a redirection is occuring.
00131     'redirect' => array(
00132         'file' => 'embedded.php',
00133         'regions' => array(),
00134         'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
00135     ),
00136      // The pagelayout used for reports
00137     'report' => array(
00138         'file' => 'general.php',
00139         'regions' => array(),
00140         'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
00141     ),
00142 );
00143 
00144 // Get whether to show blocks and use appropriate pagelayout
00145 // this is necessary for block JS errors and other block problems
00146 $thisdevice = get_device_type();
00147 if ($thisdevice == "default" || $thisdevice == "tablet" || optional_param('mymobile_blocks', false, PARAM_BOOL)) {
00148     // These are layouts with blocks
00149     $blocklayouts = array('course', 'incourse', 'frontpage', 'mydashboard', 'mypublic');
00150     foreach ($blocklayouts as $layout) {
00151         $THEME->layouts[$layout]['regions'] = array('myblocks');
00152         $THEME->layouts[$layout]['defaultregion'] = 'myblocks';
00153     }
00154 }
00155 
00156 // Add the required JavaScript to the page
00157 $THEME->javascripts = array(
00158     'jquery-1.6.4.min',
00159     'custom',
00160     'jquery.mobile-1.0rc2',
00161     'scrollview',
00162     'easing'
00163 );
00164 
00165 // Sets a custom render factory to use with the theme, used when working with custom renderers.
00166 $THEME->rendererfactory = 'theme_overridden_renderer_factory';
 All Data Structures Namespaces Files Functions Variables Enumerations