*** empty log message ***

svn path=/trunk/boinc/; revision=4318
This commit is contained in:
David Anderson 2004-10-12 18:05:38 +00:00
parent d67a52bd2c
commit 35fbdcc866
6 changed files with 41 additions and 4 deletions

View File

@ -18211,11 +18211,16 @@ Lana 8 Oct 2004
David 9 Oct 2004
- forum updates (from Janus Kristensen)
NOTE: to use this new code you'll have to update
your database (see html/ops/db_update.php)
html/
inc/
forum.inc
forum_show.inc
util.inc
ops/
db_update.php
user/
edit_forum_preferences_action.php
edit_forum_preferences_form.php
@ -18295,3 +18300,16 @@ David 11 Oct 2004
filesys.h
gui_rpc_client.C,h
util.h
David 12 Oct 2004
- fixes to forum code (from Janus)
- finished checkin of 9 Oct (forgot db_update.php)
html/
inc/
forum.inc
ops/
db_update.php
user/
edit_forum_preferences_action.php
edit_forum_preferences_form.php

View File

@ -363,6 +363,7 @@ create table post (
-- post that was replied to, if any
score double not null,
votes integer not null,
signature tinyint(1) unsigned not null default 0,
primary key (id)
);
@ -386,6 +387,8 @@ create table forum_preferences (
link_popup tinyint(1) unsigned not null default 0,
mark_as_read_timestamp integer not null default 0,
special_user integer not null default 0,
jump_to_unread tinyint(1) unsigned not null default 1,
hide_signatures tinyint(1) unsigned not null default 0,
primary key (userid)
) type=MyISAM;

View File

@ -574,7 +574,7 @@ function externalize_links($text){
while (true){ //Find a link
$linkpos=strpos($text,"<a ",$i);
if ($linkpos===false) break;
$out.= substr($text,$i,$linkpos-$i)."<a target=\"_new\""; //Replace with target='_new'
$out.= substr($text,$i,$linkpos-$i)."<a target=\"_new\" "; //Replace with target='_new'
$i=$linkpos+3;
}
$out.=substr($text,$i);

View File

@ -106,6 +106,17 @@ function update_9_26_2004() {
);
}
//update_9_26_2004();
function update_10_09_2004() {
mysql_query(
"alter table forum_preferences add jump_to_unread tinyint(1) unsigned not null default 1"
);
mysql_query(
"alter table forum_preferences add hide_signatures tinyint(1) unsigned not null default 0"
);
mysql_query(
"alter table post add signature tinyint(1) unsigned not null default 0"
);
}
//update_10_09_2004();
?>

View File

@ -52,7 +52,12 @@
$no_signature_by_default=($HTTP_POST_VARS["signature_enable"]=="");
$signature = mysql_escape_string($HTTP_POST_VARS["signature"]);
$signature = sanitize_html(stripslashes($HTTP_POST_VARS["signature"]));
if (strlen($signature)>250) {
echo "You signature was too long, please keep it less than 250 chars";
exit();
}
$signature = mysql_escape_string($signature);
$forum_sort = $HTTP_POST_VARS["forum_sort"];
$thread_sort = $HTTP_POST_VARS["thread_sort"];

View File

@ -69,7 +69,7 @@ row2("Display and Behavior".
if ($user->no_signature_by_default==0){$enable_signature="checked=\"true\"";} else {$enable_signature="";}
row2("Signature for message boards".
"<br><a href=html.php><font size=-2>May contain HTML tags</font></a><font size=-2><br>Max length (including newlines) is 254 chars.",
"<br><a href=html.php><font size=-2>May contain HTML tags</font></a><font size=-2><br>Max length (including newlines) is 250 chars.",
"
<textarea name=signature rows=4 cols=50>".stripslashes($user->signature)."</textarea>
<br><input type=\"checkbox\" name=\"signature_enable\" ".$enable_signature."> Attach signature by default"