MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trail...
[moodle.git] / mod / forum / settings.php
CommitLineData
220a90c5 1<?php //$Id$
2
3require_once($CFG->dirroot.'/mod/forum/lib.php');
4
220a90c5 5$settings->add(new admin_setting_configselect('forum_displaymode', get_string('displaymode', 'forum'),
65bcf17b 6 get_string('configdisplaymode', 'forum'), FORUM_MODE_NESTED, forum_get_layout_modes()));
220a90c5 7
8$settings->add(new admin_setting_configcheckbox('forum_replytouser', get_string('replytouser', 'forum'),
9 get_string('configreplytouser', 'forum'), 1));
10
11// Less non-HTML characters than this is short
12$settings->add(new admin_setting_configtext('forum_shortpost', get_string('shortpost', 'forum'),
13 get_string('configshortpost', 'forum'), 300, PARAM_INT));
14
15// More non-HTML characters than this is long
16$settings->add(new admin_setting_configtext('forum_longpost', get_string('longpost', 'forum'),
17 get_string('configlongpost', 'forum'), 600, PARAM_INT));
18
19// Number of discussions on a page
20$settings->add(new admin_setting_configtext('forum_manydiscussions', get_string('manydiscussions', 'forum'),
21 get_string('configmanydiscussions', 'forum'), 100, PARAM_INT));
22
e3ea4a75 23if (isset($CFG->maxbytes)) {
24 $settings->add(new admin_setting_configselect('forum_maxbytes', get_string('maxattachmentsize', 'forum'),
25 get_string('configmaxbytes', 'forum'), 512000, get_max_upload_sizes($CFG->maxbytes)));
26}
220a90c5 27
30a9aff5 28// Default number of attachments allowed per post in all forums
29$settings->add(new admin_setting_configtext('forum_maxattachments', get_string('maxattachments', 'forum'),
30 get_string('configmaxattachments', 'forum'), 1, PARAM_INT));
31
220a90c5 32// Default whether user needs to mark a post as read
33$settings->add(new admin_setting_configcheckbox('forum_trackreadposts', get_string('trackforum', 'forum'),
34 get_string('configtrackreadposts', 'forum'), 1));
35
36// Default number of days that a post is considered old
37$settings->add(new admin_setting_configtext('forum_oldpostdays', get_string('oldpostdays', 'forum'),
38 get_string('configoldpostdays', 'forum'), 14, PARAM_INT));
39
40// Default whether user needs to mark a post as read
41$settings->add(new admin_setting_configcheckbox('forum_usermarksread', get_string('usermarksread', 'forum'),
42 get_string('configusermarksread', 'forum'), 0));
43
44// Default time (hour) to execute 'clean_read_records' cron
45$options = array();
46for ($i=0; $i<24; $i++) {
47 $options[$i] = $i;
48}
49$settings->add(new admin_setting_configselect('forum_cleanreadtime', get_string('cleanreadtime', 'forum'),
50 get_string('configcleanreadtime', 'forum'), 2, $options));
51
52
53if (empty($CFG->enablerssfeeds)) {
54 $options = array(0 => get_string('rssglobaldisabled', 'admin'));
55 $str = get_string('configenablerssfeeds', 'forum').'<br />'.get_string('configenablerssfeedsdisabled2', 'admin');
56
57} else {
58 $options = array(0=>get_string('no'), 1=>get_string('yes'));
59 $str = get_string('configenablerssfeeds', 'forum');
60}
61$settings->add(new admin_setting_configselect('forum_enablerssfeeds', get_string('enablerssfeeds', 'admin'),
62 $str, 0, $options));
63
64$settings->add(new admin_setting_configcheckbox('forum_enabletimedposts', get_string('timedposts', 'forum'),
65 get_string('configenabletimedposts', 'forum'), 0));
66
f4528bdc 67$settings->add(new admin_setting_configcheckbox('forum_logblocked', get_string('logblocked', 'forum'),
68 get_string('configlogblocked', 'forum'), 1));
69
12f6d016 70$settings->add(new admin_setting_configcheckbox('forum_ajaxrating', get_string('ajaxrating', 'forum'),
71 get_string('configajaxrating', 'forum'), 0));
72
220a90c5 73?>