config.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <?php
  2. // This file is part of the custom Moodle Bootstrap theme
  3. //
  4. // Moodle is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // Moodle is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
  16. /**
  17. * Renderers to align Moodle's HTML with that expected by Bootstrap
  18. *
  19. * @package theme_bootstrap
  20. * @copyright 2014 Bas Brands, www.basbrands.nl
  21. * @authors Bas Brands, David Scotson
  22. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  23. */
  24. $THEME->doctype = 'html5';
  25. $THEME->yuicssmodules = array();
  26. $THEME->name = 'bootstrap';
  27. $THEME->parents = array();
  28. if ('ltr' === get_string('thisdirection', 'langconfig')) {
  29. $THEME->sheets = array('moodle', 'custom');
  30. } else {
  31. $THEME->sheets = array('moodle-rtl', 'tinymce-rtl', 'yui2-rtl', 'forms-rtl', 'custom');
  32. }
  33. $THEME->supportscssoptimisation = false;
  34. $THEME->editor_sheets = array('editor');
  35. $THEME->plugins_exclude_sheets = array(
  36. 'block' => array(
  37. 'html',
  38. 'search_forums'
  39. ),
  40. 'tool' => array(
  41. 'customlang'
  42. ),
  43. );
  44. $THEME->rendererfactory = 'theme_overridden_renderer_factory';
  45. $THEME->csspostprocess = 'theme_bootstrap_process_css';
  46. $THEME->layouts = array(
  47. // Most backwards compatible layout without the blocks - this is the layout used by default.
  48. 'base' => array(
  49. 'file' => 'default.php',
  50. 'regions' => array(),
  51. ),
  52. // Standard layout with blocks, this is recommended for most pages with general information.
  53. 'standard' => array(
  54. 'file' => 'default.php',
  55. 'regions' => array('side-pre', 'side-post'),
  56. 'defaultregion' => 'side-pre',
  57. ),
  58. // Main course page.
  59. 'course' => array(
  60. 'file' => 'default.php',
  61. 'regions' => array('side-pre', 'side-post'),
  62. 'defaultregion' => 'side-pre',
  63. 'options' => array('langmenu' => true),
  64. ),
  65. 'coursecategory' => array(
  66. 'file' => 'default.php',
  67. 'regions' => array('side-pre', 'side-post'),
  68. 'defaultregion' => 'side-pre',
  69. ),
  70. // Part of course, typical for modules - default page layout if $cm specified in require_login().
  71. 'incourse' => array(
  72. 'file' => 'default.php',
  73. 'regions' => array('side-pre', 'side-post'),
  74. 'defaultregion' => 'side-pre',
  75. ),
  76. // The site home page.
  77. 'frontpage' => array(
  78. 'file' => 'default.php',
  79. 'regions' => array('side-pre', 'side-post'),
  80. 'defaultregion' => 'side-pre',
  81. 'options' => array('nonavbar' => true),
  82. ),
  83. // Server administration scripts.
  84. 'admin' => array(
  85. 'file' => 'default.php',
  86. 'regions' => array('side-pre'),
  87. 'defaultregion' => 'side-pre',
  88. 'options' => array('fluid' => true),
  89. ),
  90. // My dashboard page.
  91. 'mydashboard' => array(
  92. 'file' => 'default.php',
  93. 'regions' => array('side-pre', 'side-post'),
  94. 'defaultregion' => 'side-pre',
  95. 'options' => array('langmenu' => true),
  96. ),
  97. // My public page.
  98. 'mypublic' => array(
  99. 'file' => 'default.php',
  100. 'regions' => array('side-pre', 'side-post'),
  101. 'defaultregion' => 'side-pre',
  102. ),
  103. 'login' => array(
  104. 'file' => 'default.php',
  105. 'regions' => array(),
  106. 'options' => array('langmenu' => true, 'nonavbar' => true),
  107. ),
  108. // Pages that appear in pop-up windows - no navigation, no blocks, no header.
  109. 'popup' => array(
  110. 'file' => 'popup.php',
  111. 'regions' => array(),
  112. 'options' => array('nofooter' => true, 'nonavbar' => true),
  113. ),
  114. // No blocks and minimal footer - used for legacy frame layouts only!
  115. 'frametop' => array(
  116. 'file' => 'default.php',
  117. 'regions' => array(),
  118. 'options' => array('nofooter' => true, 'nocoursefooter' => true),
  119. ),
  120. // Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible.
  121. 'embedded' => array(
  122. 'file' => 'embedded.php',
  123. 'regions' => array()
  124. ),
  125. // Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
  126. // This must not have any blocks, links, or API calls that would lead to database or cache interaction.
  127. // Please be extremely careful if you are modifying this layout.
  128. 'maintenance' => array(
  129. 'file' => 'maintenance.php',
  130. 'regions' => array(),
  131. ),
  132. // Should display the content and basic headers only.
  133. 'print' => array(
  134. 'file' => 'default.php',
  135. 'regions' => array(),
  136. 'options' => array('nofooter' => true, 'nonavbar' => false),
  137. ),
  138. // The pagelayout used when a redirection is occuring.
  139. 'redirect' => array(
  140. 'file' => 'embedded.php',
  141. 'regions' => array(),
  142. ),
  143. // The pagelayout used for reports.
  144. 'report' => array(
  145. 'file' => 'default.php',
  146. 'regions' => array('side-pre'),
  147. 'defaultregion' => 'side-pre',
  148. ),
  149. // The pagelayout used for safebrowser and securewindow.
  150. 'secure' => array(
  151. 'file' => 'secure.php',
  152. 'regions' => array('side-pre', 'side-post'),
  153. 'defaultregion' => 'side-pre'
  154. ),
  155. );
  156. $THEME->javascripts = array(
  157. );
  158. $THEME->javascripts_footer = array(
  159. );
  160. if (core_useragent::is_ie() && !core_useragent::check_ie_version('9.0')) {
  161. $THEME->javascripts[] = 'html5shiv';
  162. }
  163. $THEME->hidefromselector = false;