This sets the default value for on-the-fly forum subscription.
Defaults to on = subscribe.
(Also fixed a bug in postgres7.sql - a missing field for htmleditor!)
$string['assigncreators'] = "Assign course creators";
$string['assignteachers'] = "Assign teachers";
$string['authentication'] = "Authentication";
+$string['autosubscribe'] = "Forum auto-subscribe";
+$string['autosubscribeno'] = "No: don't automatically subscribe me to forums";
+$string['autosubscribeyes'] = "Yes: when I post, subscribe me to that forum";
$string['availablecourses'] = "Available Courses";
$string['backup'] = "Backup";
$string['backupdir'] = "backupdata";
print_simple_box("Thanks for upgrading!<p>There are many changes since the last release. Please read the release notes carefully. If you are using CUSTOM themes you will need to edit them. You will also need to check your site's config.php file.", "center", "50%", "$THEME->cellheading", "20", "noticebox");
}
+ if ($oldversion < 2003052300) {
+ table_column("user", "", "autosubscribe", "integer", "1", "unsigned", "1", "", "htmleditor");
+ }
+
return $result;
}
`mailformat` tinyint(1) unsigned NOT NULL default '1',
`maildisplay` tinyint(2) unsigned NOT NULL default '2',
`htmleditor` tinyint(1) unsigned NOT NULL default '1',
+ `autosubscribe` tinyint(1) unsigned NOT NULL default '1',
`timemodified` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
print_simple_box("Thanks for upgrading!<p>There are many changes since the last release. Please read the release notes carefully. If you are using CUSTOM themes you will need to edit them. You will also need to check your site's config.php file.", "center", "50%", "$THEME->cellheading", "20", "noticebox");
}
+ if ($oldversion < 2003052300) {
+ table_column("user", "", "autosubscribe", "integer", "1", "unsigned", "1", "", "htmleditor");
+ }
+
return $result;
}
?>
description text,
mailformat integer NOT NULL default '1',
maildisplay integer NOT NULL default '2',
+ htmleditor integer NOT NULL default '1',
+ autosubscribe integer NOT NULL default '1',
timemodified integer NOT NULL default '0',
CONSTRAINT user_username_uk UNIQUE (username)
);
$options[1] = get_string("subscribestop", "forum");
choose_from_menu($options, "unsubscribe", 0, "");
} else {
+ $default = 0;
+ if (!empty($USER->autosubscribe)) {
+ $default = 1;
+ }
$options[0] = get_string("subscribestop", "forum");
$options[1] = get_string("subscribestart", "forum");
- choose_from_menu($options, "subscribe", 0, "");
+ choose_from_menu($options, "subscribe", $default, "");
}
}
helpbutton("subscription", get_string("subscription", "forum"), "forum");
choose_from_menu ($choices, "mailformat", $user->mailformat, "") ?>
</td>
</tr>
+<tr valign=top>
+ <td><p><?php print_string("autosubscribe") ?>:</td>
+ <td><?php
+ unset($choices);
+ $choices["1"] = get_string("autosubscribeyes");
+ $choices["0"] = get_string("autosubscribeno");
+ choose_from_menu ($choices, "autosubscribe", $user->autosubscribe, "") ?>
+ </td>
+</tr>
<?php if ($CFG->htmleditor) { ?>
<tr valign=top>
<td><p><?php print_string("textediting") ?>:</td>
// database to determine whether upgrades should
// be performed (see lib/db/*.php)
-$version = 2003052000; // The current version is a date (YYYYMMDDXX)
+$version = 2003052300; // The current version is a date (YYYYMMDDXX)
$release = "1.0.9 Beta 1 +"; // User-friendly version number
-?>
\ No newline at end of file
+?>