diff options
29 files changed, 426 insertions, 378 deletions
diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php index 4d98e63dad..11eed1fb2b 100644 --- a/phpBB/admin/admin_board.php +++ b/phpBB/admin/admin_board.php @@ -36,114 +36,60 @@ if(!$result = $db->sql_query($sql)) } else { -/* while($row = $db->sql_fetchrow($result)) { - $board_config[$row['config_var_name']] = stripslashes($row['config_var_value']); + $config_name = $row['config_name']; + $config_value = $row['config_value']; + $default_config[$config_name] = $config_value; + + $new[$config_name] = (isset($HTTP_POST_VARS[$config_name])) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; + + if($HTTP_POST_VARS['submit']) + { + $sql = "UPDATE " . CONFIG_TABLE . " SET + config_value = '".$new[$config_name]."' + WHERE config_name = '$config_name'"; + if( !$db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql); + } + } } -*/ - - $default_config = $db->sql_fetchrow($result); -} - -$sitename = (isset($HTTP_POST_VARS['sitename'])) ? $HTTP_POST_VARS['sitename'] : $default_config['sitename']; -$require_activation = (isset($HTTP_POST_VARS['require_activation'])) ? $HTTP_POST_VARS['require_activation'] : $default_config['require_activation']; -$flood_interval = (isset($HTTP_POST_VARS['flood_interval'])) ? $HTTP_POST_VARS['flood_interval'] : $default_config['flood_interval']; -$topics_per_page = (isset($HTTP_POST_VARS['topics_per_page'])) ? $HTTP_POST_VARS['topics_per_page'] : $default_config['topics_per_page']; -$posts_per_page = (isset($HTTP_POST_VARS['posts_per_page'])) ? $HTTP_POST_VARS['posts_per_page'] : $default_config['posts_per_page']; -$hot_topic = (isset($HTTP_POST_VARS['hot_topic'])) ? $HTTP_POST_VARS['hot_topic'] : $default_config['hot_threshold']; -$selected_template = (isset($HTTP_POST_VARS['template'])) ? $HTTP_POST_VARS['template'] : $default_config['sys_template']; -$template_select = template_select($selected_template, "../templates"); -$theme = (isset($HTTP_POST_VARS['theme'])) ? $HTTP_POST_VARS['theme'] : $default_config['default_theme']; -$theme_select = theme_select($theme); -$language = (isset($HTTP_POST_VARS['language'])) ? $HTTP_POST_VARS['language'] : $default_config['default_lang']; -$lang_select = language_select($language, "../language"); -$timezone = (isset($HTTP_POST_VARS['timezone'])) ? intval($HTTP_POST_VARS['timezone']) : $default_config['system_timezone']; -$timezone_select = tz_select($timezone); -$date_format = (isset($HTTP_POST_VARS['date_format'])) ? $HTTP_POST_VARS['date_format'] : $default_config['default_dateformat']; -$gzip = (isset($HTTP_POST_VARS['gzip'])) ? $HTTP_POST_VARS['gzip'] : $default_config['gzip_compress']; -$prune = (isset($HTTP_POST_VARS['prune'])) ? $HTTP_POST_VARS['prune'] : $default_config['prune_enable']; -$allow_html = (isset($HTTP_POST_VARS['allow_html'])) ? $HTTP_POST_VARS['allow_html'] : $default_config['allow_html']; -$allow_bbcode = (isset($HTTP_POST_VARS['allow_bbcode'])) ? $HTTP_POST_VARS['allow_bbcode'] : $default_config['allow_bbcode']; -$allow_smile = (isset($HTTP_POST_VARS['allow_smile'])) ? $HTTP_POST_VARS['allow_smile'] : $default_config['allow_smilies']; -$allow_sig = (isset($HTTP_POST_VARS['allow_sig'])) ? $HTTP_POST_VARS['allow_sig'] : $default_config['allow_sig']; -$allow_namechange = (isset($HTTP_POST_VARS['allow_namechange'])) ? $HTTP_POST_VARS['allow_namechange'] : $default_config['allow_namechange']; -$allow_avatars_local = (isset($HTTP_POST_VARS['allow_avatars_local'])) ? $HTTP_POST_VARS['allow_avatars_local'] : $default_config['allow_avatar_local']; -$allow_avatars_remote = (isset($HTTP_POST_VARS['allow_avatars_remote'])) ? $HTTP_POST_VARS['allow_avatars_remote'] : $default_config['allow_avatar_remote']; -$allow_avatars_upload = (isset($HTTP_POST_VARS['allow_avatars_upload'])) ? $HTTP_POST_VARS['allow_avatars_upload'] : $default_config['allow_avatar_upload']; -$avatar_filesize = (isset($HTTP_POST_VARS['avatar_filesize'])) ? $HTTP_POST_VARS['avatar_filesize'] : $default_config['avatar_filesize']; -$avatar_height = (isset($HTTP_POST_VARS['avatar_height'])) ? $HTTP_POST_VARS['avatar_height'] : $default_config['avatar_max_height']; -$avatar_width = (isset($HTTP_POST_VARS['avatar_width'])) ? $HTTP_POST_VARS['avatar_width'] : $default_config['avatar_max_width']; -$avatar_path = (isset($HTTP_POST_VARS['avatar_path'])) ? $HTTP_POST_VARS['avatar_path'] : $default_config['avatar_path']; -$admin_email = (isset($HTTP_POST_VARS['admin_email'])) ? $HTTP_POST_VARS['admin_email'] : $default_config['board_email_from']; -$email_sig = (isset($HTTP_POST_VARS['email_sig'])) ? $HTTP_POST_VARS['email_sig'] : $default_config['board_email']; -$use_smtp = (isset($HTTP_POST_VARS['use_smtp'])) ? $HTTP_POST_VARS['use_smtp'] : $default_config['smtp_delivery']; -$smtp_server = (isset($HTTP_POST_VARS['smtp_server'])) ? $HTTP_POST_VARS['smtp_server'] : $default_config['smtp_host']; - -$html_yes = ($allow_html) ? "checked=\"checked\"" : ""; -$html_no = (!$allow_html) ? "checked=\"checked\"" : ""; -$bbcode_yes = ($allow_bbcode) ? "checked=\"checked\"" : ""; -$bbcode_no = (!$allow_bbcode) ? "checked=\"checked\"" : ""; -$activation_yes = ($require_activation) ? "checked=\"checked\"" : ""; -$activation_no = (!$require_activation) ? "checked=\"checked\"" : ""; -$gzip_yes = ($gzip) ? "checked=\"checked\"" : ""; -$gzip_no = (!$gzip) ? "checked=\"checked\"" : ""; -$smile_yes = ($allow_smile) ? "checked=\"checked\"" : ""; -$smile_no = (!$allow_smile) ? "checked=\"checked\"" : ""; -$sig_yes = ($allow_sig) ? "checked=\"checked\"" : ""; -$sig_no = (!$allow_sig) ? "checked=\"checked\"" : ""; -$namechange_yes = ($allow_namechange) ? "checked=\"checked\"" : ""; -$namechange_no = (!$allow_namechange) ? "checked=\"checked\"" : ""; -$avatars_local_yes = ($allow_avatars_local) ? "checked=\"checked\"" : ""; -$avatars_local_no = (!$allow_avatars_local) ? "checked=\"checked\"" : ""; -$avatars_remote_yes = ($allow_avatars_remote) ? "checked=\"checked\"" : ""; -$avatars_remote_no = (!$allow_avatars_remote) ? "checked=\"checked\"" : ""; -$avatars_upload_yes = ($allow_avatars_upload) ? "checked=\"checked\"" : ""; -$avatars_upload_no = (!$allow_avatars_upload) ? "checked=\"checked\"" : ""; -$smtp_yes = ($use_smtp) ? "checked=\"checked\"" : ""; -$smtp_no = (!$use_smtp) ? "checked=\"checked\"" : ""; - -if($HTTP_POST_VARS['submit']) -{ - $sql = "UPDATE " . CONFIG_TABLE . " SET - sitename = '$sitename', - allow_html = $allow_html, - allow_bbcode = $allow_bbcode, - allow_smilies = $allow_smile, - allow_sig = $allow_sig, - allow_namechange = $allow_namechange, - allow_avatar_local = $allow_avatars_local, - allow_avatar_remote = $allow_avatars_remote, - allow_avatar_upload = $allow_avatars_upload, - posts_per_page = $posts_per_page, - topics_per_page = $topics_per_page, - hot_threshold = $hot_topic, - email_sig = '$email_sig', - email_from = '$admin_email', - smtp_delivery = $use_smtp, - smtp_host = '$smtp_server', - require_activation = $require_activation, - flood_interval = $flood_interval, - avatar_filesize = $avatar_filesize, - avatar_max_width = $avatar_width, - avatar_max_height = $avatar_height, - avatar_path = '$avatar_path', - default_theme = $theme, - default_lang = '$language', - default_dateformat = '$date_format', - system_timezone = $timezone, - sys_template = '$selected_template', - gzip_compress = $gzip, - prune_enable = $prune"; - - if( !$db->sql_query($sql) ) + if($HTTP_POST_VARS['submit']) { - message_die(GENERAL_ERROR, "Failed to update general configuration", "", __LINE__, __FILE__, $sql); + message_die(GENERAL_MESSAGE, $lang['Config_updated']); } - - message_die(GENERAL_MESSAGE, $lang['Config_updated']); } +$template_select = template_select($new['board_template'], 'board_template', "../templates"); +$theme_select = theme_select($new['default_theme'], 'default_theme'); +$lang_select = language_select($new['default_lang'], 'default_lang', "../language"); +$timezone_select = tz_select($new['board_timezone'], 'board_timezone'); + +$html_yes = ($new['allow_html']) ? "checked=\"checked\"" : ""; +$html_no = (!$new['allow_html']) ? "checked=\"checked\"" : ""; +$bbcode_yes = ($new['allow_bbcode']) ? "checked=\"checked\"" : ""; +$bbcode_no = (!$new['allow_bbcode']) ? "checked=\"checked\"" : ""; +$activation_yes = ($new['require_activation']) ? "checked=\"checked\"" : ""; +$activation_no = (!$new['require_activation']) ? "checked=\"checked\"" : ""; +$gzip_yes = ($new['gzip_compress']) ? "checked=\"checked\"" : ""; +$gzip_no = (!$new['gzip_compress']) ? "checked=\"checked\"" : ""; +$smile_yes = ($new['allow_smilies']) ? "checked=\"checked\"" : ""; +$smile_no = (!$new['allow_smilies']) ? "checked=\"checked\"" : ""; +$sig_yes = ($new['allow_sig']) ? "checked=\"checked\"" : ""; +$sig_no = (!$new['allow_sig']) ? "checked=\"checked\"" : ""; +$namechange_yes = ($new['allow_namechange']) ? "checked=\"checked\"" : ""; +$namechange_no = (!$new['allow_namechange']) ? "checked=\"checked\"" : ""; +$avatars_local_yes = ($new['allow_avatar_local']) ? "checked=\"checked\"" : ""; +$avatars_local_no = (!$new['allow_avatar_local']) ? "checked=\"checked\"" : ""; +$avatars_remote_yes = ($new['allow_avatar_remote']) ? "checked=\"checked\"" : ""; +$avatars_remote_no = (!$new['allow_avatar_remote']) ? "checked=\"checked\"" : ""; +$avatars_upload_yes = ($new['allow_avatar_upload']) ? "checked=\"checked\"" : ""; +$avatars_upload_no = (!$new['allow_avatar_upload']) ? "checked=\"checked\"" : ""; +$smtp_yes = ($new['smtp_delivery']) ? "checked=\"checked\"" : ""; +$smtp_no = (!$new['smtp_delivery']) ? "checked=\"checked\"" : ""; + + $template->set_filenames(array( "body" => "admin/admin_config_body.tpl") @@ -151,18 +97,18 @@ $template->set_filenames(array( $template->assign_vars(array( "S_CONFIG_ACTION" => append_sid("admin_board.$phpEx"), - "SITENAME" => $sitename, + "SITENAME" => $new['sitename'], "ACTIVATION_YES" => $activation_yes, "ACTIVATION_NO" => $activation_no, - "FLOOD_INTERVAL" => $flood_interval, - "TOPICS_PER_PAGE" => $topics_per_page, - "POSTS_PER_PAGE" => $posts_per_page, - "HOT_TOPIC" => $hot_topic, + "FLOOD_INTERVAL" => $new['flood_interval'], + "TOPICS_PER_PAGE" => $new['topics_per_page'], + "POSTS_PER_PAGE" => $new['posts_per_page'], + "HOT_TOPIC" => $new['hot_threshold'], "TEMPLATE_SELECT" => $template_select, "THEME_SELECT" => $theme_select, "LANG_SELECT" => $lang_select, "L_DATE_FORMAT_EXPLAIN" => $lang['Date_format_explain'], - "DATE_FORMAT" => $date_format, + "DEFAULT_DATEFORMAT" => $new['default_dateformat'], "TIMEZONE_SELECT" => $timezone_select, "GZIP_YES" => $gzip_yes, "GZIP_NO" => $gzip_no, @@ -182,19 +128,19 @@ $template->assign_vars(array( "AVATARS_REMOTE_NO" => $avatars_remote_no, "AVATARS_UPLOAD_YES" => $avatars_upload_yes, "AVATARS_UPLOAD_NO" => $avatars_upload_no, - "AVATAR_FILESIZE" => $avatar_filesize, - "AVATAR_HEIGHT" => $avatar_height, - "AVATAR_WIDTH" => $avatar_width, - "AVATAR_PATH" => $avatar_path, - "ADMIN_EMAIL" => $admin_email, - "EMAIL_SIG" => $email_sig, + "AVATAR_FILESIZE" => $new['avatar_filesize'], + "AVATAR_MAX_HEIGHT" => $new['avatar_max_height'], + "AVATAR_MAX_WIDTH" => $new['avatar_max_width'], + "AVATAR_PATH" => $new['avatar_path'], + "EMAIL_FROM" => $new['email_from'], + "EMAIL_SIG" => $new['email_sig'], "SMTP_YES" => $smtp_yes, "SMTP_NO" => $smtp_no, - "SMTP_SERVER" => $smtp_server) + "SMTP_HOST" => $new['smtp_host']) ); $template->pparse("body"); include('page_footer_admin.'.$phpEx); -?>
\ No newline at end of file +?> diff --git a/phpBB/admin/admin_mass_email.php b/phpBB/admin/admin_mass_email.php index b2f34f8ed3..9d62cdc169 100644 --- a/phpBB/admin/admin_mass_email.php +++ b/phpBB/admin/admin_mass_email.php @@ -90,7 +90,7 @@ if(isset($HTTP_POST_VARS['submit'])) } $g_list = $db->sql_fetchrowset($g_result); - $email_headers = "From: " . $board_config['board_email_from'] . "\r\n"; + $email_headers = "From: " . $board_config['board_email'] . "\r\n"; $msg = stripslashes($HTTP_POST_VARS["$f_msg"]); $email_headers .= 'bcc: '; @@ -102,7 +102,7 @@ if(isset($HTTP_POST_VARS['submit'])) } $email_headers .= $g_list[$i]['user_email']; } - mail($board_config['board_email_from'],$HTTP_POST_VARS["$f_title"],$HTTP_POST_VARS["$f_msg"],$email_headers); + mail($board_config['board_email'],$HTTP_POST_VARS["$f_title"],$HTTP_POST_VARS["$f_msg"],$email_headers); $notice = $lang['Messages'].' '.$lang['Sent'].'!'; } //Else, or if they already sent a message diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php index 103783dcd6..d476dc802d 100644 --- a/phpBB/admin/admin_users.php +++ b/phpBB/admin/admin_users.php @@ -109,7 +109,7 @@ if ( isset($HTTP_GET_VARS['submit']) ) { if(!isset($user_template)) { - $selected_template = $board_config['default_template']; + $selected_template = $board_config['board_template']; } $html_status = ($board_config['allow_html']) ? $lang['ON'] : $lang['OFF']; @@ -276,8 +276,8 @@ else if($HTTP_POST_VARS[submit] && $HTTP_POST_VARS['user_id']) $user_theme = ($HTTP_POST_VARS['theme']) ? $HTTP_POST_VARS['theme'] : $board_config['default_theme']; $user_lang = ($HTTP_POST_VARS['language']) ? $HTTP_POST_VARS['language'] : $board_config['default_lang']; - $user_timezone = (isset($HTTP_POST_VARS['timezone'])) ? $HTTP_POST_VARS['timezone'] : $board_config['default_timezone']; - $user_template = ($HTTP_POST_VARS['template']) ? $HTTP_POST_VARS['template'] : $board_config['default_template']; + $user_timezone = (isset($HTTP_POST_VARS['timezone'])) ? $HTTP_POST_VARS['timezone'] : $board_config['board_timezone']; + $user_template = ($HTTP_POST_VARS['template']) ? $HTTP_POST_VARS['template'] : $board_config['board_template']; $user_dateformat = ($HTTP_POST_VARS['dateformat']) ? trim($HTTP_POST_VARS['dateformat']) : $board_config['default_dateformat']; $user_status = (!empty($HTTP_POST_VARS['user_status'])) ? $HTTP_POST_VARS['user_status'] : 0; diff --git a/phpBB/admin/index.php b/phpBB/admin/index.php index c7d6ae0dea..8436fee577 100644 --- a/phpBB/admin/index.php +++ b/phpBB/admin/index.php @@ -141,7 +141,7 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' ) $total_users = get_db_stat('usercount'); $total_topics = get_db_stat('topiccount'); - $start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['default_timezone']); + $start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); $boarddays = (time() - $board_config['board_startdate']) / (24*60*60); @@ -397,7 +397,7 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' ) "ROW_CLASS" => $row_class, "USERNAME" => $username, "LOGGED_ON" => $logged_on, - "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow[$i]['session_time'], $board_config['default_timezone']), + "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow[$i]['session_time'], $board_config['board_timezone']), "LOCATION" => $location, "IP_ADDRESS" => $ip_address, "U_USER_PROFILE" => append_sid("admin_users.$phpEx?" . POST_USERS_URL . "=" . $onlinerow[$i]['user_id'])) diff --git a/phpBB/admin/page_header_admin.php b/phpBB/admin/page_header_admin.php index 8ef73f17f2..c17e9d61d9 100644 --- a/phpBB/admin/page_header_admin.php +++ b/phpBB/admin/page_header_admin.php @@ -60,17 +60,17 @@ $template->set_filenames(array( // // Do timezone text output // -if($board_config['default_timezone'] < 0) +if($board_config['board_timezone'] < 0) { - $s_timezone = $lang['All_times'] . " " .$lang['GMT'] . " - " . (-$board_config['default_timezone']) . " " . $lang['Hours']; + $s_timezone = $lang['All_times'] . " " .$lang['GMT'] . " - " . (-$board_config['board_timezone']) . " " . $lang['Hours']; } -else if($board_config['default_timezone'] == 0) +else if($board_config['board_timezone'] == 0) { $s_timezone = $lang['All_times'] . " " . $lang['GMT']; } else { - $s_timezone = $lang['All_times'] . " " . $lang['GMT'] ." + " . $board_config['default_timezone'] . " " . $lang['Hours']; + $s_timezone = $lang['All_times'] . " " . $lang['GMT'] ." + " . $board_config['board_timezone'] . " " . $lang['Hours']; } // @@ -113,7 +113,7 @@ $template->assign_vars(array( "S_TIMEZONE" => $s_timezone, "S_LOGIN_ACTION" => append_sid("../login.$phpEx"), "S_JUMPBOX_ACTION" => append_sid("../viewforum.$phpEx"), - "S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['default_timezone']), + "S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']), "T_HEAD_STYLESHEET" => $theme['head_stylesheet'], "T_BODY_BACKGROUND" => $theme['body_background'], diff --git a/phpBB/common.php b/phpBB/common.php index aa250de253..8e585b57e2 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -141,13 +141,16 @@ if(!$result = $db->sql_query($sql)) } else { -/* while($row = $db->sql_fetchrow($result)) { - $board_config[$row['config_var_name']] = stripslashes($row['config_var_value']); + $board_config[$row['config_name']] = $row['config_value']; } -*/ - + $board_config['allow_html_tags'] = split(",", $board_config['allow_html_tags']); + $board_config['board_email'] = str_replace("<br />", "\n", $board_config['email_sig']); + $board_config['default_template'] = stripslashes($board_config['sys_template']); + $board_config['board_timezone'] = $board_config['system_timezone']; + +/* $config = $db->sql_fetchrow($result); $board_config['board_disable'] = $config['board_disable']; @@ -171,7 +174,7 @@ else $board_config['default_theme'] = $config['default_theme']; $board_config['default_dateformat'] = stripslashes($config['default_dateformat']); $board_config['default_template'] = stripslashes($config['sys_template']); - $board_config['default_timezone'] = $config['system_timezone']; + $board_config['board_timezone'] = $config['system_timezone']; $board_config['default_lang'] = stripslashes($config['default_lang']); $board_config['board_email'] = stripslashes(str_replace("<br />", "\n", $config['email_sig'])); $board_config['board_email_from'] = stripslashes($config['email_from']); @@ -191,6 +194,7 @@ else $board_config['gzip_compress'] = $config['gzip_compress']; $board_config['smtp_delivery'] = $config['smtp_delivery']; $board_config['smtp_host'] = stripslashes($config['smtp_host']); +*/ } if($board_config['board_disable'] && !defined("IN_ADMIN")) @@ -205,4 +209,4 @@ if($board_config['board_disable'] && !defined("IN_ADMIN")) // $emailer = new emailer($board_config['smtp_delivery']); -?>
\ No newline at end of file +?> diff --git a/phpBB/config.php b/phpBB/config.php index b8cee67675..b0dc738f7f 100644 --- a/phpBB/config.php +++ b/phpBB/config.php @@ -26,16 +26,14 @@ // and fill in the required details // -/* // // MySQL // $dbms = "mysql"; -$dbhost = ""; -$dbname = ""; -$dbuser = ""; -$dbpasswd = ""; -*/ +$dbhost = "localhost"; +$dbname = "bartvb"; +$dbuser = "bartvb"; +$dbpasswd = "bvbdb="; /* // @@ -97,4 +95,4 @@ $dbpasswd = ""; // $table_prefix = "phpbb_"; -?>
\ No newline at end of file +?> diff --git a/phpBB/db/mssql_basic.sql b/phpBB/db/mssql_basic.sql index 1a16a50704..41f95fe10c 100644 --- a/phpBB/db/mssql_basic.sql +++ b/phpBB/db/mssql_basic.sql @@ -11,7 +11,48 @@ BEGIN TRANSACTION; /* -- Config */ -INSERT INTO phpbb_config (config_id, board_disable, board_startdate, sitename, cookie_name, cookie_path, cookie_domain, cookie_secure, session_length, allow_html, allow_html_tags, allow_bbcode, allow_smilies, allow_sig, allow_namechange, allow_theme_create, allow_avatar_local, allow_avatar_remote, allow_avatar_upload, override_themes, posts_per_page, topics_per_page, hot_threshold, email_sig, email_from, smtp_delivery, smtp_host, require_activation, flood_interval, max_poll_options, avatar_filesize, avatar_max_width, avatar_max_height, avatar_path, smilies_path, default_theme, default_lang, default_dateformat, system_timezone, sys_template, prune_enable, gzip_compress) VALUES (1, '', '', 'yourdomain.com', 'phpbb2mssql', '/', '', '', 600, '', 'b, u, i, pre, font color', 1, 1, 1, '', '', '', '', '', '', 10, 25, 10, '', '', '', '', '', 10, 10, 6144, 70, 70, 'images/avatars', 'images/smiles', 2, 'english', 'd M Y H:i', '', 'PSO', 1, ''); +INSERT INTO phpbb_config VALUES ('config_id','1'); +INSERT INTO phpbb_config VALUES ('board_disable','0'); +INSERT INTO phpbb_config VALUES ('board_startdate','994190324'); +INSERT INTO phpbb_config VALUES ('sitename','yourdomain.com'); +INSERT INTO phpbb_config VALUES ('cookie_name','phpbb2mysql'); +INSERT INTO phpbb_config VALUES ('cookie_path','/'); +INSERT INTO phpbb_config VALUES ('cookie_domain',''); +INSERT INTO phpbb_config VALUES ('cookie_secure','0'); +INSERT INTO phpbb_config VALUES ('session_length','900'); +INSERT INTO phpbb_config VALUES ('allow_html','0'); +INSERT INTO phpbb_config VALUES ('allow_html_tags','b,i,u,pre'); +INSERT INTO phpbb_config VALUES ('allow_bbcode','1'); +INSERT INTO phpbb_config VALUES ('allow_smilies','1'); +INSERT INTO phpbb_config VALUES ('allow_sig','1'); +INSERT INTO phpbb_config VALUES ('allow_namechange','0'); +INSERT INTO phpbb_config VALUES ('allow_theme_create','0'); +INSERT INTO phpbb_config VALUES ('allow_avatar_local','0'); +INSERT INTO phpbb_config VALUES ('allow_avatar_remote','1'); +INSERT INTO phpbb_config VALUES ('allow_avatar_upload','1'); +INSERT INTO phpbb_config VALUES ('override_themes','0'); +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 ('email_sig','Thanks, The Management'); +INSERT INTO phpbb_config VALUES ('email_from','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 ('flood_interval','15'); +INSERT INTO phpbb_config VALUES ('avatar_filesize','6144'); +INSERT INTO phpbb_config VALUES ('avatar_max_width','80'); +INSERT INTO phpbb_config VALUES ('avatar_max_height','80'); +INSERT INTO phpbb_config VALUES ('avatar_path','images/avatars'); +INSERT INTO phpbb_config VALUES ('smilies_path','images/smiles'); +INSERT INTO phpbb_config VALUES ('default_theme','2'); +INSERT INTO phpbb_config VALUES ('default_lang','english'); +INSERT INTO phpbb_config VALUES ('default_dateformat','D M d, Y g:i a'); +INSERT INTO phpbb_config VALUES ('board_timezone','-8'); +INSERT INTO phpbb_config VALUES ('board_template','PSO'); +INSERT INTO phpbb_config VALUES ('prune_enable','1'); +INSERT INTO phpbb_config VALUES ('gzip_compress','1'); /* -- Categories diff --git a/phpBB/db/mssql_schema.sql b/phpBB/db/mssql_schema.sql index 1b2afc47b4..48a9bbee58 100644 --- a/phpBB/db/mssql_schema.sql +++ b/phpBB/db/mssql_schema.sql @@ -168,48 +168,8 @@ CREATE TABLE [phpbb_categories] ( GO CREATE TABLE [phpbb_config] ( - [config_id] [int] NULL , - [board_disable] [smallint] NOT NULL , - [board_startdate] [int] NULL , - [sitename] [varchar] (100) NOT NULL , - [cookie_name] [varchar] (25) NULL , - [cookie_path] [varchar] (50) NULL , - [cookie_domain] [varchar] (100) NULL , - [cookie_secure] [smallint] NULL , - [session_length] [int] NULL , - [allow_html] [smallint] NULL , - [allow_html_tags] [varchar] (255) NULL , - [allow_bbcode] [smallint] NULL , - [allow_smilies] [smallint] NULL , - [allow_sig] [smallint] NULL , - [allow_namechange] [smallint] NULL , - [allow_theme_create] [smallint] NULL , - [allow_avatar_local] [smallint] NULL , - [allow_avatar_remote] [smallint] NULL , - [allow_avatar_upload] [smallint] NULL , - [override_themes] [smallint] NULL , - [posts_per_page] [int] NULL , - [topics_per_page] [int] NULL , - [hot_threshold] [int] NULL , - [email_sig] [varchar] (255) NULL , - [email_from] [varchar] (255) NULL , - [smtp_delivery] [smallint] NULL , - [smtp_host] [varchar] (100) NULL , - [require_activation] [smallint] NULL , - [flood_interval] [int] NULL , - [max_poll_options] [int] NULL , - [avatar_filesize] [int] NULL , - [avatar_max_width] [smallint] NULL , - [avatar_max_height] [smallint] NULL , - [avatar_path] [varchar] (50) NULL , - [smilies_path] [varchar] (50) NULL , - [default_theme] [int] NULL , - [default_lang] [varchar] (50) NULL , - [default_dateformat] [varchar] (15) NULL , - [system_timezone] [int] NULL , - [sys_template] [varchar] (50) NULL , - [prune_enable] [smallint] NULL , - [gzip_compress] [smallint] NULL + [config_name] [varchar] (255) NULL , + [config_value] [varchar] (255) NULL ) ON [PRIMARY] GO diff --git a/phpBB/db/mysql_basic.sql b/phpBB/db/mysql_basic.sql index 055fedc285..2115727d51 100644 --- a/phpBB/db/mysql_basic.sql +++ b/phpBB/db/mysql_basic.sql @@ -4,7 +4,48 @@ # $Id$ # -- Config -INSERT INTO phpbb_config (config_id, board_disable, sitename, cookie_name, cookie_path, cookie_domain, cookie_secure, session_length, allow_html, allow_html_tags, allow_bbcode, allow_smilies, allow_sig, allow_namechange, allow_theme_create, allow_avatar_local, allow_avatar_remote, allow_avatar_upload, override_themes, posts_per_page, topics_per_page, hot_threshold, max_poll_options, email_sig, email_from, require_activation, flood_interval, avatar_filesize, avatar_max_width, avatar_max_height, avatar_path, smilies_path, default_theme, default_lang, default_dateformat, system_timezone, sys_template, prune_enable, gzip_compress, board_startdate, smtp_delivery, smtp_host) VALUES (1,0,'yourdomain.com','phpbb2mysql','/','','',900,'','b,i,u,pre',1,1,1,'','','',1,1,'',15,50,25,10,'Thanks, The Management','youraddress@yourdomain.com','',15,6144,80,80,'images/avatars','images/smiles',2,'english','D M d, Y g:i a',-8,'PSO',1,1,994190324,'',''); +INSERT INTO phpbb_config VALUES ('config_id','1'); +INSERT INTO phpbb_config VALUES ('board_disable','0'); +INSERT INTO phpbb_config VALUES ('board_startdate','994190324'); +INSERT INTO phpbb_config VALUES ('sitename','yourdomain.com'); +INSERT INTO phpbb_config VALUES ('cookie_name','phpbb2mysql'); +INSERT INTO phpbb_config VALUES ('cookie_path','/'); +INSERT INTO phpbb_config VALUES ('cookie_domain',''); +INSERT INTO phpbb_config VALUES ('cookie_secure','0'); +INSERT INTO phpbb_config VALUES ('session_length','900'); +INSERT INTO phpbb_config VALUES ('allow_html','0'); +INSERT INTO phpbb_config VALUES ('allow_html_tags','b,i,u,pre'); +INSERT INTO phpbb_config VALUES ('allow_bbcode','1'); +INSERT INTO phpbb_config VALUES ('allow_smilies','1'); +INSERT INTO phpbb_config VALUES ('allow_sig','1'); +INSERT INTO phpbb_config VALUES ('allow_namechange','0'); +INSERT INTO phpbb_config VALUES ('allow_theme_create','0'); +INSERT INTO phpbb_config VALUES ('allow_avatar_local','0'); +INSERT INTO phpbb_config VALUES ('allow_avatar_remote','1'); +INSERT INTO phpbb_config VALUES ('allow_avatar_upload','1'); +INSERT INTO phpbb_config VALUES ('override_themes','0'); +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 ('email_sig','Thanks, The Management'); +INSERT INTO phpbb_config VALUES ('email_from','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 ('flood_interval','15'); +INSERT INTO phpbb_config VALUES ('avatar_filesize','6144'); +INSERT INTO phpbb_config VALUES ('avatar_max_width','80'); +INSERT INTO phpbb_config VALUES ('avatar_max_height','80'); +INSERT INTO phpbb_config VALUES ('avatar_path','images/avatars'); +INSERT INTO phpbb_config VALUES ('smilies_path','images/smiles'); +INSERT INTO phpbb_config VALUES ('default_theme','2'); +INSERT INTO phpbb_config VALUES ('default_lang','english'); +INSERT INTO phpbb_config VALUES ('default_dateformat','D M d, Y g:i a'); +INSERT INTO phpbb_config VALUES ('board_timezone','-8'); +INSERT INTO phpbb_config VALUES ('board_template','PSO'); +INSERT INTO phpbb_config VALUES ('prune_enable','1'); +INSERT INTO phpbb_config VALUES ('gzip_compress','1'); # -- Categories INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1); diff --git a/phpBB/db/mysql_schema.sql b/phpBB/db/mysql_schema.sql index 2f91f023f3..8baf9d38d8 100644 --- a/phpBB/db/mysql_schema.sql +++ b/phpBB/db/mysql_schema.sql @@ -91,52 +91,11 @@ CREATE TABLE phpbb_categories ( # DROP TABLE IF EXISTS phpbb_config; CREATE TABLE phpbb_config ( - config_id int(11) NOT NULL auto_increment, - board_disable tinyint(1) DEFAULT '0' NOT NULL, - board_startdate int(11), - sitename varchar(100), - cookie_name char(20), - cookie_path char(25), - cookie_domain char(50), - cookie_secure tinyint(1), - session_length int(11), - allow_html tinyint(1), - allow_html_tags char(255) DEFAULT 'b,u,i,pre,font color' NOT NULL, - allow_bbcode tinyint(1), - allow_smilies tinyint(1), - allow_sig tinyint(1), - allow_namechange tinyint(1), - allow_theme_create tinyint(1), - allow_avatar_local tinyint(1) DEFAULT '0' NOT NULL, - allow_avatar_remote tinyint(1) DEFAULT '0' NOT NULL, - allow_avatar_upload tinyint(1) DEFAULT '0' NOT NULL, - override_themes tinyint(3), - posts_per_page int(11), - topics_per_page int(11), - hot_threshold int(11), - max_poll_options int(11), - email_sig varchar(255), - email_from varchar(100), - smtp_delivery tinyint(1) DEFAULT '0' NOT NULL, - smtp_host varchar(50), - require_activation tinyint(1) DEFAULT '0' NOT NULL, - flood_interval int(4) NOT NULL, - avatar_filesize int(11) DEFAULT '6144' NOT NULL, - avatar_max_width smallint(6) DEFAULT '70' NOT NULL, - avatar_max_height smallint(6) DEFAULT '70' NOT NULL, - avatar_path varchar(255) DEFAULT 'images/avatars' NOT NULL, - smilies_path char(100) DEFAULT 'images/smiles' NOT NULL, - default_theme int(11) DEFAULT '1' NOT NULL, - default_lang varchar(255), - default_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL, - system_timezone int(11) DEFAULT '0' NOT NULL, - sys_template varchar(100) DEFAULT 'Default' NOT NULL, - prune_enable tinyint(1) DEFAULT '1' NOT NULL, - gzip_compress tinyint(1) DEFAULT '0' NOT NULL, - PRIMARY KEY (config_id) + config_name varchar(255) NOT NULL, + config_value varchar(255) NOT NULL, + PRIMARY KEY (config_name) ); - # -------------------------------------------------------- # # Table structure for table 'phpbb_disallow' @@ -570,4 +529,4 @@ CREATE TABLE phpbb_words ( word varchar(100) NOT NULL, replacement varchar(100) NOT NULL, PRIMARY KEY (word_id) -);
\ No newline at end of file +); diff --git a/phpBB/db/postgres_basic.sql b/phpBB/db/postgres_basic.sql index 6a403e52fa..849d984259 100755 --- a/phpBB/db/postgres_basic.sql +++ b/phpBB/db/postgres_basic.sql @@ -5,7 +5,48 @@ */ -- Config -INSERT INTO phpbb_config (config_id, board_disable, sitename, cookie_name, cookie_path, cookie_domain, cookie_secure, session_length, allow_html, allow_bbcode, allow_smilies, allow_sig, allow_namechange, posts_per_page, hot_threshold, topics_per_page, flood_interval, allow_theme_create, override_themes, email_sig, email_from, default_theme, default_lang, default_dateformat, system_timezone, sys_template, avatar_filesize, avatar_path, allow_avatar_upload, avatar_max_width, avatar_max_height, allow_avatar_local, allow_avatar_remote, max_poll_options) VALUES ( '1', '0', 'phpbb.com', 'phpbb2mysql', '/', '', '0', 600, '0', '1', '1', '1', '0', '10', '10', '25', '10', '0', '0', '', '', '2', 'english', 'd M Y H:i', '0', 'PSO', '6144', 'images/avatars', '0', '70', '70', '0', '0', '10'); +INSERT INTO phpbb_config VALUES ('config_id','1'); +INSERT INTO phpbb_config VALUES ('board_disable','0'); +INSERT INTO phpbb_config VALUES ('board_startdate','994190324'); +INSERT INTO phpbb_config VALUES ('sitename','yourdomain.com'); +INSERT INTO phpbb_config VALUES ('cookie_name','phpbb2mysql'); +INSERT INTO phpbb_config VALUES ('cookie_path','/'); +INSERT INTO phpbb_config VALUES ('cookie_domain',''); +INSERT INTO phpbb_config VALUES ('cookie_secure','0'); +INSERT INTO phpbb_config VALUES ('session_length','900'); +INSERT INTO phpbb_config VALUES ('allow_html','0'); +INSERT INTO phpbb_config VALUES ('allow_html_tags','b,i,u,pre'); +INSERT INTO phpbb_config VALUES ('allow_bbcode','1'); +INSERT INTO phpbb_config VALUES ('allow_smilies','1'); +INSERT INTO phpbb_config VALUES ('allow_sig','1'); +INSERT INTO phpbb_config VALUES ('allow_namechange','0'); +INSERT INTO phpbb_config VALUES ('allow_theme_create','0'); +INSERT INTO phpbb_config VALUES ('allow_avatar_local','0'); +INSERT INTO phpbb_config VALUES ('allow_avatar_remote','1'); +INSERT INTO phpbb_config VALUES ('allow_avatar_upload','1'); +INSERT INTO phpbb_config VALUES ('override_themes','0'); +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 ('email_sig','Thanks, The Management'); +INSERT INTO phpbb_config VALUES ('email_from','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 ('flood_interval','15'); +INSERT INTO phpbb_config VALUES ('avatar_filesize','6144'); +INSERT INTO phpbb_config VALUES ('avatar_max_width','80'); +INSERT INTO phpbb_config VALUES ('avatar_max_height','80'); +INSERT INTO phpbb_config VALUES ('avatar_path','images/avatars'); +INSERT INTO phpbb_config VALUES ('smilies_path','images/smiles'); +INSERT INTO phpbb_config VALUES ('default_theme','2'); +INSERT INTO phpbb_config VALUES ('default_lang','english'); +INSERT INTO phpbb_config VALUES ('default_dateformat','D M d, Y g:i a'); +INSERT INTO phpbb_config VALUES ('board_timezone','-8'); +INSERT INTO phpbb_config VALUES ('board_template','PSO'); +INSERT INTO phpbb_config VALUES ('prune_enable','1'); +INSERT INTO phpbb_config VALUES ('gzip_compress','1'); -- Categories INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1); diff --git a/phpBB/db/postgres_schema.sql b/phpBB/db/postgres_schema.sql index 162eab39a1..c4e37ea370 100644 --- a/phpBB/db/postgres_schema.sql +++ b/phpBB/db/postgres_schema.sql @@ -87,49 +87,9 @@ CREATE TABLE phpbb_categories ( Table structure for table phpbb_config -------------------------------------------------------- */ CREATE TABLE phpbb_config ( - config_id int2 NOT NULL, - board_disable int2 DEFAULT '0' NOT NULL, - board_startdate int4, - sitename varchar(100) NOT NULL, - cookie_name varchar(20), - cookie_path varchar(25), - cookie_domain varchar(50), - cookie_secure int2, - session_length int4, - allow_html int2 NOT NULL, - allow_html_tags char(255) DEFAULT 'b,u,i,pre,font color' NOT NULL, - allow_bbcode int2 NOT NULL, - allow_smilies int2 NOT NULL, - allow_sig int2 NOT NULL, - allow_namechange int2 NOT NULL, - allow_theme_create int2 NOT NULL, - allow_avatar_local int2 DEFAULT '0' NOT NULL, - allow_avatar_remote int2 DEFAULT '0' NOT NULL, - allow_avatar_upload int2 DEFAULT '0' NOT NULL, - posts_per_page int2 NOT NULL, - topics_per_page int2 NOT NULL, - hot_threshold int2 NOT NULL, - max_poll_options int, - email_sig varchar(255) NOT NULL, - email_from varchar(100) NOT NULL, - smtp_delivery int2 DEFAULT '0' NOT NULL, - smtp_host varchar(50), - require_activation int2 DEFAULT '0' NOT NULL, - default_theme int4 NOT NULL, - default_dateformat varchar(20) NOT NULL, - default_lang varchar(50) NOT NULL, - system_timezone int4 NOT NULL, - sys_template varchar(50) NOT NULL, - avatar_filesize int4 DEFAULT '6144' NOT NULL, - avatar_max_width int2 DEFAULT '70' NOT NULL, - avatar_max_height int2 DEFAULT '70' NOT NULL, - avatar_path varchar(255) DEFAULT 'images/avatars' NOT NULL, - smilies_path varchar(50) DEFAULT 'images/smiles' NOT NULL, - override_themes int2 NOT NULL, - flood_interval int NOT NULL, - prune_enable int2 DEFAULT '0' NOT NULL, - gzip_compress int2 DEFAULT '0' NOT NULL, - CONSTRAINT phpbb_config_pkey PRIMARY KEY (config_id) + config_name varchar(255) NOT NULL, + config_value varchar(255) NOT NULL, + CONSTRAINT phpbb_config_pkey PRIMARY KEY (config_name) ); diff --git a/phpBB/develop/convert_conf.php b/phpBB/develop/convert_conf.php new file mode 100644 index 0000000000..3e7fb0d606 --- /dev/null +++ b/phpBB/develop/convert_conf.php @@ -0,0 +1,96 @@ +<? + +$phpbb_root_path = "../"; + +include($phpbb_root_path . 'extension.inc'); +include($phpbb_root_path . 'config.'.$phpEx); +include($phpbb_root_path . 'includes/constants.'.$phpEx); +include($phpbb_root_path . 'includes/db.'.$phpEx); + +$sql = "SELECT * + FROM " . CONFIG_TABLE; +if(!$result = $db->sql_query($sql)) +{ + message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql); +} +else +{ + $board_config = $db->sql_fetchrow($result); +} + +$newconfigtable = $table_prefix . "newconfig"; + +$sql = "SELECT config_name, config_value FROM ". CONFIG_TABLE; +if( $result = $db->sql_query($sql) ) +{ + die("Don't run this script twice!<br>\n"); +} + +$sql = " CREATE TABLE $newconfigtable ( + config_name varchar(255) NOT NULL, + config_value varchar(255) NOT NULL, + PRIMARY KEY (config_name) + )"; +print "Creating temporary table: $newconfigtable<p>\n"; +if( !$result = $db->sql_query($sql) ) +{ + print("Couldn't create new config table<br>\n"); +} + +$error = 0; +while (list($name, $value) = each($board_config)) +{ + if(is_int($name)) + { + // Skip numeric array elements (we only want the associative array) + continue; + } + + // Rename sys_template + if ($name == 'sys_template') + { + $name = 'board_template'; + } + // Rename system_timezone + if ($name == 'system_timezone') + { + $name = 'board_timezone'; + } + print "$name = $value<br>\n"; + $value = addslashes($value); + $sql = "INSERT INTO $newconfigtable (config_name, config_value) VALUES ('$name', '$value')"; + if( !$result = $db->sql_query($sql) ) + { + print("Couldn't insert '$name' into new config table"); + $error = 1; + } +} + +if ($error != 1) +{ + print "Dropping old table<p>\n"; + $sql = "DROP TABLE ". CONFIG_TABLE; + if( !$result = $db->sql_query($sql) ) + { + die("Couldn't drop old table"); + } + print "Renaming $newconfigtable to ".CONFIG_TABLE."<p>\n"; + $sql = "ALTER TABLE $newconfigtable RENAME ".CONFIG_TABLE; + if( !$result = $db->sql_query($sql) ) + { + die("Couldn't rename new config table"); + } + print "Renaming ".SESSIONS_TABLE." to ".$table_prefix."sessions<br>\n"; + $sql = "ALTER TABLE ".SESSIONS_TABLE." RENAME ".$table_prefix."sessions"; + if( !$result = $db->sql_query($sql) ) + { + die("Couldn't rename session table"); + } + +} + +$db->sql_close(); + + echo "<BR><BR>COMPLETE<BR>"; + +?> diff --git a/phpBB/groupcp.php b/phpBB/groupcp.php index 305fbf1e68..232d2a8aec 100644 --- a/phpBB/groupcp.php +++ b/phpBB/groupcp.php @@ -67,7 +67,7 @@ if( isset($HTTP_POST_VARS['joingroup']) ) $moderator = $db->sql_fetchrowset($result); - $email_headers = "From: " . $board_config['board_email_from'] . "\r\n"; + $email_headers = "From: " . $board_config['board_email'] . "\r\n"; $emailer->use_template("group_request"); $emailer->email_address($moderator[0]['user_email']); @@ -78,7 +78,7 @@ if( isset($HTTP_POST_VARS['joingroup']) ) "SITENAME" => $board_config['sitename'], "GROUP_MODERATOR" => $moderator[0]['username'], "U_GROUPCP" => "http://".$SERVER_NAME.$PHP_SELF."?".POST_GROUPS_URL."=".$HTTP_POST_VARS[POST_GROUPS_URL], - "EMAIL_SIG" => $board_config['board_email']) + "EMAIL_SIG" => $board_config['email_sig']) ); $emailer->send(); $emailer->reset(); @@ -213,7 +213,7 @@ else if( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GR $group_name_row = $db->sql_fetchrow($result); $group_name = $group_name_row['group_name']; - $email_headers = "From: " . $board_config['board_email_from'] . "\r\n"; + $email_headers = "From: " . $board_config['board_email'] . "\r\n"; $emailer->use_template("group_approved"); $emailer->extra_headers($email_headers); $emailer->set_subject($lang['Group_approved']); @@ -231,7 +231,7 @@ else if( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GR "SITENAME" => $board_config['sitename'], "U_GROUPCP" => "http://".$SERVER_NAME.$PHP_SELF."?".POST_GROUPS_URL."=$group_id", "GROUP_NAME" => $group_name, - "EMAIL_SIG" => $board_config['board_email']) + "EMAIL_SIG" => $board_config['email_sig']) ); $emailer->send(); $emailer->reset(); @@ -386,7 +386,7 @@ else if( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GR $from = stripslashes($group_members[$i]['user_from']); - $joined = create_date($board_config['default_dateformat'], $group_members[$i]['user_regdate'], $board_config['default_timezone']); + $joined = create_date($board_config['default_dateformat'], $group_members[$i]['user_regdate'], $board_config['board_timezone']); $posts = ($group_members[$i]['user_posts']) ? $group_members[$i]['user_posts'] : 0; @@ -542,7 +542,7 @@ else if( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GR $from = stripslashes($modgroup_pending_list[$i]['user_from']); - $joined = create_date($board_config['default_dateformat'], $modgroup_pending_list[$i]['user_regdate'], $board_config['default_timezone']); + $joined = create_date($board_config['default_dateformat'], $modgroup_pending_list[$i]['user_regdate'], $board_config['board_timezone']); $posts = ($modgroup_pending_list[$i]['user_posts']) ? $modgroup_pending_list[$i]['user_posts'] : 0; @@ -754,4 +754,4 @@ else // include($phpbb_root_path . 'includes/page_tail.'.$phpEx); -?>
\ No newline at end of file +?> diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 79d44a885b..af19e9dbd0 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -152,7 +152,7 @@ define('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text'); define('PRIVMSGS_IGNORE_TABLE', $table_prefix.'privmsgs_ignore'); define('PRUNE_TABLE', $table_prefix.'forum_prune'); define('RANKS_TABLE', $table_prefix.'ranks'); -define('SESSIONS_TABLE', $table_prefix.'session'); +define('SESSIONS_TABLE', $table_prefix.'sessions'); define('SMILIES_TABLE', $table_prefix.'smilies'); define('THEMES_TABLE', $table_prefix.'themes'); define('TOPICS_TABLE', $table_prefix.'topics'); @@ -164,4 +164,4 @@ define('VOTE_DESC_TABLE', $table_prefix.'vote_desc'); define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results'); define('VOTE_USERS_TABLE', $table_prefix.'vote_voters'); -?>
\ No newline at end of file +?> diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 527bb81017..bcde9d7dcb 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -259,24 +259,24 @@ function init_userprefs($userdata) if(isset($userdata['user_timezone'])) { - $board_config['default_timezone'] = $userdata['user_timezone']; + $board_config['board_timezone'] = $userdata['user_timezone']; } if(!empty($userdata['user_template'])) { - $board_config['default_template'] = $userdata['user_template']; + $board_config['board_template'] = $userdata['user_template']; } } - $template = new Template($phpbb_root_path . "templates/" . $board_config['default_template']); + $template = new Template($phpbb_root_path . "templates/" . $board_config['board_template']); if($template) { - @include($phpbb_root_path . "templates/" . $board_config['default_template'] . "/" . $board_config['default_template'] . ".cfg"); + @include($phpbb_root_path . "templates/" . $board_config['board_template'] . "/" . $board_config['board_template'] . ".cfg"); if( !defined("TEMPLATE_CONFIG") ) { - message_die(CRITICAL_ERROR, "Couldn't open " . $board_config['default_template'] . " template config file"); + message_die(CRITICAL_ERROR, "Couldn't open " . $board_config['board_template'] . " template config file"); } } @@ -713,13 +713,13 @@ function sync($type, $id) } -function language_select($default, $dirname="language/") +function language_select($default, $select_name, $dirname="language/") { global $phpEx; $dir = opendir($dirname); - $lang_select = "<select name=\"language\">\n"; + $lang_select = "<select name=\"$select_name\">\n"; while ($file = readdir($dir)) { if (ereg("^lang_", $file)) @@ -737,14 +737,15 @@ function language_select($default, $dirname="language/") return $lang_select; } + // NOTE: This function should check is_dir($file), however the is_dir function seems to be buggy on my // system so its not currently implemented that way // - James -function template_select($default, $dirname = "templates") +function template_select($default, $select_name, $dirname = "templates") { $dir = opendir($dirname); - $template_select = "<select name=\"template\">\n"; + $template_select = "<select name=\"$select_name\">\n"; while($file = readdir($dir)) { unset($selected); @@ -764,13 +765,14 @@ function template_select($default, $dirname = "templates") return($template_select); } -function theme_select($default) + +function theme_select($default, $select_name) { global $db, $board_config, $lang; $sql = "SELECT themes_id, themes_name FROM " . THEMES_TABLE . " - WHERE themes_name LIKE '" . $board_config['default_template'] . "-%' + WHERE themes_name LIKE '" . $board_config['board_template'] . "-%' ORDER BY themes_name"; if($result = $db->sql_query($sql)) { @@ -779,7 +781,7 @@ function theme_select($default) if($num) { - $theme_select = "<select name=\"theme\">\n"; + $theme_select = "<select name=\"$select_name\">\n"; for($i = 0; $i < $num; $i++) { if(stripslashes($rowset[$i]['themes_name']) == $default || $rowset[$i]['themes_id'] == $default) @@ -796,7 +798,7 @@ function theme_select($default) } else { - $theme_select = "<select name=\"theme\"><option value=\"-1\">" . $lang['No_themes'] . "</option></select>"; + $theme_select = "<select name=\"$select_name\"><option value=\"-1\">" . $lang['No_themes'] . "</option></select>"; } } else @@ -805,7 +807,7 @@ function theme_select($default) } return($theme_select); } -function tz_select($default) +function tz_select($default, $select_name) { global $sys_timezone; @@ -813,38 +815,38 @@ function tz_select($default) { $default == $sys_timezone; } - $tz_select = "<select name=\"timezone\">"; + $tz_select = "<select name=\"$select_name\">"; $tz_array = array( - "-12" => "(GMT -12:00 hours) Eniwetok, Kwajalein", - "-11" => "(GMT -11:00 hours) Midway Island, Samoa", - "-10" => "(GMT -10:00 hours) Hawaii", - "-9" => "(GMT -9:00 hours) Alaska", - "-8" => "(GMT -8:00 hours) Pacific Time (US & Canada)", - "-7" => "(GMT -7:00 hours) Mountain Time (US & Canada)", - "-6" => "(GMT -6:00 hours) Central Time (US & Canada), Mexico City", - "-5" => "(GMT -5:00 hours) Eastern Time (US & Canada), Bogota, Lima, Quito", - "-4" => "(GMT -4:00 hours) Atlantic Time (Canada), Caracas, La Paz", - "-3.5" => "(GMT -3:30 hours) Newfoundland", - "-3" => "(GMT -3:00 hours) Brazil, Buenos Aires, Georgetown", - "-2" => "(GMT -2:00 hours) Mid-Atlantic, Ascension Is., St. Helena, ", - "-1" => "(GMT -1:00 hours) Azores, Cape Verde Islands", - "0" => "(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia", - "+1" => "(GMT +1:00 hours) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome", - "+2" => "(GMT +2:00 hours) Kaliningrad, South Africa, Warsaw", - "+3" => "(GMT +3:00 hours) Baghdad, Riyadh, Moscow, Nairobi", - "+3.5" => "(GMT +3:30 hours) Tehran", - "+4" => "(GMT +4:00 hours) Abu Dhabi, Baku, Muscat, Tbilisi", - "+4.5" => "(GMT +4:30 hours) Kabul", - "+5" => "(GMT +5:00 hours) Ekaterinburg, Islamabad, Karachi, Tashkent", - "+5.5" => "(GMT +5:30 hours) Bombay, Calcutta, Madras, New Delhi", - "+6" => "(GMT +6:00 hours) Almaty, Colombo, Dhaka", - "+7" => "(GMT +7:00 hours) Bangkok, Hanoi, Jakarta", - "+8" => "(GMT +8:00 hours) Beijing, Hong Kong, Perth, Singapore, Taipei", - "+9" => "(GMT +9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk", - "+9.5" => "(GMT +9:30 hours) Adelaide, Darwin", - "+10" => "(GMT +10:00 hours) Melbourne, Papua New Guinea, Sydney, Vladivostok", - "+11" => "(GMT +11:00 hours) Magadan, New Caledonia, Solomon Islands", - "+12" => "(GMT +12:00 hours) Auckland, Wellington, Fiji, Marshall Island"); + "-12" => "(GMT -12:00 hours) Eniwetok, Kwajalein", + "-11" => "(GMT -11:00 hours) Midway Island, Samoa", + "-10" => "(GMT -10:00 hours) Hawaii", + "-9" => "(GMT -9:00 hours) Alaska", + "-8" => "(GMT -8:00 hours) Pacific Time (US & Canada)", + "-7" => "(GMT -7:00 hours) Mountain Time (US & Canada)", + "-6" => "(GMT -6:00 hours) Central Time (US & Canada), Mexico City", + "-5" => "(GMT -5:00 hours) Eastern Time (US & Canada), Bogota, Lima, Quito", + "-4" => "(GMT -4:00 hours) Atlantic Time (Canada), Caracas, La Paz", + "-3.5" => "(GMT -3:30 hours) Newfoundland", + "-3" => "(GMT -3:00 hours) Brazil, Buenos Aires, Georgetown", + "-2" => "(GMT -2:00 hours) Mid-Atlantic, Ascension Is., St. Helena, ", + "-1" => "(GMT -1:00 hours) Azores, Cape Verde Islands", + "0" => "(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia", + "+1" => "(GMT +1:00 hours) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome", + "+2" => "(GMT +2:00 hours) Kaliningrad, South Africa, Warsaw", + "+3" => "(GMT +3:00 hours) Baghdad, Riyadh, Moscow, Nairobi", + "+3.5" => "(GMT +3:30 hours) Tehran", + "+4" => "(GMT +4:00 hours) Abu Dhabi, Baku, Muscat, Tbilisi", + "+4.5" => "(GMT +4:30 hours) Kabul", + "+5" => "(GMT +5:00 hours) Ekaterinburg, Islamabad, Karachi, Tashkent", + "+5.5" => "(GMT +5:30 hours) Bombay, Calcutta, Madras, New Delhi", + "+6" => "(GMT +6:00 hours) Almaty, Colombo, Dhaka", + "+7" => "(GMT +7:00 hours) Bangkok, Hanoi, Jakarta", + "+8" => "(GMT +8:00 hours) Beijing, Hong Kong, Perth, Singapore, Taipei", + "+9" => "(GMT +9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk", + "+9.5" => "(GMT +9:30 hours) Adelaide, Darwin", + "+10" => "(GMT +10:00 hours) Melbourne, Papua New Guinea, Sydney, Vladivostok", + "+11" => "(GMT +11:00 hours) Magadan, New Caledonia, Solomon Islands", + "+12" => "(GMT +12:00 hours) Auckland, Wellington, Fiji, Marshall Island"); while(list($offset, $zone) = each($tz_array)) { @@ -940,4 +942,4 @@ function obtain_word_list(&$orig_word, &$replacement_word) return(TRUE); } -?>
\ No newline at end of file +?> diff --git a/phpBB/includes/message.php b/phpBB/includes/message.php index 856b9e706d..96e7bf2cc0 100644 --- a/phpBB/includes/message.php +++ b/phpBB/includes/message.php @@ -78,7 +78,7 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "", if( empty($template) ) { - $template = new Template($phpbb_root_path . "templates/" . $board_config['default_template']); + $template = new Template($phpbb_root_path . "templates/" . $board_config['board_template']); } if( empty($theme) ) @@ -192,4 +192,4 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "", } -?>
\ No newline at end of file +?> diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php index 93af42300e..4b7ef2293d 100644 --- a/phpBB/includes/page_header.php +++ b/phpBB/includes/page_header.php @@ -74,7 +74,7 @@ else $l_login_logout = $lang['Login']; } -$s_last_visit = create_date($board_config['default_dateformat'], $userdata['session_last_visit'], $board_config['default_timezone']); +$s_last_visit = create_date($board_config['default_dateformat'], $userdata['session_last_visit'], $board_config['board_timezone']); // // Get basic (usernames + totals) online @@ -233,10 +233,10 @@ $template->assign_vars(array( "U_MEMBERSLIST" => append_sid("memberlist.".$phpEx), "U_GROUP_CP" => append_sid("groupcp.".$phpEx), - "S_TIMEZONE" => $lang['All_times'] . " " . $lang[$board_config['default_timezone']], + "S_TIMEZONE" => $lang['All_times'] . " " . $lang[$board_config['board_timezone']], "S_LOGIN_ACTION" => append_sid("login.$phpEx"), "S_JUMPBOX_ACTION" => append_sid("viewforum.$phpEx"), - "S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['default_timezone']), + "S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']), "T_HEAD_STYLESHEET" => $theme['head_stylesheet'], "T_BODY_BACKGROUND" => $theme['body_background'], diff --git a/phpBB/index.php b/phpBB/index.php index 56d5dc9dd3..c767514ca5 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -286,7 +286,7 @@ if($total_categories = $db->sql_numrows($q_categories)) { $last_poster = stripslashes($forum_rows[$j]['username']); } - $last_post_time = create_date($board_config['default_dateformat'], $forum_rows[$j]['post_time'], $board_config['default_timezone']); + $last_post_time = create_date($board_config['default_dateformat'], $forum_rows[$j]['post_time'], $board_config['board_timezone']); $last_post = $last_post_time . "<br />" . $lang['by'] . " "; $last_post .= "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $forum_rows[$j]['user_id']) . "\">" . $last_poster . "</a> "; diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index c00f27df86..42bdd391fd 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -173,7 +173,7 @@ if(($selected_members = $db->sql_numrows($result)) > 0) $from = (!empty($members[$i]['user_from'])) ? stripslashes($members[$i]['user_from']) : " "; - $joined = create_date($board_config['default_dateformat'], $members[$i]['user_regdate'], $board_config['default_timezone']); + $joined = create_date($board_config['default_dateformat'], $members[$i]['user_regdate'], $board_config['board_timezone']); $posts = ($members[$i]['user_posts']) ? $members[$i]['user_posts'] : 0; diff --git a/phpBB/modcp.php b/phpBB/modcp.php index 82d6d232a7..8ab945fb23 100644 --- a/phpBB/modcp.php +++ b/phpBB/modcp.php @@ -688,7 +688,7 @@ switch($mode) $poster_id = $postrow[$i]['user_id']; $poster = stripslashes($postrow[$i]['username']); - $post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['default_timezone']); + $post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']); if($poster_id == ANONYMOUS && $postrow[$i]['post_username'] != '') { @@ -919,7 +919,7 @@ switch($mode) $u_view_topic = append_sid("viewtopic.$phpEx?".POST_TOPIC_URL."=$topic_id"); $topic_replies = $topics[$x]['topic_replies']; - $last_post_time = create_date($board_config['default_dateformat'], $topics[$x]['post_time'], $board_config['default_timezone']); + $last_post_time = create_date($board_config['default_dateformat'], $topics[$x]['post_time'], $board_config['board_timezone']); $template->assign_block_vars("topicrow", array( diff --git a/phpBB/posting.php b/phpBB/posting.php index 04d99cd3fe..9c62c89d3c 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -751,7 +751,7 @@ if( ( $submit || $confirm ) && !$error ) { if( $email_set[$i]['user_email'] != "") { - $email_headers = "From: " . $board_config['board_email_from'] . "\nReturn-Path: " . $board_config['board_email_from'] . "\r\n"; + $email_headers = "From: " . $board_config['email_sig'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; $emailer->use_template("topic_notify"); $emailer->email_address($email_set[$i]['user_email']); @@ -766,7 +766,7 @@ if( ( $submit || $confirm ) && !$error ) "TOPIC_TITLE" => $email_set[$i]['topic_title'], "TOPIC_URL" => "http://" . $HTTP_SERVER_VARS['SERVER_NAME'] . $path . "/viewtopic.$phpEx?" . POST_POST_URL . "=$new_post_id#$new_post_id", "UN_WATCH_URL" => "http://" . $HTTP_SERVER_VARS['SERVER_NAME'] . $path . "/viewtopic.$phpEx?" . POST_TOPIC_URL . "=$new_topic_id&unwatch=topic", - "EMAIL_SIG" => $board_config['board_email']) + "EMAIL_SIG" => $board_config['email_sig']) ); $emailer->send(); @@ -1676,7 +1676,7 @@ else { $page_title = $lang['Post_a_reply']; - $msg_date = create_date($board_config['default_dateformat'], $postrow['post_time'], $board_config['default_timezone']); + $msg_date = create_date($board_config['default_dateformat'], $postrow['post_time'], $board_config['board_timezone']); $post_message = $poster . " " . $lang['wrote'] . ":\n\n[quote]\n" . $post_message . "\n[/quote]"; @@ -1847,7 +1847,7 @@ if( $preview && !$error ) "TOPIC_TITLE" => $preview_subject, "POST_SUBJECT" => $preview_subject, "POSTER_NAME" => $username, - "POST_DATE" => create_date($board_config['default_dateformat'], time(), $board_config['default_timezone']), + "POST_DATE" => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']), "MESSAGE" => $preview_message, "L_PREVIEW" => $lang['Preview'], @@ -2099,4 +2099,4 @@ $template->pparse("body"); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); -?>
\ No newline at end of file +?> diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php index f914dcfe13..058945d4e9 100644 --- a/phpBB/privmsg.php +++ b/phpBB/privmsg.php @@ -215,7 +215,7 @@ if($mode == "read") $poster = stripslashes($privmsg['username']); $poster_id = $privmsg['user_id']; - $post_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['default_timezone']); + $post_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']); $poster_avatar = ($privmsg['user_avatar'] != "" && $userdata['user_id'] != ANONYMOUS) ? "<img src=\"" . $board_config['avatar_path'] . "/" . $privmsg['user_avatar'] . "\">" : ""; @@ -442,7 +442,7 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit") if(isset($HTTP_GET_VARS['quote'])) { - $msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['default_timezone']); //"[date]" . $privmsg['privmsgs_time'] . "[/date]"; + $msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']); //"[date]" . $privmsg['privmsgs_time'] . "[/date]"; $message = stripslashes(str_replace("[addsig]", "", $privmsg['privmsgs_text'])); $message = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $message); @@ -673,7 +673,7 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit") { if($to_userdata['user_notify_pm'] && !empty($to_userdata['user_email'])) { - $email_headers = "From: " . $board_config['board_email_from'] . "\r\n"; + $email_headers = "From: " . $board_config['board_email'] . "\r\n"; $emailer->use_template("privmsg_notify"); $emailer->email_address($to_userdata['user_email']); $emailer->set_subject($lang['Notification_subject']); @@ -681,7 +681,7 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit") $emailer->assign_vars(array("SITENAME" => $board_config['sitename'], "U_INBOX" => "http://".$SERVER_NAME . $PHP_SELF . "?folder=inbox", - "EMAIL_SIG" => $board_config['board_email'])); + "EMAIL_SIG" => $board_config['email_sig'])); $emailer->send(); $emailer->reset(); } @@ -746,7 +746,7 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit") "POST_SUBJECT" => $subject, "ROW_COLOR" => "#" . $theme['td_color1'], "POSTER_NAME" => $to_username, - "POST_DATE" => create_date($board_config['default_dateformat'], time(), $board_config['default_timezone']), + "POST_DATE" => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']), "MESSAGE" => stripslashes(nl2br($preview_message)), "S_HIDDEN_FIELDS" => $s_hidden_fields, @@ -1250,7 +1250,7 @@ if($pm_count) $msg_subject = stripslashes($pm_list[$i]['privmsgs_subject']); $u_subject = append_sid("privmsg.$phpEx?folder=$folder&mode=read&" . POST_POST_URL . "=$privmsg_id"); - $msg_date = create_date($board_config['default_dateformat'], $pm_list[$i]['privmsgs_date'], $board_config['default_timezone']); + $msg_date = create_date($board_config['default_dateformat'], $pm_list[$i]['privmsgs_date'], $board_config['board_timezone']); if($flag == PRIVMSGS_NEW_MAIL && $folder == "inbox") { @@ -1298,4 +1298,4 @@ $template->pparse("body"); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); -?>
\ No newline at end of file +?> diff --git a/phpBB/profile.php b/phpBB/profile.php index 212d342142..167855461a 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -139,7 +139,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $template->assign_vars(array( "USERNAME" => stripslashes($profiledata['username']), - "JOINED" => create_date($board_config['default_dateformat'], $profiledata['user_regdate'], $board_config['default_timezone']), + "JOINED" => create_date($board_config['default_dateformat'], $profiledata['user_regdate'], $board_config['board_timezone']), "POSTS_PER_DAY" => $posts_per_day, "POSTS" => $profiledata['user_posts'], "PERCENTAGE" => $percentage . "%", @@ -283,8 +283,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $user_theme = ($HTTP_POST_VARS['theme']) ? $HTTP_POST_VARS['theme'] : $board_config['default_theme']; $user_lang = ($HTTP_POST_VARS['language']) ? $HTTP_POST_VARS['language'] : $board_config['default_lang']; - $user_timezone = (isset($HTTP_POST_VARS['timezone'])) ? $HTTP_POST_VARS['timezone'] : $board_config['default_timezone']; - $user_template = ($HTTP_POST_VARS['template']) ? $HTTP_POST_VARS['template'] : $board_config['default_template']; + $user_timezone = (isset($HTTP_POST_VARS['timezone'])) ? $HTTP_POST_VARS['timezone'] : $board_config['board_timezone']; + $user_template = ($HTTP_POST_VARS['template']) ? $HTTP_POST_VARS['template'] : $board_config['board_template']; $user_dateformat = ($HTTP_POST_VARS['dateformat']) ? trim($HTTP_POST_VARS['dateformat']) : $board_config['default_dateformat']; $user_avatar_remoteurl = (!empty($HTTP_POST_VARS['avatarremoteurl'])) ? $HTTP_POST_VARS['avatarremoteurl'] : ""; @@ -702,7 +702,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) // // The users account has been deactivated, send them an email with a new activation key // - $email_headers = "From: " . $board_config['board_email_from'] . "\r\n"; + $email_headers = "From: " . $board_config['board_email'] . "\r\n"; $emailer->use_template("activate"); $emailer->email_address($email); @@ -712,7 +712,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $emailer->assign_vars(array( "SITENAME" => $board_config['sitename'], "U_ACTIVATE" => "http://".$SERVER_NAME.$PHP_SELF."?mode=activate&act_key=$user_actkey", - "EMAIL_SIG" => $board_config['board_email']) + "EMAIL_SIG" => $board_config['email_sig']) ); $emailer->send(); $emailer->reset(); @@ -772,7 +772,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) if(!$coppa) { - $email_headers = "From: " . $board_config['board_email_from'] . "\r\n"; + $email_headers = "From: " . $board_config['board_email'] . "\r\n"; $emailer->use_template($email_msg); $emailer->email_address($email); @@ -784,7 +784,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "USERNAME" => $username, "PASSWORD" => $password_confirm, "ACTIVATE_URL" => "http://".$SERVER_NAME.$PHP_SELF."?mode=activate&act_key=$act_key", - "EMAIL_SIG" => $board_config['board_email']) + "EMAIL_SIG" => $board_config['email_sig']) ); $emailer->send(); $emailer->reset(); @@ -863,7 +863,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) if(!isset($user_template)) { - $selected_template = $board_config['default_template']; + $selected_template = $board_config['system_template']; } $html_status = ($board_config['allow_html']) ? $lang['ON'] : $lang['OFF']; @@ -935,11 +935,11 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "ALLOW_AVATAR" => $board_config['allow_avatar_upload'], "AVATAR" => $avatar_img, "AVATAR_SIZE" => $board_config['avatar_filesize'], - "LANGUAGE_SELECT" => language_select(stripslashes($user_lang)), - "THEME_SELECT" => theme_select($user_theme), - "TIMEZONE_SELECT" => tz_select($user_timezone), + "LANGUAGE_SELECT" => language_select(stripslashes($user_lang), 'language'), + "THEME_SELECT" => theme_select($user_theme, 'theme'), + "TIMEZONE_SELECT" => tz_select($user_timezone, 'timezone'), "DATE_FORMAT" => stripslashes($user_dateformat), - "TEMPLATE_SELECT" => template_select(stripslashes($user_template)), + "TEMPLATE_SELECT" => template_select(stripslashes($user_template), 'template'), "HTML_STATUS" => $html_status, "BBCODE_STATUS" => $bbcode_status, "SMILIES_STATUS" => $smilies_status, @@ -1071,4 +1071,4 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) } } -?>
\ No newline at end of file +?> diff --git a/phpBB/search.php b/phpBB/search.php index b42245cf68..15deca983b 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -412,7 +412,7 @@ if((isset($HTTP_POST_VARS['dosearch']) || isset($HTTP_GET_VARS['dosearch'])) && $poster_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $searchset[$i]['user_id']); $post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=".$searchset[$i]['post_id']."#".$searchset[$i]['post_id']); - $post_date = create_date($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['default_timezone']); + $post_date = create_date($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['board_timezone']); $message = stripslashes($searchset[$i]['post_text']); diff --git a/phpBB/templates/PSO/admin/admin_config_body.tpl b/phpBB/templates/PSO/admin/admin_config_body.tpl index 31d49fafa6..a4c1e775c1 100644 --- a/phpBB/templates/PSO/admin/admin_config_body.tpl +++ b/phpBB/templates/PSO/admin/admin_config_body.tpl @@ -34,7 +34,7 @@ </tr> <tr> <td class="row1">Hot Threshold</td> - <td class="row2"><input type="text" name="hot_topic" size="3" maxlength="4" value="{HOT_TOPIC}"></td> + <td class="row2"><input type="text" name="hot_threshold" size="3" maxlength="4" value="{HOT_TOPIC}"></td> </tr> <tr> <td class="row1">Default Template:</td> @@ -50,7 +50,7 @@ </tr> <tr> <td class="row1">Date Format:<br /><span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td> - <td class="row2"><input type="text" maxlength="16" name="date_format" value="{DATE_FORMAT}"></td> + <td class="row2"><input type="text" maxlength="16" name="default_dateformat" value="{DEFAULT_DATEFORMAT}"></td> </tr> <tr> <td class="row1">System Timezone:</td> @@ -58,7 +58,7 @@ </tr> <tr> <td class="row1">Enable GZip Compression:</td> - <td class="row2"><input type="radio" name="gzip" value="1" {GZIP_YES}> Yes <input type="radio" name="gzip" value="0" {GZIP_NO}> No</td> + <td class="row2"><input type="radio" name="gzip_compress" value="1" {GZIP_YES}> Yes <input type="radio" name="gzip_compress" value="0" {GZIP_NO}> No</td> </tr> <tr> <td class="cat" colspan="2"><span class="cattitle">User/Forum Ability Settings</span></td> @@ -73,7 +73,7 @@ </tr> <tr> <td class="row1">Allow Smilies</td> - <td class="row2"><input type="radio" name="allow_smile" value="1" {SMILE_YES}> Yes <input type="radio" name="allow_smile" value="0" {SMILE_NO}> No</td> + <td class="row2"><input type="radio" name="allow_smilies" value="1" {SMILE_YES}> Yes <input type="radio" name="allow_smilies" value="0" {SMILE_NO}> No</td> </tr> <tr> <td class="row1">Allow Signatures</td> @@ -88,15 +88,15 @@ </tr> <tr> <td class="row1">Allow local gallery avatars</td> - <td class="row2"><input type="radio" name="allow_avatars_local" value="1" {AVATARS_LOCAL_YES}> Yes <input type="radio" name="allow_avatars_local" value="0" {AVATARS_LOCAL_NO}> No</td> + <td class="row2"><input type="radio" name="allow_avatar_local" value="1" {AVATARS_LOCAL_YES}> Yes <input type="radio" name="allow_avatar_local" value="0" {AVATARS_LOCAL_NO}> No</td> </tr> <tr> <td class="row1">Allow remote avatars <br /><span class="gensmall">Avatars linked from another website</span></td> - <td class="row2"><input type="radio" name="allow_avatars_remote" value="1" {AVATARS_REMOTE_YES}> Yes <input type="radio" name="allow_avatars_remote" value="0" {AVATARS_REMOTE_NO}> No</td> + <td class="row2"><input type="radio" name="allow_avatar_remote" value="1" {AVATARS_REMOTE_YES}> Yes <input type="radio" name="allow_avatar_remote" value="0" {AVATARS_REMOTE_NO}> No</td> </tr> <tr> <td class="row1">Allow avatar uploading</td> - <td class="row2"><input type="radio" name="allow_avatars_upload" value="1" {AVATARS_UPLOAD_YES}> Yes <input type="radio" name="allow_avatars_upload" value="0" {AVATARS_UPLOAD_NO}> No</td> + <td class="row2"><input type="radio" name="allow_avatar_upload" value="1" {AVATARS_UPLOAD_YES}> Yes <input type="radio" name="allow_avatar_upload" value="0" {AVATARS_UPLOAD_NO}> No</td> </tr> <tr> <td class="row1">Max. Avatar File Size<br /><span class="gensmall">For uploaded avatar files</span></td> @@ -106,7 +106,7 @@ <td class="row1">Max. Avatar Size <br /> <span class="gensmall">(height x width)</span> </td> - <td class="row2"><input type="text" size="3" maxlength="4" name="avatar_height" value="{AVATAR_HEIGHT}"> x <input type="text" size="3" maxlength="4" name="avatar_width" value="{AVATAR_WIDTH}"></td> + <td class="row2"><input type="text" size="3" maxlength="4" name="avatar_max_height" value="{AVATAR_MAX_HEIGHT}"> x <input type="text" size="3" maxlength="4" name="avatar_max_width" value="{AVATAR_MAX_WIDTH}"></td> </tr> <tr> <td class="row1">Avatar Storage Path <br /><span class="gensmall">Path under your phpBB root dir, e.g. images/avatars</span></td> @@ -117,7 +117,7 @@ </tr> <tr> <td class="row1">Admin Email Address</td> - <td class="row2"><input type="text" size="25" maxlength="100" name="admin_email" value="{ADMIN_EMAIL}"></td> + <td class="row2"><input type="text" size="25" maxlength="100" name="email_from" value="{EMAIL_FROM}"></td> </tr> <tr> <td class="row1">Email Signature<br /><span class="gensmall">This text will be attached to all emails the board sends</span></td> @@ -125,11 +125,11 @@ </tr> <tr> <td class="row1">Use SMTP for delivery<br /><span class="gensmall">Say yes if you want or have to send email via a server instead of the local mail function</span></td> - <td class="row2"><input type="radio" name="use_smtp" value="1" {SMTP_YES}> Yes <input type="radio" name="use_smtp" value="0" {SMTP_NO}> No</td> + <td class="row2"><input type="radio" name="smtp_delivery" value="1" {SMTP_YES}> Yes <input type="radio" name="smtp_delivery" value="0" {SMTP_NO}> No</td> </tr> <tr> <td class="row1">SMTP Server</td> - <td class="row2"><input type="text" name="smtp_server" value="{SMTP_SERVER}" size="25" maxlength="50"></td> + <td class="row2"><input type="text" name="smtp_host" value="{SMTP_HOST}" size="25" maxlength="50"></td> </tr> <tr> <td class="cat" colspan="2" align="center"> diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index a9e4cf863d..8f44327c8e 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -503,7 +503,7 @@ if($total_topics) $topic_poster = $topic_rowset[$i]['username']; $topic_poster_profile_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $topic_rowset[$i]['user_id']); - $last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['default_timezone']); + $last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']); if($topic_rowset[$i]['id2'] == ANONYMOUS && $topic_rowset[$i]['post_username'] != '') { diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 30fc84669d..fea2c0842a 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -606,13 +606,13 @@ for($i = 0; $i < $total_posts; $i++) $poster_id = $postrow[$i]['user_id']; $poster = $postrow[$i]['username']; - $post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['default_timezone']); + $post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']); $poster_posts = ($postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Posts'] . ": " . $postrow[$i]['user_posts'] : ""; $poster_from = ($postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS) ? $lang['From'] . ": " . $postrow[$i]['user_from'] : ""; - $poster_joined = ($postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Joined'] . ": " . create_date($board_config['default_dateformat'], $postrow[$i]['user_regdate'], $board_config['default_timezone']) : ""; + $poster_joined = ($postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Joined'] . ": " . create_date($board_config['default_dateformat'], $postrow[$i]['user_regdate'], $board_config['board_timezone']) : ""; if($postrow[$i]['user_avatar'] != "" && $poster_id != ANONYMOUS) { @@ -797,7 +797,7 @@ for($i = 0; $i < $total_posts; $i++) { $l_edit_total = ($postrow[$i]['post_edit_count'] == 1) ? $lang['time_in_total'] : $lang['times_in_total']; - $message = $message . "<br /><br /><font size=\"-2\">" . $lang['Edited_by'] . " " . $poster . " " . $lang['on'] . " " . create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['default_timezone']) . ", " . $lang['edited'] . " " . $postrow[$i]['post_edit_count'] . " $l_edit_total</font>"; + $message = $message . "<br /><br /><font size=\"-2\">" . $lang['Edited_by'] . " " . $poster . " " . $lang['on'] . " " . create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']) . ", " . $lang['edited'] . " " . $postrow[$i]['post_edit_count'] . " $l_edit_total</font>"; } // |