diff --git a/checkin_notes b/checkin_notes
index 745d2cd914..1e115c0585 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -11782,7 +11782,7 @@ Rom 28 Nov 2007
boinccas.dll
boinccas95.dll
-David 288 2007
+David 28 Nov 2007
- Bolt development
db/
@@ -11796,3 +11796,14 @@ David 288 2007
user/
bolt.php
bolt_sched.php
+
+David 29 Nov 2007
+ - web: clean up forum prefs forum, and add a Confirm when reset
+
+ html/
+ inc/
+ bolt_ex.inc
+ forum_db.inc
+ user/
+ edit_forum_preferences_action.php
+ edit_forum_preferences_form.php
diff --git a/html/inc/bolt_ex.inc b/html/inc/bolt_ex.inc
index 357dbf56f3..071c9745cb 100644
--- a/html/inc/bolt_ex.inc
+++ b/html/inc/bolt_ex.inc
@@ -1,8 +1,21 @@
$choice";
+ global $bolt_mode;
+ global $bolt_index;
+
+ switch ($bolt_mode) {
+ case BOLT_MODE_SHOW:
+ foreach ($choices as $choice) {
+ echo " $choice";
+ }
+ break;
+ case BOLT_MODE_SCORE:
+ $resp = $_GET["q_$bolt_index"];
+
+ break;
+ case BOLT_MODE_ANSWER:
+ break;
}
}
?>
diff --git a/html/inc/forum_db.inc b/html/inc/forum_db.inc
index 3d72415a98..7430194bfe 100644
--- a/html/inc/forum_db.inc
+++ b/html/inc/forum_db.inc
@@ -127,7 +127,7 @@ class BoincForumPrefs {
$prefs = self::lookup_userid($user->id);
if (!$prefs) {
self::insert("(userid, thread_sorting, pm_notification) values ($user->id, 8, 0)");
- $prefs = new BoincForumPrefs();
+ $prefs = self::lookup_userid($user->id);
$prefs->userid = $user->id;
$prefs->thread_sorting = 6;
}
diff --git a/html/user/edit_forum_preferences_action.php b/html/user/edit_forum_preferences_action.php
index abe1592994..e27a165436 100644
--- a/html/user/edit_forum_preferences_action.php
+++ b/html/user/edit_forum_preferences_action.php
@@ -1,8 +1,5 @@
+
+ ";
+ page_tail();
+ exit();
+}
+
// If the user has requested a reset of preferences;
// preserve a few fields.
//
diff --git a/html/user/edit_forum_preferences_form.php b/html/user/edit_forum_preferences_form.php
index 0e7d2478f7..91b06ec875 100644
--- a/html/user/edit_forum_preferences_form.php
+++ b/html/user/edit_forum_preferences_form.php
@@ -35,12 +35,12 @@ if (strlen($user->prefs->avatar)){
}
row1("Identity");
row2("Avatar
- An image representing you.
- Format: JPG or /PNG. Size: at most 4 KB, 100x100 pixels",
+ An image representing you.
+ Format: JPG or /PNG. Size: at most 4 KB, 100x100 pixels",
"Don't use an avatar Use this uploaded avatar: "
);
if (strlen($user->prefs->avatar)){
- row2("Avatar preview This is how your avatar will look",
+ row2("Avatar preview This is how your avatar will look",
"prefs->avatar."\" width=\"100\" height=\"100\">");
}
@@ -53,7 +53,7 @@ $signature=stripslashes($user->prefs->signature);
$maxlen=250;
row2(
"Signature
- Max length (including newlines) is $maxlen chars.".
+ Max length is $maxlen chars.".
html_info(),
"
@@ -62,7 +62,7 @@ row2(
);
if ($user->prefs->signature!=""){
row2("Signature preview".
- " This is how your signature will look in the forums",
+ " This is how your signature will look in the forums",
output_transform($user->prefs->signature)
);
}
@@ -78,11 +78,16 @@ row2(
""
);
-
-row1("Message display");
-row2("How to sort threads and posts",
- "Threads: ".select_from_array("forum_sort", $forum_sort_styles, $user->prefs->forum_sorting)." Posts: ".select_from_array("thread_sort", $thread_sort_styles, $user->prefs->thread_sorting)
-);
+if ($user->prefs->hide_avatars){
+ $forum_hide_avatars = "checked=\"checked\"";
+} else {
+ $forum_hide_avatars = "";
+}
+if ($user->prefs->hide_signatures){
+ $forum_hide_signatures = "checked=\"checked\"";
+} else {
+ $forum_hide_signatures = "";
+}
if ($user->prefs->link_popup){
$forum_link_popup="checked=\"checked\"";
@@ -108,43 +113,26 @@ if ($user->prefs->ignore_sticky_posts){
$forum_minimum_wrap_postcount = intval($user->prefs->minimum_wrap_postcount);
$forum_display_wrap_postcount = intval($user->prefs->display_wrap_postcount);
+row1("Message display");
row2(
- " How to treat links and images in the forum and how to act on unread posts",
- " Show images as links
- Open links in new window/tab
- Jump to first new post in thread automatically
- Do not reorder sticky posts
-
- If a thread contains more than this number of posts
- only display the first one and this many of the last ones "
-);
-if ($user->prefs->hide_avatars){
- $forum_hide_avatars = "checked=\"checked\"";
-} else {
- $forum_hide_avatars = "";
-}
-if ($user->prefs->hide_signatures){
- $forum_hide_signatures = "checked=\"checked\"";
-} else {
- $forum_hide_signatures = "";
-}
-$forum_low_rating_threshold = $user->prefs->low_rating_threshold;
-$forum_high_rating_threshold = $user->prefs->high_rating_threshold;
-
-row1("Message filtering");
-row2(
- " What to display If you set both your high and low thresholds to 0 or empty they will reset to the default values",
+ "What to display",
" Hide avatar images
Hide signatures
+ Show images as links
+ Open links in new window/tab
"
);
-// the following deprecated
- //
- //Filter threshold (default: ".DEFAULT_LOW_RATING_THRESHOLD.")
- //
- //Emphasize threshold (default: ".DEFAULT_HIGH_RATING_THRESHOLD.")
- // Messages rated lower than the filter threshold will be filtered and messages rated higher than the emphasize threshold will be emphasized."
+row2("How to sort",
+ "Threads: ".select_from_array("forum_sort", $forum_sort_styles, $user->prefs->forum_sorting)." Posts: ".select_from_array("thread_sort", $thread_sort_styles, $user->prefs->thread_sorting)."
+ Jump to first new post in thread automatically
+ Do not reorder sticky posts
+ If a thread contains more than this number of posts
+ only display the first one and this many of the last ones
+ "
+);
+
+row1("Message filtering");
$filtered_userlist = get_ignored_list($user);
$forum_filtered_userlist = "";
@@ -160,20 +148,20 @@ for ($i=0; $iIgnore specific users You can define a list of users to ignore.",
+ " Ignore message board posts and private messages from these users.",
"$forum_filtered_userlist
User ID (For instance: 123456789)
- Please note that you can only filter a limited number of users.
"
);
row1("Update");
-row2("Click here to update message board preferences", "");
+row2("Click here to update message board preferences", "");
echo "\n";
+row1("Reset");
row2("Or click here to reset preferences to the defaults",
- ""
+ ""
);
end_table();
page_tail();