diff --git a/phpBB/db/mssql_basic.sql b/phpBB/db/mssql_basic.sql index 144c583f26..65d761815d 100644 --- a/phpBB/db/mssql_basic.sql +++ b/phpBB/db/mssql_basic.sql @@ -34,12 +34,12 @@ INSERT INTO phpbb_config VALUES ('posts_per_page','15'); INSERT INTO phpbb_config VALUES ('topics_per_page','50'); INSERT INTO phpbb_config VALUES ('hot_threshold','25'); INSERT INTO phpbb_config VALUES ('max_poll_options','10'); +INSERT INTO phpbb_config VALUES ('max_sig_chars','255'); INSERT INTO phpbb_config VALUES ('board_email_sig','Thanks, The Management'); INSERT INTO phpbb_config VALUES ('board_email','youraddress@yourdomain.com'); INSERT INTO phpbb_config VALUES ('smtp_delivery','0'); INSERT INTO phpbb_config VALUES ('smtp_host',''); INSERT INTO phpbb_config VALUES ('require_activation','0'); -INSERT INTO phpbb_config VALUES ('require_admin_activation','0'); INSERT INTO phpbb_config VALUES ('flood_interval','15'); INSERT INTO phpbb_config VALUES ('avatar_filesize','6144'); INSERT INTO phpbb_config VALUES ('avatar_max_width','80'); diff --git a/phpBB/db/mssql_schema.sql b/phpBB/db/mssql_schema.sql index f88c5fd914..ad29e5323e 100644 --- a/phpBB/db/mssql_schema.sql +++ b/phpBB/db/mssql_schema.sql @@ -438,7 +438,7 @@ CREATE TABLE [phpbb_users] ( [user_icq] [varchar] (15) NULL , [user_website] [varchar] (50) NULL , [user_from] [varchar] (200) NULL , - [user_sig] [varchar] (255) NULL , + [user_sig] [text] NULL , [user_sig_bbcode_uid] [char] (10) NULL, [user_aim] [varchar] (50) NULL , [user_yim] [varchar] (50) NULL , diff --git a/phpBB/db/mysql_basic.sql b/phpBB/db/mysql_basic.sql index 679a20a1f3..ce52b05bf8 100644 --- a/phpBB/db/mysql_basic.sql +++ b/phpBB/db/mysql_basic.sql @@ -28,12 +28,12 @@ INSERT INTO phpbb_config VALUES ('posts_per_page','15'); INSERT INTO phpbb_config VALUES ('topics_per_page','50'); INSERT INTO phpbb_config VALUES ('hot_threshold','25'); INSERT INTO phpbb_config VALUES ('max_poll_options','10'); +INSERT INTO phpbb_config VALUES ('max_sig_chars','255'); INSERT INTO phpbb_config VALUES ('board_email_sig','Thanks, The Management'); INSERT INTO phpbb_config VALUES ('board_email','youraddress@yourdomain.com'); INSERT INTO phpbb_config VALUES ('smtp_delivery','0'); INSERT INTO phpbb_config VALUES ('smtp_host',''); INSERT INTO phpbb_config VALUES ('require_activation','0'); -INSERT INTO phpbb_config VALUES ('require_admin_activation','0'); INSERT INTO phpbb_config VALUES ('flood_interval','15'); INSERT INTO phpbb_config VALUES ('avatar_filesize','6144'); INSERT INTO phpbb_config VALUES ('avatar_max_width','80'); diff --git a/phpBB/db/mysql_schema.sql b/phpBB/db/mysql_schema.sql index c7a4ecd818..76e62f2e0f 100644 --- a/phpBB/db/mysql_schema.sql +++ b/phpBB/db/mysql_schema.sql @@ -358,8 +358,7 @@ CREATE TABLE phpbb_themes ( span_class1 varchar(25) default NULL, span_class2 varchar(25) default NULL, span_class3 varchar(25) default NULL, - PRIMARY KEY (themes_id), - KEY themes_name (themes_name) + PRIMARY KEY (themes_id) ); @@ -476,7 +475,7 @@ CREATE TABLE phpbb_users ( user_icq varchar(15), user_website varchar(100), user_from varchar(100), - user_sig varchar(255), + user_sig text, user_sig_bbcode_uid char(10), user_aim varchar(255), user_yim varchar(255), diff --git a/phpBB/db/oracle_basic.sql b/phpBB/db/oracle_basic.sql index 4386150cb4..301e6d1e6c 100755 --- a/phpBB/db/oracle_basic.sql +++ b/phpBB/db/oracle_basic.sql @@ -28,6 +28,7 @@ INSERT INTO phpbb_config VALUES ('posts_per_page','15'); INSERT INTO phpbb_config VALUES ('topics_per_page','50'); INSERT INTO phpbb_config VALUES ('hot_threshold','25'); INSERT INTO phpbb_config VALUES ('max_poll_options','10'); +INSERT INTO phpbb_config VALUES ('max_sig_chars','255'); INSERT INTO phpbb_config VALUES ('board_email_sig','Thanks, The Management'); INSERT INTO phpbb_config VALUES ('board_email','youraddress@yourdomain.com'); INSERT INTO phpbb_config VALUES ('smtp_delivery','0'); diff --git a/phpBB/db/oracle_schema.sql b/phpBB/db/oracle_schema.sql index 58f13740a4..193464efde 100755 --- a/phpBB/db/oracle_schema.sql +++ b/phpBB/db/oracle_schema.sql @@ -340,7 +340,6 @@ CREATE TABLE phpbb_themes ( span_class3 varchar(25), CONSTRAINT phpbb_themes_pkey PRIMARY KEY (themes_id) ); -CREATE INDEX themes_name_phpbb_themes_index ON phpbb_themes (themes_name); /* -------------------------------------------------------- @@ -442,7 +441,7 @@ CREATE TABLE phpbb_users ( user_occ varchar(100), user_from varchar(100), user_interests varchar(255), - user_sig varchar(255), + user_sig varchar(2000), user_sig_bbcode_uid char(10), user_style number(4), user_aim varchar(255), diff --git a/phpBB/db/postgres_basic.sql b/phpBB/db/postgres_basic.sql index c8cc1d3136..a1c2452cbe 100755 --- a/phpBB/db/postgres_basic.sql +++ b/phpBB/db/postgres_basic.sql @@ -28,12 +28,12 @@ INSERT INTO phpbb_config VALUES ('posts_per_page','15'); INSERT INTO phpbb_config VALUES ('topics_per_page','50'); INSERT INTO phpbb_config VALUES ('hot_threshold','25'); INSERT INTO phpbb_config VALUES ('max_poll_options','10'); +INSERT INTO phpbb_config VALUES ('max_sig_chars','255'); INSERT INTO phpbb_config VALUES ('board_email_sig','Thanks, The Management'); INSERT INTO phpbb_config VALUES ('board_email','youraddress@yourdomain.com'); INSERT INTO phpbb_config VALUES ('smtp_delivery','0'); INSERT INTO phpbb_config VALUES ('smtp_host',''); INSERT INTO phpbb_config VALUES ('require_activation','0'); -INSERT INTO phpbb_config VALUES ('require_admin_activation','0'); INSERT INTO phpbb_config VALUES ('flood_interval','15'); INSERT INTO phpbb_config VALUES ('avatar_filesize','6144'); INSERT INTO phpbb_config VALUES ('avatar_max_width','80'); diff --git a/phpBB/db/postgres_schema.sql b/phpBB/db/postgres_schema.sql index 6befe005ba..f16b39bb49 100644 --- a/phpBB/db/postgres_schema.sql +++ b/phpBB/db/postgres_schema.sql @@ -321,7 +321,6 @@ CREATE TABLE phpbb_themes ( span_class3 varchar(25), CONSTRAINT phpbb_themes_pkey PRIMARY KEY (themes_id) ); -CREATE INDEX themes_name_phpbb_themes_index ON phpbb_themes (themes_name); /* -------------------------------------------------------- @@ -429,7 +428,7 @@ CREATE TABLE phpbb_users ( user_occ varchar(100), user_from varchar(100), user_interests varchar(255), - user_sig varchar(255), + user_sig text, user_sig_bbcode_uid char(10), user_style int4, user_aim varchar(255), diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php index 13f39cdc2d..3f58f5aebb 100755 --- a/phpBB/language/lang_english.php +++ b/phpBB/language/lang_english.php @@ -459,10 +459,12 @@ $lang['to_return_index'] = "to return to the index"; $lang['Password_mismatch'] = "The passwords you entered did not match"; $lang['Invalid_username'] = "The username you requested has been taken or disallowed"; +$lang['Signature_too_long'] = "Your signature is too long"; $lang['Fields_empty'] = "You must fill in the required fields"; $lang['Avatar_filetype'] = "The avatar filetype must be .jpg, .gif or .png"; -$lang['Avatar_filesize'] = "The avatar image file size must more than 0 kB and less than " . round($board_config['avatar_filesize'] / 1024) . " kB"; -$lang['Avatar_imagesize'] = "The avatar must be less than " . $board_config['avatar_max_width'] . " pixels wide and " . $board_config['avatar_max_height'] . " pixels high"; +$lang['Avatar_filesize'] = "The avatar image file size must be more than 0 kB and less than"; // followed by xx kB, xx being the size +$lang['kB'] = "kB"; +$lang['Avatar_imagesize'] = "The avatar must be less than " . $board_config['avatar_max_width'] . " pixels wide and " . $board_config['avatar_max_height'] . " pixels high"; $lang['Welcome_subject'] = "Welcome to " . $board_config['sitename'] . " Forums"; $lang['New_account_subject'] = "New user account"; @@ -832,13 +834,22 @@ $lang['Ban_update_sucessful'] = "The banlist has been updated sucessfully"; // Configuration +$lang['General_Config'] = "General Configuration"; +$lang['Config_explain'] = "The form below will allow you to customize all the general board options. For User and Forum configurations use the related links on the left hand side."; +$lang['General_settings'] = "General Board Settings"; +$lang['Site_name'] = "Site name"; +$lang['Acct_activation'] = "Enable account activation"; + + $lang['Config_updated'] = "Forum Configuration Updated Sucessfully"; + // Forum Management $lang['Remove'] = "Remove"; $lang['Action'] = "Action"; $lang['Update_order'] = "Update Order"; + // Smiley Management $lang['smile_remove_err'] = "Error Deleting Smiley!"; $lang['smiley_return'] = "Return to smiley listing"; diff --git a/phpBB/profile.php b/phpBB/profile.php index 92f94f7039..f8f1d27181 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -517,6 +517,24 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) } } + if( $signature != "" ) + { + if( strlen($signature) > $board_config['max_sig_chars'] ) + { + $error = TRUE; + if(isset($error_msg)) + { + $error_msg .= "
"; + } + $error_msg .= $lang['Signature_too_long']; + } + else + { + $signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : ""; + $signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid); + } + } + if($mode == "register") { // @@ -573,7 +591,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $error_msg .= $lang['Only_one_avatar']; } - if(isset($HTTP_POST_VARS['avatardel']) && $mode == "editprofile") + if( isset($HTTP_POST_VARS['avatardel']) && $mode == "editprofile" ) { if(file_exists("./".$board_config['avatar_path']."/".$userdata['user_avatar'])) { @@ -581,7 +599,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $avatar_sql = ", user_avatar = ''"; } } - else if(!empty($user_avatar_loc)) + else if( $user_avatar_loc != "" ) { if($board_config['allow_avatar_upload']) { @@ -594,21 +612,21 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) // // Opera appends the image name after the type, not big, not clever! // - preg_match("'(image\/[a-z]+)'", $user_avatar_type, $user_avatar_type); + preg_match("'image\/[x\-]*([a-z]+)'", $user_avatar_type, $user_avatar_type); $user_avatar_type = $user_avatar_type[1]; switch($user_avatar_type) { - case "image/jpeg": + case "jpeg": $imgtype = '.jpg'; break; - case "image/pjpeg": + case "pjpeg": $imgtype = '.jpg'; break; - case "image/gif": + case "gif": $imgtype = '.gif'; break; - case "image/png": + case "png": $imgtype = '.png'; break; default: @@ -649,13 +667,14 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) else { $error = true; - $error_msg = (!empty($error_msg)) ? $error_msg . "
" . $lang['Avatar_filesize'] : $lang['Avatar_filesize']; + $error_filesize = $lang['Avatar_filesize'] . " " . round($board_config['avatar_filesize'] / 1024) . " " . $lang['kB']; + $error_msg = (!empty($error_msg)) ? $error_msg . "
" . $error_filesize : $error_filesize; } } else { $error = true; - $error_msg = (!empty($error_msg)) ? $error_msg . "
" . $lang['Avatar_filetype'] : $lang['Avatar_filetype']; + echo $error_msg = (!empty($error_msg)) ? $error_msg . "
" . $lang['Avatar_filetype'] : $lang['Avatar_filetype']; } } // if ... allow_avatar_upload } @@ -668,9 +687,9 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) // to, look for a :[xxxx]/ or, if that doesn't // exist assume port 80 (http) // - preg_match("/^(http:\/\/)?([^\/]+?)\:?([0-9]*)\/(.*)$/", $user_avatar_url, $url_ary); + preg_match("/^(http:\/\/)?([a-z0-9\.]+)\:?([0-9]*)\/(.*)$/", $user_avatar_url, $url_ary); - if(!empty($url_ary[4])) + if( !empty($url_ary[4]) ) { $port = (!empty($url_ary[3])) ? $url_ary[3] : 80; @@ -687,29 +706,29 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) @fputs($fsock, "Connection: close\r\n\r\n"); unset($avatar_data); - while(!feof($fsock)) + while(!@feof($fsock)) { - $avatar_data .= fread($fsock, $board_config['avatar_filesize']); + $avatar_data .= @fread($fsock, $board_config['avatar_filesize']); } @fclose($fsock); - if(preg_match("/Content-Length\: ([0-9]+)[^\/]+Content-Type\: (image\/[a-z]+)[\s]+/i", $avatar_data, $file_data)) + if(preg_match("/Content-Length\: ([0-9]+)[^\/]+Content-Type\: image\/[x\-]*([a-z]+)[\s]+/i", $avatar_data, $file_data)) { $file_size = $file_data[1]; $file_type = $file_data[2]; switch($file_type) { - case "image/jpeg": + case "jpeg": $imgtype = '.jpg'; break; - case "image/pjpeg": + case "pjpeg": $imgtype = '.jpg'; break; - case "image/gif": + case "gif": $imgtype = '.gif'; break; - case "image/png": + case "png": $imgtype = '.png'; break; default: @@ -794,6 +813,12 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) } } // if ... allow_avatar_upload } + else if( !empty($user_avatar_name) ) + { + $error = true; + $error_filesize = $lang['Avatar_filesize'] . " " . round($board_config['avatar_filesize'] / 1024) . " " . $lang['kB']; + $error_msg = (!empty($error_msg)) ? $error_msg . "
" . $error_filesize : $error_filesize; + } } if($board_config['allow_avatar_remote'] && !$error) @@ -808,12 +833,6 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) } } - if( $signature != "" ) - { - $signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : ""; - $signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid); - } - if(!$error) { if($mode == "editprofile") @@ -1014,6 +1033,29 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) } } // if mode == register } + + // + // If an error occured we need to stripslashes on returned data + // + $username = stripslashes($username); + $email = stripslashes($email); + $password = ""; + $password_confirm = ""; + + $icq = stripslashes($icq); + $aim = stripslashes($aim); + $msn = stripslashes($msn); + $yim = stripslashes($yim); + + $website = stripslashes($website); + $location = stripslashes($location); + $occupation = stripslashes($occupation); + $interests = stripslashes($interests); + $signature = stripslashes($signature); + + $user_lang = stripslashes($user_lang); + $user_dateformat = stripslashes($user_dateformat); + } else if($mode == "editprofile") { diff --git a/phpBB/templates/PSO/admin/admin_config_body.tpl b/phpBB/templates/PSO/admin/admin_config_body.tpl index 771eeceeee..bec837c356 100644 --- a/phpBB/templates/PSO/admin/admin_config_body.tpl +++ b/phpBB/templates/PSO/admin/admin_config_body.tpl @@ -1,20 +1,20 @@
-

General Configuration

+

{L_CONFIGURATION_TITLE}

-

The form below will allow you to customize all the general board options. For User and Forum configurations use the related links on the left hand side.

+

{L_CONFIGURATION_EXPLAIN}

- + - + - - + + @@ -38,7 +38,7 @@ - + @@ -54,26 +54,26 @@ - + - + - + - + - + @@ -81,26 +81,30 @@ - + + + + + - + - + - + - + @@ -128,17 +132,15 @@ - - + + -
General Board Settings{L_GENERAL_SETTINGS}
Site Name:{L_SITE_NAME}:
Enable account activation:None   User   Admin{L_ACCT_ACTIVATION}:{L_NO}ne   User   Admin
Flood Interval:
Number of seconds a user must wait between posts
Override user style:
Replaces users style with the default
Yes   No {L_YES}   {L_NO}
Default Language:
Enable GZip Compression: Yes   No {L_YES}   {L_NO}
Enable Forum Pruning: Yes   No {L_YES}   {L_NO}
User/Forum Ability Settings
Allow HTML Yes   No {L_YES}   {L_NO}
Allow BBCode Yes   No {L_YES}   {L_NO}
Allow Smilies Yes   No {L_YES}   {L_NO}
Smilies Storage Path
Path under your phpBB root dir, e.g. images/smilies
Allow Signatures Yes   No {L_YES}   {L_NO}
Maximum signature length
Number of characters allowed
Allow Name Change Yes   No {L_YES}   {L_NO}
Avatar Settings
Allow local gallery avatars Yes   No {L_YES}   {L_NO}
Allow remote avatars
Avatars linked from another website
Yes   No {L_YES}   {L_NO}
Allow avatar uploading Yes   No {L_YES}   {L_NO}
Max. Avatar File Size
For uploaded avatar files
Use SMTP for delivery
Say yes if you want or have to send email via a server instead of the local mail function
Yes   NoUse SMTP for delivery
Say {L_YES} if you want or have to send email via a server instead of the local mail function
{L_YES}   {L_NO}
SMTP Server
- - + {S_HIDDEN_FIELDS}
diff --git a/phpBB/templates/subSilver/admin/admin_config_body.tpl b/phpBB/templates/subSilver/admin/admin_config_body.tpl index 771eeceeee..bec837c356 100644 --- a/phpBB/templates/subSilver/admin/admin_config_body.tpl +++ b/phpBB/templates/subSilver/admin/admin_config_body.tpl @@ -1,20 +1,20 @@
-

General Configuration

+

{L_CONFIGURATION_TITLE}

-

The form below will allow you to customize all the general board options. For User and Forum configurations use the related links on the left hand side.

+

{L_CONFIGURATION_EXPLAIN}

- + - + - - + + @@ -38,7 +38,7 @@ - + @@ -54,26 +54,26 @@ - + - + - + - + - + @@ -81,26 +81,30 @@ - + + + + + - + - + - + - + @@ -128,17 +132,15 @@ - - + + -
General Board Settings{L_GENERAL_SETTINGS}
Site Name:{L_SITE_NAME}:
Enable account activation:None   User   Admin{L_ACCT_ACTIVATION}:{L_NO}ne   User   Admin
Flood Interval:
Number of seconds a user must wait between posts
Override user style:
Replaces users style with the default
Yes   No {L_YES}   {L_NO}
Default Language:
Enable GZip Compression: Yes   No {L_YES}   {L_NO}
Enable Forum Pruning: Yes   No {L_YES}   {L_NO}
User/Forum Ability Settings
Allow HTML Yes   No {L_YES}   {L_NO}
Allow BBCode Yes   No {L_YES}   {L_NO}
Allow Smilies Yes   No {L_YES}   {L_NO}
Smilies Storage Path
Path under your phpBB root dir, e.g. images/smilies
Allow Signatures Yes   No {L_YES}   {L_NO}
Maximum signature length
Number of characters allowed
Allow Name Change Yes   No {L_YES}   {L_NO}
Avatar Settings
Allow local gallery avatars Yes   No {L_YES}   {L_NO}
Allow remote avatars
Avatars linked from another website
Yes   No {L_YES}   {L_NO}
Allow avatar uploading Yes   No {L_YES}   {L_NO}
Max. Avatar File Size
For uploaded avatar files
Use SMTP for delivery
Say yes if you want or have to send email via a server instead of the local mail function
Yes   NoUse SMTP for delivery
Say {L_YES} if you want or have to send email via a server instead of the local mail function
{L_YES}   {L_NO}
SMTP Server
- - + {S_HIDDEN_FIELDS}