diff --git a/html/ops/db_update.php b/html/ops/db_update.php index addf3aabbb..4d18132131 100644 --- a/html/ops/db_update.php +++ b/html/ops/db_update.php @@ -293,6 +293,12 @@ function update_8_26_2005() { function update_9_22_2005() { do_query("update user set country='Macedonia' where country='Macedonia, The Former Yugoslav Republic of'"); } -//update_10_25_2004(); + +function update_11_24_2005(){ + do_query("ALTER TABLE `forum_preferences` ADD `minimum_wrap_postcount` INT DEFAULT '100' NOT NULL AFTER `high_rating_threshold` , +ADD `display_wrap_postcount` INT DEFAULT '75' NOT NULL AFTER `minimum_wrap_postcount`"); +} + +//update_11_24_2005(); ?> diff --git a/html/user/edit_forum_preferences_action.php b/html/user/edit_forum_preferences_action.php index db0330be7f..a98cf3019b 100644 --- a/html/user/edit_forum_preferences_action.php +++ b/html/user/edit_forum_preferences_action.php @@ -56,6 +56,8 @@ $ignore_sticky_posts = ($HTTP_POST_VARS["forum_ignore_sticky_posts"]!=""); $low_rating_threshold = intval($HTTP_POST_VARS["forum_low_rating_threshold"]); $high_rating_threshold = intval($HTTP_POST_VARS["forum_high_rating_threshold"]); $add_user_to_filter = ($HTTP_POST_VARS["add_user_to_filter"]!=""); +$minimum_wrap_postcount = intval($HTTP_POST_VARS["forum_minimum_wrap_postcount"]); +$display_wrap_postcount = intval($HTTP_POST_VARS["forum_display_wrap_postcount"]); $no_signature_by_default=($HTTP_POST_VARS["signature_enable"]==""); $signature = sanitize_html(stripslashes($HTTP_POST_VARS["signature"])); @@ -94,6 +96,10 @@ for ($i=1;$i$minimum_wrap_postcount) $display_wrap_postcount=round($minimum_wrap_postcount/2); +if ($display_wrap_postcount<5) $display_wrap_postcount=5; + $result = mysql_query( "update forum_preferences set avatar_type='".$avatar_type."', @@ -109,7 +115,9 @@ $result = mysql_query( hide_signatures='".$hide_signatures."', low_rating_threshold='".$low_rating_threshold."', ignorelist='".$real_ignorelist."', - high_rating_threshold='".$high_rating_threshold."' + high_rating_threshold='".$high_rating_threshold."', + minimum_wrap_postcount='".$minimum_wrap_postcount."', + display_wrap_postcount='".$display_wrap_postcount."' where userid=$user->id" ); if ($result) { diff --git a/html/user/edit_forum_preferences_form.php b/html/user/edit_forum_preferences_form.php index 01745d37f0..d87b693f04 100644 --- a/html/user/edit_forum_preferences_form.php +++ b/html/user/edit_forum_preferences_form.php @@ -66,6 +66,9 @@ if ($user->images_as_links==1){$forum_image_as_link="checked=\"checked\"";} else if ($user->jump_to_unread==1){$forum_jump_to_unread="checked=\"checked\"";} else {$forum_jump_to_unread="";} if ($user->ignore_sticky_posts==1){$forum_ignore_sticky_posts="checked=\"checked\"";} else {$forum_ignore_sticky_posts="";} +$forum_minimum_wrap_postcount = intval($user->minimum_wrap_postcount); +$forum_display_wrap_postcount = intval($user->display_wrap_postcount); + row2("Display and Behavior". "
How to treat links and images in the forum
and how to act on unread posts
", "
@@ -73,6 +76,10 @@ row2("Display and Behavior". 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
+
" );