Tidy up
[moodle.git] / admin / settings / appearance.php
CommitLineData
1ea1bcb3 1<?php // $Id$
2
3// This file defines settingpages and externalpages under the "appearance" category
4
5$ADMIN->add('appearance', new admin_category('themes', get_string('themes')));
6// "themesettings" settingpage
8f8ed475 7$temp = new admin_settingpage('themesettings', get_string('themesettings', 'admin'));
1ea1bcb3 8$temp->add(new admin_setting_configtext('themelist', get_string('themelist', 'admin'), get_string('configthemelist','admin'), '', PARAM_NOTAGS));
9$temp->add(new admin_setting_configcheckbox('allowuserthemes', get_string('allowuserthemes', 'admin'), get_string('configallowuserthemes', 'admin'), 0));
10$temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('allowcoursethemes', 'admin'), get_string('configallowcoursethemes', 'admin'), 0));
11$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1));
12$temp->add(new admin_setting_configcheckbox('showblocksonmodpages', get_string('showblocksonmodpages', 'admin'), get_string('configshowblocksonmodpages', 'admin'), 0));
13$temp->add(new admin_setting_configcheckbox('tabselectedtofront', get_string('tabselectedtofronttext', 'admin'), get_string('tabselectedtofront', 'admin'), 0));
14$ADMIN->add('themes', $temp);
15$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
16
17
18// "frontpage" settingpage
19$temp = new admin_settingpage('frontpage', get_string('frontpage','admin'));
20$temp->add(new admin_setting_sitesettext('fullname', get_string('fullsitename'), get_string('fullsitenamehelp'), '', PARAM_NOTAGS));
21$temp->add(new admin_setting_sitesettext('shortname', get_string('shortsitename'), get_string('shortsitenamehelp'), '', PARAM_NOTAGS));
22$temp->add(new admin_setting_special_frontpagedesc());
23$temp->add(new admin_setting_sitesetcheckbox('numsections', get_string('sitesection'), get_string('sitesectionhelp'), 1));
24$temp->add(new admin_setting_sitesetselect('newsitems', get_string('newsitemsnumber'), get_string('newsitemsnumberhelp'), 3, array('0' => '0 ' . get_string('newsitems'),
25 '1' => '1 ' . get_string('newsitem'),
26 '2' => '2 ' . get_string('newsitems'),
27 '3' => '3 ' . get_string('newsitems'),
28 '4' => '4 ' . get_string('newsitems'),
29 '5' => '5 ' . get_string('newsitems'),
30 '6' => '6 ' . get_string('newsitems'),
31 '7' => '7 ' . get_string('newsitems'),
32 '8' => '8 ' . get_string('newsitems'),
33 '9' => '9 ' . get_string('newsitems'),
34 '10' => '10 ' . get_string('newsitems'))));
35$temp->add(new admin_setting_courselist_frontpage(false)); // non-loggedin version of the setting (that's what the parameter is for :) )
36$temp->add(new admin_setting_courselist_frontpage(true)); // loggedin version of the setting
42093cca 37$temp->add(new admin_setting_configtext('coursesperpage', get_string('coursesperpage', 'admin'), get_string('configcoursesperpage', 'admin'), '20', PARAM_INT));
1ea1bcb3 38$ADMIN->add('appearance', $temp);
39
40
41// "filtersettings" settingpage
42$temp = new admin_settingpage('filtersettings', get_string('filtersettings', 'admin'));
43$temp->add(new admin_setting_configselect('cachetext', get_string('cachetext', 'admin'), get_string('configcachetext', 'admin'), 60, array(604800 => get_string('numdays','',7),
44 86400 => get_string('numdays','',1),
45 43200 => get_string('numhours','',12),
46 10800 => get_string('numhours','',3),
47 7200 => get_string('numhours','',2),
48 3600 => get_string('numhours','',1),
49 2700 => get_string('numminutes','',45),
50 1800 => get_string('numminutes','',30),
51 900 => get_string('numminutes','',15),
52 600 => get_string('numminutes','',10),
53 540 => get_string('numminutes','',9),
54 480 => get_string('numminutes','',8),
55 420 => get_string('numminutes','',7),
56 360 => get_string('numminutes','',6),
57 300 => get_string('numminutes','',5),
58 240 => get_string('numminutes','',4),
59 180 => get_string('numminutes','',3),
60 120 => get_string('numminutes','',2),
61 60 => get_string('numminutes','',1),
62 30 => get_string('numseconds','',30),
63 0 => get_string('no'))));
64$temp->add(new admin_setting_configselect('filteruploadedfiles', get_string('filteruploadedfiles', 'admin'), get_string('configfilteruploadedfiles', 'admin'), 0, array('0' => get_string('none'),
65 '1' => get_string('allfiles'),
66 '2' => get_string('htmlfilesonly'))));
67$temp->add(new admin_setting_configcheckbox('filtermatchoneperpage', get_string('filtermatchoneperpage', 'admin'), get_string('configfiltermatchoneperpage', 'admin'), 0));
68$temp->add(new admin_setting_configcheckbox('filtermatchonepertext', get_string('filtermatchonepertext', 'admin'), get_string('configfiltermatchonepertext', 'admin'), 0));
69$temp->add(new admin_setting_configcheckbox('filterall', get_string('filterall', 'admin'), get_string('configfilterall', 'admin'), 0));
70$ADMIN->add('appearance', $temp);
71
72
73
74
75
76// "htmleditor" settingpage
77$temp = new admin_settingpage('htmleditor', get_string('htmleditor', 'admin'));
78$temp->add(new admin_setting_configcheckbox('htmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1));
79$temp->add(new admin_setting_configtext('editorbackgroundcolor', get_string('editorbackgroundcolor', 'admin'), get_string('edhelpbgcolor'), '#ffffff', PARAM_NOTAGS));
80$temp->add(new admin_setting_configtext('editorfontfamily', get_string('editorfontfamily', 'admin'), get_string('edhelpfontfamily'), 'Trebuchet MS,Verdana,Arial,Helvetica,sans-serif', PARAM_NOTAGS));
81$temp->add(new admin_setting_configtext('editorfontsize', get_string('editorfontsize', 'admin'), get_string('edhelpfontsize'), '', PARAM_NOTAGS));
82$temp->add(new admin_setting_special_editorfontlist());
83$temp->add(new admin_setting_configcheckbox('editorkillword', get_string('editorkillword', 'admin'), get_string('edhelpcleanword'), 1));
84if (!empty($CFG->aspellpath)) { // make aspell settings disappear if path isn't set
85 $temp->add(new admin_setting_configcheckbox('editorspelling', get_string('editorspelling', 'admin'), get_string('editorspellinghelp', 'admin'), 0));
86 $temp->add(new admin_setting_special_editordictionary());
87}
88$temp->add(new admin_setting_special_editorhidebuttons());
89$ADMIN->add('appearance', $temp);
90
91// "documentation" settingpage
92$temp = new admin_settingpage('documentation', get_string('moodledocs'));
93$temp->add(new admin_setting_configtext('docroot', get_string('docroot', 'admin'), get_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
94$temp->add(new admin_setting_configcheckbox('doctonewwindow', get_string('doctonewwindow', 'admin'), get_string('configdoctonewwindow', 'admin'), 0));
95$ADMIN->add('appearance', $temp);
96
97$temp = new admin_settingpage('mymoodle', get_string('mymoodle', 'admin'));
98$temp->add(new admin_setting_configcheckbox('mymoodleredirect', get_string('mymoodleredirect', 'admin'), get_string('configmymoodleredirect', 'admin'), 0));
99$ADMIN->add('appearance', $temp);
100
101?>