myconfig.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <?php
  2. /*
  3. * Dokeos - elearning and course management software
  4. *
  5. * Copyright (c) 2009 Dokeos SPRL
  6. * Copyright (c) 2009 Juan Carlos Raña
  7. * Copyright (c) 2009 Ivan Tcholakov
  8. *
  9. * For a full list of contributors, see "credits.txt".
  10. * The full license can be read in "license.txt".
  11. *
  12. * This program is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License
  14. * as published by the Free Software Foundation; either version 2
  15. * of the License, or (at your option) any later version.
  16. *
  17. * See the GNU General Public License for more details.
  18. *
  19. * Contact address: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium
  20. * Mail: info@dokeos.com
  21. */
  22. /*
  23. * Custom editor configuration settings, php-side.
  24. * See http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
  25. *
  26. * Configuration data for the editor comes from different sources which are prioritised.
  27. *
  28. * 1-st level (the highest priority)
  29. * "Hardcoded" options by developers. 'Width' and 'Height' are exception of this rule.
  30. *
  31. * 2-nd level
  32. * Configuration settings from myconfig.php (this file).
  33. *
  34. * 3-rd level
  35. * Default configuration settings that are determined (calculated) by the system..
  36. *
  37. * 4-th level
  38. * Configuration settings from myconfig.js. This file may be modified for customization purposes too.
  39. * You may choose to create there options or to transfer options from here (not all) which have low probability of future changes.
  40. * Thus, you will gain performance by exploiting caching, but changes in myconfig.js do not enforce immediatelly.
  41. * Here is the mapping rule:
  42. *
  43. * myconfig.php myconfig.js
  44. * ---------------------------------------------------------------------------------------------
  45. * $config['FontFormats'] = 'p;h1;h2;h3;h4;h5'; FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5';
  46. *
  47. * 5-th level (the lowest priority)
  48. * Configuration settings from myconfig.js. This file is "as is" in the original source, modifying it is not recommended.
  49. */
  50. /*
  51. * Toolbar definitions.
  52. */
  53. // The following setting is the directory where the online editor's toobar definitions reside in correspondent php-files.
  54. // By default, the directory name is 'default' and it has been created at .../dokeos/main/inc/lib/fckeditor/toolbars/ .
  55. // For using your customized toolbars, crate another directory, for example 'custom' at the same path, i.e.
  56. // create .../dokeos/main/inc/lib/fckeditor/toolbars/custom/ . Then, copy the original php-definition files
  57. // from .../dokeos/main/inc/lib/fckeditor/toolbars/default/ to the new one. Change the following configuration setting, so it to
  58. // point to the new directory:
  59. // $config['ToolbarSets']['Directory'] = 'custom';
  60. // Then, you may modify the newly copied toolbar definitions at your will, just keep correct php-syntax.
  61. // It is not mandatory you to create custom files for all the toolbars. In case of missing file in the directory with the
  62. // custom toobar definitions the system would read the correspondent "factory" toolbar definition (form 'default' directory).
  63. $config['ToolbarSets']['Directory'] = 'default';
  64. // You may try this provided example of custom toolbars:
  65. //$config['ToolbarSets']['Directory'] = 'extended';
  66. /*
  67. * Plugins.
  68. */
  69. // customizations : This plugin has been developed by the Dokeos team for editor's integration within the system.
  70. // The plugin should be loaded first, before all other plugins. Please, do not disable it.
  71. $config['LoadPlugin'][] = 'customizations';
  72. // dragresizetable & tablecommands : Plugins for improvement table-related operations.
  73. $config['LoadPlugin'][] = 'dragresizetable';
  74. $config['LoadPlugin'][] = 'tablecommands';
  75. // prompt : This plugin is a dialog implementation as a replacemet of the javascript function prompt().
  76. // It provides consistent appearance and avoiding activation of browser's blocking features.
  77. $config['LoadPlugin'][] = 'prompt';
  78. // audio: Adds a dialog for inserting audio files (.mp3).
  79. $config['LoadPlugin'][] = 'audio';
  80. // glossary: this plugin add a term from glossary tool in Dokeos.
  81. if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
  82. $config['LoadPlugin'][] = 'glossary';
  83. }
  84. // MP3 : This is the old plugin for inserting audio files. Probably this plugin will be removed at the next release.
  85. // If you wish to use it, disable the "audio" plugin first.
  86. //$config['LoadPlugin'][] = 'MP3';
  87. // ImageManager : Adds a dialog (image gallery) for inserting images. The advanced file manager has its own functionality
  88. // for previewing images. This is why we load this plugin only in case when the simple file manager is used.
  89. if (!(api_get_setting('advanced_filemanager') == 'true')) {
  90. $config['LoadPlugin'][] = 'ImageManager';
  91. // The following setting defines how the simple file manager to be opened:
  92. // true - in a new browser window, or
  93. // false - as a dialog whithin the page (recommended).
  94. $config['OpenImageManagerInANewWindow'] = false;
  95. }
  96. // fckEmbedMovies : Adds a dilog for inserting video files.
  97. $config['LoadPlugin'][] = 'fckEmbedMovies';
  98. // flvPlayer : Adds a dilog for inserting video files (.flv, .mp4), so they to be viewed through a flash-based player.
  99. $config['LoadPlugin'][] = 'flvPlayer';
  100. // youtube : Adds a dilog for inserting YouTube video-streams.
  101. if (api_is_allowed_to_edit() || api_is_platform_admin()) { // (not for students)
  102. $config['LoadPlugin'][] = 'youtube';
  103. }
  104. // googlemaps : Adds a dilog for inserting Google maps.
  105. $config['LoadPlugin'][] = 'googlemaps';
  106. // API-key for the "googlemaps" plugin.
  107. // The following key is valid for http://localhost (see myconfig.js where this key has been activated by default).
  108. // You must get a new for each server where you intend to use the plugin 'googlemaps'. Just get the key for free after
  109. // agreeing with the Terms of Use of the GoogleMaps API from here: http://www.google.com/apis/maps/signup.html.
  110. // At you choice, you may activate the newly obtained API-key using the following setting or using the same setting in myconfig.js.
  111. // Activated here API-key is not cached by browsers and overrides the key from the configuration file myconfig.js.
  112. //$config['GoogleMaps_Key'] = 'ABQIAAAAlXu5Pw6DFAUgqM2wQn01gxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSy5hTGQdsosYD3dz6faZHVrO-02A';
  113. // mimetex : Adds a dilog for inserting mathematical formulas. In order this plugin to work prpoperly, preliminary changes
  114. // in your server configuration have to be done. The MimeTex executable file has to be installed, see the installation guide.
  115. //
  116. // Uncomment the line below (remove the double slash at the beginning) to enable the 'mimetex' plugin:
  117. //$config['LoadPlugin'][] = 'mimetex';
  118. //
  119. // Some additional settings become active only when the 'mimetex' plugin has been enabled:
  120. //
  121. // The following setting determines whether MimeTeX executable file has been installed on the server or not. This file should be accessible
  122. // for browsers at address http://mysite.com/cgi-bin/mimetex.cgi (Linux) or at address http://mysite.com/cgi-bin/mimetex.exe (Windows).
  123. // How to test manually: Open your browser and enter in the address bar something like http://mysite.com/cgi-bin/mimetex.cgi?hello
  124. // By default, the system tries to detect the MimeTeX executable file automatically.
  125. // If you are sure that the MimeTeX executable has been correctly installed, you may set this option to boolean true value.
  126. $config['MimetexExecutableInstalled'] = 'detect'; // 'detect' (default), true, false
  127. // Sometimes detection fails (due to slow DNS service, security restrictions, ...). For better probability of success,
  128. // the following methods for detection have been defined:
  129. // 'bootstrap_ip' - detection is tried at address like http://127.0.0.1/cgi-bin/mimetex.cgi
  130. // 'localhost' - detection is tried at address like http://localhost/cgi-bin/mimetex.cgi
  131. // 'ip' - detection is tried at ip address, for example http://192.168.0.1/cgi-bin/mimetex.cgi
  132. // 'server_name' - detection is tried at address based on server's name, for example http://mysite.com/cgi-bin/mimetex.cgi
  133. if (IS_WINDOWS_OS) {
  134. $config['MimetexExecutableDetectionMethod'] = 'bootstrap_ip'; // 'bootstrap_ip' for better chance on Windows (no firewall blocking).
  135. } else {
  136. $config['MimetexExecutableDetectionMethod'] = 'server_name';
  137. }
  138. // Timeout for MimeTeX executable file detection - keep this value as low as possible, especially on Windows servers.
  139. $config['MimetexExecutableDetectionTimeout'] = 0.05;
  140. // asciimath : Yet another plugin for inserting mathematical formulas.
  141. // An additional javascript library ASCIIMathML.js has to be inserted within the pages with formulas.
  142. // After enabling it, this plugin is configured to work with full-page html documents out-of-the box.
  143. // You may try it in the "Documents" and "Wiki" tools.
  144. // Browser compatibility: Internet Explorer 6.0+ with MathPlayer plugin, Mozilla Firefox 2.0+, Opera 9.5+
  145. //$config['LoadPlugin'][] = 'asciimath';
  146. // wikilink : Adds a dialog for inserting wiki-formatted links.
  147. $config['LoadPlugin'][] = 'wikilink';
  148. // imgmap : Adds a dialog for assigning hyperlinks to specified image areas.
  149. $config['LoadPlugin'][] = 'imgmap';
  150. /*
  151. * File manager.
  152. */
  153. // Set true/false to enable/disable the file manager for different resource types:
  154. $config['LinkBrowser'] = true; // for any type of files;
  155. $config['ImageBrowser'] = true; // for images;
  156. $config['FlashBrowser'] = true ; // for flash objects;
  157. $config['MP3Browser'] = true ; // for audio files;
  158. $config['VideoBrowser'] = true ; // for video files;
  159. $config['MediaBrowser'] = true ; // for video (flv) files.
  160. // The following setting defines how the simple file manager to be opened:
  161. // true - in a new browser window, or
  162. // false - as a dialog whithin the page (recommended).
  163. $config['OpenSimpleFileManagerInANewWindow'] = false;
  164. // How the advanced file manager to be opened:
  165. // true - in a new browser window, or
  166. // false - as a dialog whithin the page (recommended).
  167. $config['OpenAdvancedFileManagerInANewWindow'] = false;
  168. /*
  169. * Separate settings for the simple and the advanced file manager modes.
  170. */
  171. if ((api_get_setting('advanced_filemanager') == 'true')) {
  172. // For the advanced file manager.
  173. // Dialog/window size for browsing:
  174. // any type of files;
  175. $config['LinkBrowserWindowWidth'] = 800 ;
  176. $config['LinkBrowserWindowHeight'] = 580 ;
  177. // images;
  178. $config['ImageBrowserWindowWidth'] = 800 ;
  179. $config['ImageBrowserWindowHeight'] = 580 ;
  180. // flash objects;
  181. $config['FlashBrowserWindowWidth'] = 800 ;
  182. $config['FlashBrowserWindowHeight'] = 580 ;
  183. // audio files;
  184. $config['MP3BrowserWindowWidth'] = 800 ;
  185. $config['MP3BrowserWindowHeight'] = 580 ;
  186. // video files;
  187. $config['VideoBrowserWindowWidth'] = 800 ;
  188. $config['VideoBrowserWindowHeight'] = 580 ;
  189. // video (flv) files.
  190. $config['MediaBrowserWindowWidth'] = 800 ;
  191. $config['MediaBrowserWindowHeight'] = 580 ;
  192. // Set true/false to enable/disable the quick-upload tabs for different resource types:
  193. $config['LinkUpload'] = false; // for any type of files;
  194. $config['ImageUpload'] = false; // for images;
  195. $config['FlashUpload'] = false; // for flash objects;
  196. $config['MP3Upload'] = false; // for audio files;
  197. $config['VideoUpload'] = false; // for video files;
  198. $config['MediaUpload'] = false; // for video (flv) files.
  199. } else {
  200. // For the simple file manager.
  201. // Dialog/window size for browsing:
  202. // any type of files;
  203. $config['LinkBrowserWindowWidth'] = 780 ;
  204. $config['LinkBrowserWindowHeight'] = 500 ;
  205. // images;
  206. $config['ImageBrowserWindowWidth'] = 780 ;
  207. $config['ImageBrowserWindowHeight'] = 500 ;
  208. // flash objects;
  209. $config['FlashBrowserWindowWidth'] = 780 ;
  210. $config['FlashBrowserWindowHeight'] = 500 ;
  211. // audio files;
  212. $config['MP3BrowserWindowWidth'] = 780 ;
  213. $config['MP3BrowserWindowHeight'] = 500 ;
  214. // video files;
  215. $config['VideoBrowserWindowWidth'] = 780 ;
  216. $config['VideoBrowserWindowHeight'] = 500 ;
  217. // video (flv) files.
  218. $config['MediaBrowserWindowWidth'] = 780 ;
  219. $config['MediaBrowserWindowHeight'] = 500 ;
  220. // Set true/false to enable/disable the quick-upload tabs for different resource types:
  221. $config['LinkUpload'] = true; // for any type of files;
  222. $config['ImageUpload'] = true; // for images;
  223. $config['FlashUpload'] = true; // for flash objects;
  224. $config['MP3Upload'] = true; // for audio files;
  225. $config['VideoUpload'] = true; // for video files;
  226. $config['MediaUpload'] = true; // for video (flv) files.
  227. }
  228. /*
  229. * Miscellaneous settings.
  230. */
  231. // The items in the format drop-down list.
  232. //$config['FontFormats'] = 'p;h1;h2;h3;h4;h5;h6;pre;address;div';
  233. $config['FontFormats'] = 'p;h1;h2;h3;h4;h5'; // A reduced format list.
  234. // The following setting guarantees white backgroung for the editing area
  235. // for all browsers. You may disable or change it if you wish.
  236. $config['EditorAreaStyles'] = 'body { background-color: #ffffff; }';
  237. /*
  238. * Additional note:
  239. * For debugging purposes the editor may run using original source versions of its javascripts, not the "compressed" versions.
  240. * In case of problems, when you need to use this feature, go to the platform administration settings page and switch the system
  241. * into "test server" mode. Don't forged to switch it back to "production server" mode after testing.
  242. */