diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php index ddce69b9a2..0b248c1b21 100644 --- a/phpBB/admin/admin_board.php +++ b/phpBB/admin/admin_board.php @@ -138,6 +138,7 @@ $template->assign_vars(array( "SMILE_NO" => $smile_no, "SIG_YES" => $sig_yes, "SIG_NO" => $sig_no, + "SIG_SIZE" => $new['max_sig_chars'], "NAMECHANGE_YES" => $namechange_yes, "NAMECHANGE_NO" => $namechange_no, "AVATARS_LOCAL_YES" => $avatars_local_yes, diff --git a/phpBB/db/mssql_basic.sql b/phpBB/db/mssql_basic.sql index 65d761815d..1cd27eba43 100644 --- a/phpBB/db/mssql_basic.sql +++ b/phpBB/db/mssql_basic.sql @@ -35,6 +35,9 @@ 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 ('max_inbox_privmsgs','50'); +INSERT INTO phpbb_config VALUES ('max_sentbox_privmsgs','25'); +INSERT INTO phpbb_config VALUES ('max_savebox_privmsgs','50'); 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/mssql_schema.sql b/phpBB/db/mssql_schema.sql index ad29e5323e..e0e4fdcb0d 100644 --- a/phpBB/db/mssql_schema.sql +++ b/phpBB/db/mssql_schema.sql @@ -259,13 +259,13 @@ CREATE TABLE [phpbb_privmsgs] ( [privmsgs_enable_bbcode] [smallint] NULL , [privmsgs_enable_html] [smallint] NULL , [privmsgs_enable_smilies] [smallint] NULL , - [privmsgs_enable_sig] [smallint] NULL , - [privmsgs_bbcode_uid] [char] (10) NULL + [privmsgs_attach_sig] [smallint] NULL , ) ON [PRIMARY] GO CREATE TABLE [phpbb_privmsgs_text] ( [privmsgs_text_id] [int] NOT NULL , + [privmsgs_bbcode_uid] [char] (10) NULL [privmsgs_text] [text] NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO diff --git a/phpBB/db/mysql_basic.sql b/phpBB/db/mysql_basic.sql index 7fa9606d02..36b0503c4a 100644 --- a/phpBB/db/mysql_basic.sql +++ b/phpBB/db/mysql_basic.sql @@ -29,6 +29,9 @@ 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 ('max_inbox_privmsgs','50'); +INSERT INTO phpbb_config VALUES ('max_sentbox_privmsgs','25'); +INSERT INTO phpbb_config VALUES ('max_savebox_privmsgs','50'); 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/mysql_schema.sql b/phpBB/db/mysql_schema.sql index 76e62f2e0f..ab74d4b9ff 100644 --- a/phpBB/db/mysql_schema.sql +++ b/phpBB/db/mysql_schema.sql @@ -216,8 +216,7 @@ CREATE TABLE phpbb_privmsgs ( privmsgs_enable_bbcode tinyint(1) DEFAULT '1' NOT NULL, privmsgs_enable_html tinyint(1) DEFAULT '0' NOT NULL, privmsgs_enable_smilies tinyint(1) DEFAULT '1' NOT NULL, - privmsgs_enable_sig tinyint(1) DEFAULT '1' NOT NULL, - privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL, + privmsgs_attach_sig tinyint(1) DEFAULT '1' NOT NULL, PRIMARY KEY (privmsgs_id), KEY privmsgs_from_userid (privmsgs_from_userid), KEY privmsgs_to_userid (privmsgs_to_userid) @@ -231,6 +230,7 @@ CREATE TABLE phpbb_privmsgs ( DROP TABLE IF EXISTS phpbb_privmsgs_text; CREATE TABLE phpbb_privmsgs_text ( privmsgs_text_id int(11) DEFAULT '0' NOT NULL, + privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL, privmsgs_text text, PRIMARY KEY (privmsgs_text_id) ); diff --git a/phpBB/db/oracle_basic.sql b/phpBB/db/oracle_basic.sql index 301e6d1e6c..3a1c358353 100755 --- a/phpBB/db/oracle_basic.sql +++ b/phpBB/db/oracle_basic.sql @@ -29,6 +29,9 @@ 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 ('max_inbox_privmsgs','50'); +INSERT INTO phpbb_config VALUES ('max_sentbox_privmsgs','25'); +INSERT INTO phpbb_config VALUES ('max_savebox_privmsgs','50'); 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 193464efde..cbfc0e3139 100755 --- a/phpBB/db/oracle_schema.sql +++ b/phpBB/db/oracle_schema.sql @@ -231,7 +231,10 @@ CREATE TABLE phpbb_privmsgs ( privmsgs_to_userid number(4) DEFAULT '0' NOT NULL, privmsgs_date number(4) DEFAULT '0' NOT NULL, privmsgs_ip char(8) NOT NULL, - privmsgs_bbcode_uid varchar(10) DEFAULT '0' NOT NULL, + privmsgs_enable_bbcode number(1) DEFAULT '1' NOT NULL, + privmsgs_enable_html number(1) DEFAULT '0' NOT NULL, + privmsgs_enable_smilies number(1) DEFAULT '1' NOT NULL, + privmsgs_attach_sig number(1) DEFAULT '1' NOT NULL, CONSTRAINT phpbb_privmsgs_pkey PRIMARY KEY (privmsgs_id) ); CREATE INDEX privmsgs_from_userid_index ON phpbb_privmsgs (privmsgs_from_userid); @@ -243,6 +246,7 @@ CREATE INDEX privmsgs_to_userid_index ON phpbb_privmsgs (privmsgs_to_userid); -------------------------------------------------------- */ CREATE TABLE phpbb_privmsgs_text ( privmsgs_text_id number(4) DEFAULT '0' NOT NULL, + privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL, privmsgs_text varchar(2000), CONSTRAINT phpbb_privmsgs_text_pkey PRIMARY KEY (privmsgs_text_id) ); diff --git a/phpBB/db/postgres_basic.sql b/phpBB/db/postgres_basic.sql index a1c2452cbe..6427269d6f 100755 --- a/phpBB/db/postgres_basic.sql +++ b/phpBB/db/postgres_basic.sql @@ -29,6 +29,9 @@ 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 ('max_inbox_privmsgs','50'); +INSERT INTO phpbb_config VALUES ('max_sentbox_privmsgs','25'); +INSERT INTO phpbb_config VALUES ('max_savebox_privmsgs','50'); 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/postgres_schema.sql b/phpBB/db/postgres_schema.sql index f16b39bb49..17e5237494 100644 --- a/phpBB/db/postgres_schema.sql +++ b/phpBB/db/postgres_schema.sql @@ -198,7 +198,10 @@ CREATE TABLE phpbb_privmsgs ( privmsgs_to_userid int4 DEFAULT '0' NOT NULL, privmsgs_date int4 DEFAULT '0' NOT NULL, privmsgs_ip char(8) NOT NULL, - privmsgs_bbcode_uid varchar(10) DEFAULT '0' NOT NULL, + privmsgs_enable_bbcode int2 DEFAULT '1' NOT NULL, + privmsgs_enable_html int2 DEFAULT '0' NOT NULL, + privmsgs_enable_smilies int2 DEFAULT '1' NOT NULL, + privmsgs_attach_sig int2 DEFAULT '1' NOT NULL, CONSTRAINT phpbb_privmsgs_pkey PRIMARY KEY (privmsgs_id) ); CREATE INDEX privmsgs_from_userid_index ON phpbb_privmsgs (privmsgs_from_userid); @@ -210,6 +213,7 @@ CREATE INDEX privmsgs_to_userid_index ON phpbb_privmsgs (privmsgs_to_userid); -------------------------------------------------------- */ CREATE TABLE phpbb_privmsgs_text ( privmsgs_text_id int4 DEFAULT '0' NOT NULL, + privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL, privmsgs_text text, CONSTRAINT phpbb_privmsgs_text_pkey PRIMARY KEY (privmsgs_text_id) ); diff --git a/phpBB/develop/convert_privmsgs.php b/phpBB/develop/convert_privmsgs.php new file mode 100644 index 0000000000..847d3e20cc --- /dev/null +++ b/phpBB/develop/convert_privmsgs.php @@ -0,0 +1,167 @@ +sql_query($sql) ) +{ + die("Couldn't alter privmsgs table"); +} +echo $sql = "ALTER TABLE " . PRIVMSGS_TEXT_TABLE . " + ADD privmsgs_bbcode_uid CHAR(10) AFTER privmsgs_text_id"; +if( !$result = $db->sql_query($sql) ) +{ + die("Couldn't alter privmsgs text table"); +} +echo "COMPLETE
"; + +// +// Move bbcode ... +// +echo "Move bbcode uid's ... "; + +$sql = "SELECT privmsgs_id, privmsgs_bbcode_uid + FROM " . PRIVMSGS_TABLE; +if( $result = $db->sql_query($sql) ) +{ + $rowset = $db->sql_fetchrowset($result); + + for($i = 0; $i < count($rowset); $i++) + { + $sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . " + SET privmsgs_bbcode_uid = '" . $rowset[$i]['privmsgs_bbcode_uid'] . "' + WHERE privmsgs_text_id = " . $rowset[$i]['privmsgs_id']; + if( !$result = $db->sql_query($sql) ) + { + die("Couldn't update privmsgs text bbcode - " . $i); + } + } + + $sql = "ALTER TABLE " . PRIVMSGS_TABLE . " + DROP privmsgs_bbcode_uid"; + if( !$result = $db->sql_query($sql) ) + { + die("Couldn't alter privmsgs table - drop privmsgs_bbcode_uid"); + } +} + +echo "COMPLETE
"; + +// +// Stripslashes from titles +// +echo "Strip subject slashes ... "; + +$sql = "SELECT privmsgs_subject , privmsgs_id, privmsgs_to_userid, privmsgs_from_userid + FROM " . PRIVMSGS_TABLE; +if( $result = $db->sql_query($sql) ) +{ + $rowset = $db->sql_fetchrowset($result); + + for($i = 0; $i < count($rowset); $i++) + { + $sql = "UPDATE " . PRIVMSGS_TABLE . " + SET privmsgs_subject = '" . addslashes(stripslashes($rowset[$i]['privmsgs_subject'])) . "' + WHERE privmsgs_id = " . $rowset[$i]['privmsgs_id']; + if( !$result = $db->sql_query($sql) ) + { + die("Couldn't update subjects - $i"); + } + } +} +echo "COMPLETE
"; + +// +// Update sigs +// +echo "Remove [addsig], stripslashes and update privmsgs table sig enable ..."; + +$sql = "SELECT privmsgs_text_id , privmsgs_text + FROM " . PRIVMSGS_TEXT_TABLE; +if( $result = $db->sql_query($sql) ) +{ + $rowset = $db->sql_fetchrowset($result); + + $attach_sql = ""; + $non_attach_sql = ""; + + for($i = 0; $i < count($rowset); $i++) + { + if( ereg("\[addsig]$", $rowset[$i]['privmsgs_text'])) + { + if( $attach_sql != "" ) + { + $attach_sql .= ", "; + } + $attach_sql .= $rowset[$i]['privmsgs_text_id']; + + $sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . " + SET privmsgs_text = '" . addslashes(preg_replace("/\[addsig\]/is", "", stripslashes($rowset[$i]['privmsgs_text']))) . "' + WHERE privmsgs_text_id = " . $rowset[$i]['privmsgs_text_id']; + if( !$result = $db->sql_query($sql) ) + { + die("Couldn't update privmsgs text - " . $i); + } + + } + else + { + $sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . " + SET privmsgs_text = '" . addslashes(stripslashes($rowset[$i]['privmsgs_text'])) . "' + WHERE privmsgs_text_id = " . $rowset[$i]['privmsgs_text_id']; + if( !$result = $db->sql_query($sql) ) + { + die("Couldn't update privmsgs text - " . $i); + } + + if( $non_attach_sql != "" ) + { + $non_attach_sql .= ", "; + } + $non_attach_sql .= $rowset[$i]['privmsgs_text_id']; + } + } + + if( $attach_sql != "" ) + { + $sql = "UPDATE " . PRIVMSGS_TABLE . " + SET privmsgs_attach_sig = 1 + WHERE privmsgs_id IN ($attach_sql)"; + if( !$result = $db->sql_query($sql) ) + { + die("Couldn't update privmsgs table attach_sig - "); + } + } + + if( $non_attach_sql != "" ) + { + $sql = "UPDATE " . PRIVMSGS_TABLE . " + SET privmsgs_attach_sig = 0 + WHERE privmsgs_id IN ($non_attach_sql)"; + if( !$result = $db->sql_query($sql) ) + { + die("Couldn't update privmsgs table non_attach_sig - "); + } + } + +} + +echo "COMPLETE
"; + +$db->sql_close(); + +?> diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 5eb8288266..7b2d91da0f 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -156,7 +156,7 @@ function bbencode_second_pass($text, $uid) $text = str_replace("[/color:$uid]", $bbcode_tpl['color_close'], $text); // size - $text = preg_replace("/\[size=([\-\+]?[1-3]):$uid\]/si", $bbcode_tpl['size_open'], $text); + $text = preg_replace("/\[size=([\-\+]?[1-2]?[0-9]):$uid\]/si", $bbcode_tpl['size_open'], $text); $text = str_replace("[/size:$uid]", $bbcode_tpl['size_close'], $text); // [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff. @@ -248,10 +248,10 @@ function bbencode_first_pass($text, $uid) $text = bbencode_first_pass_pda($text, $uid, $open_tag, "[/list]", "[/list:o]", false, 'replace_listitems'); // [color] and [/color] for setting text color - $text = preg_replace("#\[color=(\#[0-9A-F]{6}|[a-z]+)\](.*?)\[/color\]#si", "[color=\\1:$uid]\\2[/color:$uid]", $text); + $text = preg_replace("#\[color=(\#[0-9A-F]{6}|[a-z\-]+)\](.*?)\[/color\]#si", "[color=\\1:$uid]\\2[/color:$uid]", $text); // [size] and [/size] for setting text size - $text = preg_replace("#\[size=([\-\+]?[1-3])\](.*?)\[/size\]#si", "[size=\\1:$uid]\\2[/size:$uid]", $text); + $text = preg_replace("#\[size=([\-\+]?[1-2]?[0-9])\](.*?)\[/size\]#si", "[size=\\1:$uid]\\2[/size:$uid]", $text); // [b] and [/b] for bolding text. $text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 0b8323ea24..7d93624185 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -117,7 +117,7 @@ function get_userdata($username) { } } -function make_jumpbox() +function make_jumpbox($match_forum_id = 0) { global $lang, $db; @@ -131,13 +131,10 @@ function make_jumpbox() message_die(GENERAL_ERROR, "Couldn't obtain category list.", "", __LINE__, __FILE__, $sql); } - $total_categories = $db->sql_numrows(); - if($total_categories) + if( $total_categories = $db->sql_numrows() ) { $category_rows = $db->sql_fetchrowset($q_categories); - $limit_forums = ""; - $sql = "SELECT * FROM " . FORUMS_TABLE . " ORDER BY cat_id, forum_order"; @@ -145,25 +142,25 @@ function make_jumpbox() { message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql); } + $total_forums = $db->sql_numrows($q_forums); $forum_rows = $db->sql_fetchrowset($q_forums); -// $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); - $boxstring = '"; + $s_hidden_fields = ""; + $page_title = $lang['Read_private_message']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); // @@ -188,48 +327,82 @@ if($mode == "read") "body" => "privmsgs_read_body.tpl", "jumpbox" => "jumpbox.tpl") ); + $jumpbox = make_jumpbox(); $template->assign_vars(array( - "JUMPBOX_LIST" => $jumpbox, - "SELECT_NAME" => POST_FORUM_URL) + "L_GO" => $lang['Go'], + "L_JUMP_TO" => $lang['Jump_to'], + "L_SELECT_FORUM" => $lang['Select_forum'], + + "S_JUMPBOX_LIST" => $jumpbox, + "S_JUMPBOX_ACTION" => append_sid("viewforum.$phpEx")) ); $template->assign_var_from_handle("JUMPBOX", "jumpbox"); $template->assign_vars(array( - "INBOX" => $inbox_url, - "SENTBOX" => $sentbox_url, - "OUTBOX" => $outbox_url, - "SAVEBOX" => $savebox_url, + "INBOX_IMG" => $inbox_img, + "SENTBOX_IMG" => $sentbox_img, + "OUTBOX_IMG" => $outbox_img, + "SAVEBOX_IMG" => $savebox_img, + "INBOX_LINK" => $inbox_url, + "POST_PM_IMG" => $post_pm_img, + "REPLY_PM_IMG" => $reply_pm_img, + "EDIT_PM_IMG" => $edit_pm_img, + "QUOTE_PM_IMG" => $quote_pm_img, + + "SENTBOX_LINK" => $sentbox_url, + "OUTBOX_LINK" => $outbox_url, + "SAVEBOX_LINK" => $savebox_url, + + "BOX_NAME" => $l_box_name, + + "L_INBOX" => $lang['Inbox'], + "L_OUTBOX" => $lang['Outbox'], + "L_SENTBOX" => $lang['Sent'], + "L_SAVEBOX" => $lang['Saved'], "L_FLAG" => $lang['Flag'], "L_SUBJECT" => $lang['Subject'], "L_DATE" => $lang['Date'], - "L_FROM_OR_TO" => (($folder == "inbox" || $folder == "savebox") ? $lang['From'] : $lang['To']), + "L_FROM" => $lang['From'], + "L_TO" => $lang['To'], "S_PRIVMSGS_ACTION" => append_sid("privmsg.$phpEx?folder=$folder"), - "S_HIDDEN_FIELDS" => $s_hidden_fields, - "S_POST_NEW_MSG" => $post_new_mesg_url, - "S_POST_REPLY_MSG" => $post_reply_mesg_url) + "S_HIDDEN_FIELDS" => $s_hidden_fields) ); + + $username_from = $privmsg['username_1']; + $user_id_from = $privmsg['user_id_1']; + $username_to = $privmsg['username_2']; + $user_id_to = $privmsg['user_id_2']; - $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']); + $profile_img = "\"""; - $poster_avatar = ($privmsg['user_avatar'] != "" && $userdata['user_id'] != ANONYMOUS) ? "" : ""; + $email_addr = str_replace("@", " at ", $privmsg['user_email']); + $email_img = ($privmsg['user_viewemail'] && $email_addr != "" ) ? "\""" : ""; - $profile_img = "\"""; - - $email_img = ($privmsg['user_viewemail'] == 1) ? "\""" : ""; - - $www_img = ($privmsg['user_website']) ? "\""" : ""; + $www_img = ($privmsg['user_website']) ? "\""" : ""; if($privmsg['user_icq']) { - $icq_status_img = ""; + $icq_status_img = ""; - $icq_add_img = "\"""; + // + // This cannot stay like this, it needs a 'proper' solution, eg a separate + // template for overlaying the ICQ icon, or we just do away with the icq status + // display (which is after all somewhat a pain in the rear :D + // + if( $theme['template_name'] == "subSilver" ) + { + $icq_add_img = '
' . $icq_status_img . '' . $lang['ICQ'] . '
'; + $icq_status_img = ""; + } + else + { + $icq_add_img = "\"""; + } } else { @@ -237,66 +410,95 @@ if($mode == "read") $icq_add_img = ""; } - $aim_img = ($privmsg['user_aim']) ? "" : ""; + $aim_img = ($privmsg['user_aim']) ? "\""" : ""; - $msn_img = ($privmsg['user_msnm']) ? "" : ""; + $msn_img = ($privmsg['user_msnm']) ? "\""" : ""; - $yim_img = ($privmsg['user_yim']) ? "" : ""; + $yim_img = ($privmsg['user_yim']) ? "\""" : ""; - if($folder == "inbox") - { - $quote_img = "\"\""; - } + $search_img = ""; - if($folder == "outbox") - { - $edit_img = "\"\""; - } + // + // Processing of post + // + $post_subject = $privmsg['privmsgs_subject']; - $post_subject = stripslashes($privmsg['privmsgs_subject']); - - $message = stripslashes($privmsg['privmsgs_text']); + $private_message = $privmsg['privmsgs_text']; $bbcode_uid = $privmsg['privmsgs_bbcode_uid']; - $user_sig = ($privmsg['privmsgs_from_userid'] == $userdata['user_id']) ? stripslashes($userdata['user_sig']) : stripslashes($privmsg['user_sig']); + $user_sig = ( $privmsg['privmsgs_from_userid'] == $userdata['user_id'] ) ? $userdata['user_sig'] : $privmsg['user_sig']; + $user_sig_bbcode_uid = ( $privmsg['privmsgs_from_userid'] == $userdata['user_id'] ) ? $userdata['user_sig_bbcode_uid'] : $privmsg['user_sig_bbcode_uid']; - if(!$board_config['allow_html']) + // + // If the board has HTML off but the post has HTML + // on then we process it, else leave it alone + // + if( !$board_config['allow_html'] ) { - $user_sig = strip_tags($user_sig); - $message = strip_tags($message); - } - if($board_config['allow_bbcode']) - { - // do bbcode stuff here - $sig_uid = make_bbcode_uid(); - $user_sig = bbencode_first_pass($user_sig, $sig_uid); - $user_sig = bbencode_second_pass($user_sig, $sig_uid); + if( $user_sig != "" && $privmsg['privmsgs_enable_sig'] && $userdata['user_allowhtml'] ) + { + $user_sig = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $user_sig); + } - $message = bbencode_second_pass($message, $bbcode_uid); + if( $privmsg['privmsgs_enable_html'] ) + { + $private_message = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $private_message); + } } - $message = make_clickable($message); - $message = str_replace("\n", "
", $message); - $message = eregi_replace("\[addsig]$", "

_________________
" . nl2br($user_sig), $message); + if( $user_sig != "" && $privmsg['privmsgs_attach_sig'] && $user_sig_bbcode_uid != "" ) + { + $user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:[0-9a-z\:]+\]/si", "]", $user_sig); + } + if( $bbcode_uid != "" ) + { + $private_message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($private_message, $bbcode_uid) : preg_replace("/\:[0-9a-z\:]+\]/si", "]", $private_message); + } + + $private_message = make_clickable($private_message); + + if( $privmsg['privmsgs_attach_sig'] && $user_sig != "" ) + { + $private_message .= "

_________________
" . make_clickable($user_sig); + } + + if( count($orig_word) ) + { + $post_subject = preg_replace($orig_word, $replacement_word, $post_subject); + $private_message = preg_replace($orig_word, $replacement_word, $private_message); + } + + if( $board_config['allow_smilies'] && $privmsg['privmsgs_enable_smilies'] ) + { + $private_message = smilies_pass($private_message); + } + + $private_message = str_replace("\n", "
", $private_message); + + // + // Dump it to the templating engine + // $template->assign_vars(array( - "POSTER_NAME" => $poster, + "MESSAGE_TO" => $username_to, + "MESSAGE_FROM" => $username_from, + "RANK_IMAGE" => $rank_image, + "POSTER_JOINED" => $poster_joined, + "POSTER_POSTS" => $poster_posts, + "POSTER_FROM" => $poster_from, "POSTER_AVATAR" => $poster_avatar, - "POST_DATE" => $post_date, - "POST_SUBJECT" => $post_subject, - "MESSAGE" => $message, "PROFILE_IMG" => $profile_img, + "SEARCH_IMG" => $search_img, "EMAIL_IMG" => $email_img, "WWW_IMG" => $www_img, "ICQ_STATUS_IMG" => $icq_status_img, "ICQ_ADD_IMG" => $icq_add_img, "AIM_IMG" => $aim_img, "MSN_IMG" => $msn_img, - "YIM_IMG" => $yim_img, - "QUOTE_IMG" => $quote_img, - "EDIT_IMG" => $edit_img, - - "L_FROM" => $lang['From']) + "YIM_IMG" => $yim_img, + "POST_SUBJECT" => $post_subject, + "MESSAGE" => $private_message, + "POST_DATE" => $post_date) ); $template->pparse("body"); @@ -304,309 +506,328 @@ if($mode == "read") include($phpbb_root_path . 'includes/page_tail.'.$phpEx); } -else if($mode == "post" || $mode == "reply" || $mode == "edit") +else if( ( $delete && $mark_list ) || $delete_all ) +{ + if(!$userdata['session_logged_in']) + { + header("Location: " . append_sid("login.$phpEx?forward_page=privmsg.$phpEx&folder=inbox")); + } + + if( !$confirm ) + { + $s_hidden_fields = ''; + $s_hidden_fields .= (isset($HTTP_POST_VARS['delete'])) ? '' : ''; + + for($i = 0; $i < count($mark_list); $i++) + { + $s_hidden_fields .= ''; + } + + // + // Output confirmation page + // + include($phpbb_root_path . 'includes/page_header.'.$phpEx); + + $template->set_filenames(array( + "confirm_body" => "confirm_body.tpl") + ); + $template->assign_vars(array( + "MESSAGE_TITLE" => $lang['Information'], + "MESSAGE_TEXT" => "Are you sure you want to delete these message?", + + "L_YES" => $lang['Yes'], + "L_NO" => $lang['No'], + + "S_CONFIRM_ACTION" => append_sid("privmsg.$phpEx?folder=$folder"), + "S_HIDDEN_FIELDS" => $s_hidden_fields) + ); + $template->pparse("confirm_body"); + + include($phpbb_root_path . 'includes/page_tail.'.$phpEx); + + } + else if( $confirm ) + { + if( $delete_all ) + { + switch($folder) + { + case 'inbox': + $delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND ( + privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " )"; + break; + + case 'outbox': + $delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_NEW_MAIL; + break; + + case 'sentbox': + $delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL; + break; + + case 'savebox': + $delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) + OR ( privmsgs_to_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )"; + break; + } + + $deleteall_sql = "SELECT privmsgs_id + FROM " . PRIVMSGS_TABLE . " + WHERE " . $delete_type; + + if(!$del_list_status = $db->sql_query($deleteall_sql)) + { + message_die(GENERAL_ERROR, "Could not obtain id list to delete all messages.", "", __LINE__, __FILE__, $deleteall_sql); + } + + $delete_list = $db->sql_fetchrowset($del_list_status); + for($i = 0; $i < count($delete_list); $i++) + { + $mark_list[] = $delete_list[$i]['privmsgs_id']; + } + unset($delete_list); + unset($delete_type); + } + + $delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . " + WHERE "; + $delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . " + WHERE "; + + $delete_sql_id = ""; + for($i = 0; $i < count($mark_list); $i++) + { + if( $delete_sql_id != "" ) + { + $delete_sql_id .= ", "; + } + $delete_sql_id .= $mark_list[$i]; + } + + $delete_sql .= "privmsgs_id IN ($delete_sql_id)"; + $delete_text_sql .= "privmsgs_text_id IN ($delete_sql_id)"; + + $delete_sql .= " AND "; + + switch($folder) + { + case 'inbox': + $delete_sql .= "privmsgs_to_userid = " . $userdata['user_id'] . " AND ( + privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " )"; + break; + + case 'outbox': + $delete_sql .= "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_NEW_MAIL; + break; + + case 'sentbox': + $delete_sql .= "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL; + break; + + case 'savebox': + $delete_sql .= "( ( privmsgs_from_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) + OR ( privmsgs_to_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )"; + break; + } + + if(!$del_status = $db->sql_query($delete_sql, BEGIN_TRANSACTION)) + { + message_die(GENERAL_ERROR, "Could not delete private message info.", "", __LINE__, __FILE__, $delete_sql); + } + else + { + if(!$del_text_status = $db->sql_query($delete_text_sql, END_TRANSACTION)) + { + message_die(GENERAL_ERROR, "Could not delete private message text.", "", __LINE__, __FILE__, $delete_text_sql); + } + } + } + +} +else if( $save && $mark_list && $folder != "savebox" && $folder != "outbox") +{ + if( !$userdata['session_logged_in'] ) + { + header("Location: " . append_sid("login.$phpEx?forward_page=privmsg.$phpEx&folder=inbox")); + } + + // + // See if recipient is at their savebox limit + // + $sql = "SELECT COUNT(privmsgs_id) AS savebox_items, MIN(privmsgs_date) AS oldest_post_time + FROM " . PRIVMSGS_TABLE . " + WHERE ( ( privmsgs_to_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) + OR ( privmsgs_from_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . ") )"; + if( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Could not obtain sent message info for sendee.", "", __LINE__, __FILE__, $sql); + } + + $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : ""; + + if( $db->sql_numrows($result) ) + { + $saved_info = $db->sql_fetchrow($result); + + if( $saved_info['savebox_items'] > $board_config['max_savebox_privmsgs'] ) + { + $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " + WHERE ( ( privmsgs_to_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) + OR ( privmsgs_from_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . ") ) + AND privmsgs_date = " . $saved_info['oldest_post_time']; + if( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Could not delete oldest privmsgs.", "", __LINE__, __FILE__, $sql); + } + } + } + + // + // Process request + // + $saved_sql = "UPDATE " . PRIVMSGS_TABLE; + + switch($folder) + { + case 'inbox': + $saved_sql .= " SET privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " + WHERE privmsgs_to_userid = " . $userdata['user_id'] . " + AND ( privmsgs_type = " . PRIVMSGS_READ_MAIL . " + OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " )"; + break; + + case 'outbox': + $saved_sql .= " SET privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " + WHERE privmsgs_from_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_NEW_MAIL; + break; + + case 'sentbox': + $saved_sql .= " SET privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " + WHERE privmsgs_from_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_SENT_MAIL; + break; + } + + $saved_sql_id = ""; + for($i = 0; $i < count($mark_list); $i++) + { + if( $saved_sql_id != "" ) + { + $saved_sql_id .= ", "; + } + $saved_sql_id .= $mark_list[$i]; + } + + $saved_sql .= " AND privmsgs_id IN ($saved_sql_id)"; + + if( !$save_status = $db->sql_query($saved_sql) ) + { + message_die(GENERAL_ERROR, "Could not save private messages.", "", __LINE__, __FILE__, $saved_sql); + } + +} +else if( $submit || $refresh || $mode != "" ) { - // ----------------------------- - // Posting capabilities are here - // ----------------------------- if(!$userdata['session_logged_in']) { - header("Location: " . append_sid("login.$phpEx?forward_page=privmsg.$phpEx&folder=$folder&mode=$mode")); + header("Location: " . append_sid("login.$phpEx?forward_page=privmsg.$phpEx&folder=$folder&mode=$mode")); } - if(!$userdata['user_allow_pm']) + if( $mode == "searchuser" ) { + if( isset($HTTP_POST_VARS['search']) ) + { + $username_list = username_search("privmsg.$phpEx", $HTTP_POST_VARS['search_author'], 1); + } + else + { + username_search("privmsg.$phpEx", "", 1); + } + // - // Admin has prevented user from sending PM's + // Remove this later // - $msg = $lang['Cannot_send_privmsg']; - message_die(GENERAL_MESSAGE, $msg); + exit; } // - // When we get to the point of a code review we really really really need to look at - // combining the following fragments with the posting routine. I don't think or see it - // necessary to actually use posting for privmsgs but I'm sure more can be combined in - // common functions ... not that I think all functions are common, some functions are - // actually quite classy and sophisticated, champagne, caviar and all that + // Toggles // - - $disable_html = (isset($HTTP_POST_VARS['disable_html'])) ? $HTTP_POST_VARS['disable_html'] : !$userdata['user_allowhtml']; - $disable_bbcode = (isset($HTTP_POST_VARS['disable_bbcode'])) ? $HTTP_POST_VARS['disable_bbcode'] : !$userdata['user_allowbbcode']; - $disable_smilies = (isset($HTTP_POST_VARS['disable_smile'])) ? $HTTP_POST_VARS['disable_smile'] : !$userdata['user_allowsmile']; - $attach_sig = (isset($HTTP_POST_VARS['attach_sig'])) ? $HTTP_POST_VARS['attach_sig'] : $userdata['user_attachsig']; - $preview = (isset($HTTP_POST_VARS['preview'])) ? TRUE : FALSE; - $submit = (isset($HTTP_POST_VARS['submit'])) ? TRUE : FALSE; - - if($mode == "reply" || $mode == "edit") + if( !$board_config['allow_html'] ) { - if(!empty($HTTP_GET_VARS[POST_POST_URL])) - { - $privmsgs_id = $HTTP_GET_VARS[POST_POST_URL]; - } - else if(!empty($HTTP_POST_VARS[POST_POST_URL])) - { - $privmsgs_id = $HTTP_POST_VARS[POST_POST_URL]; - } - else - { - message_die(GENERAL_ERROR, $lang['No_post_id']); - } - } - - if(!empty($HTTP_GET_VARS[POST_USERS_URL]) && !$preview && empty($HTTP_POST_VARS['submit'])) - { - $user_id = $HTTP_GET_VARS[POST_USERS_URL]; - - $sql = "SELECT username - FROM " . USERS_TABLE . " - WHERE user_id = $user_id - AND user_id <> " . ANONYMOUS; - if(!$result = $db->sql_query($sql)) - { - $error = TRUE; - $error_msg = $lang['No_such_user']; - } - else - { - list($to_username) = $db->sql_fetchrow($result); - $to_username = stripslashes($to_username); - } + $html_on = 0; } else { - if(!empty($HTTP_POST_VARS['username_list'])) - { - $to_username = $HTTP_POST_VARS['username_list']; - } - else - { - $to_username = ""; - } + $html_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_html']) ) ? 0 : TRUE ) : $userdata['user_allowhtml']; } - if($mode == "edit" && !$preview && !$submit) + if( !$board_config['allow_bbcode'] ) { - $sql = "SELECT pm.privmsgs_id, pm.privmsgs_subject, pmt.privmsgs_text, u.username, u.user_id - FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u - WHERE pm.privmsgs_id = $privmsgs_id - AND pmt.privmsgs_text_id = pm.privmsgs_id - AND pm.privmsgs_from_userid = " . $userdata['user_id'] . " - AND pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . " - AND u.user_id = pm.privmsgs_to_userid"; - if(!$pm_edit_status = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not obtain private message for editing.", "", __LINE__, __FILE__, $sql); - } - if(!$db->sql_numrows($pm_edit_status)) - { - header("Location: " . append_sid("privmsg.$phpEx?folder=$folder")); - } - - $privmsg = $db->sql_fetchrow($pm_edit_status); - - $subject = stripslashes($privmsg['privmsgs_subject']); - $message = stripslashes($privmsg['privmsgs_text']); - $message = str_replace("[addsig]", "", $message); - $message = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $message); - - $to_username = stripslashes($privmsg['username']); - $to_userid = $privmsg['user_id']; - - } - else if($mode == "reply" && !$preview && !$submit) - { - - $sql = "SELECT pm.privmsgs_subject, pm.privmsgs_date, pmt.privmsgs_text, u.username, u.user_id - FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u - WHERE pm.privmsgs_id = $privmsgs_id - AND pmt.privmsgs_text_id = pm.privmsgs_id - AND pm.privmsgs_to_userid = " . $userdata['user_id'] . " - AND pm.privmsgs_type = " . PRIVMSGS_READ_MAIL . " - AND u.user_id = pm.privmsgs_from_userid"; - if(!$pm_reply_status = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not obtain private message for editing.", "", __LINE__, __FILE__, $sql); - } - if(!$db->sql_numrows($pm_reply_status)) - { - header("Location: " . append_sid("privmsg.$phpEx?folder=$folder")); - } - $privmsg = $db->sql_fetchrow($pm_reply_status); - - $subject = ( (strstr("Re:", $privmsg['privmsgs_subject'])) ? $lang['Re'] . ":" : "" ) . stripslashes($privmsg['privmsgs_subject']); - - $to_username = stripslashes($privmsg['username']); - $to_userid = $privmsg['user_id']; - - if(isset($HTTP_GET_VARS['quote'])) - { - $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); - $message = "On " . $msg_date . " " . $to_username . " wrote:\n\n[quote]\n" . $message . "\n[/quote]"; - } - - } - - // - // Process the username list operations - // - if( !empty($HTTP_POST_VARS['usersubmit'])) - { - if(!empty($HTTP_POST_VARS['username_search']) && !$preview) - { - $username_search = stripslashes(str_replace("*", "%", $HTTP_POST_VARS['username_search'])); - $first_letter = 65; - - $sql = "SELECT username - FROM " . USERS_TABLE . " - WHERE ( username LIKE '%$username_search' - OR username LIKE '$username_search%' - OR username LIKE '%$username_search%' - OR username LIKE '$username_search' ) - AND user_id <> " . ANONYMOUS; - } - else - { - $first_letter = $HTTP_POST_VARS['user_alpha']; - - $sql = "SELECT username - FROM " . USERS_TABLE . " - WHERE ( username LIKE '" . chr($first_letter) . "%' - OR username LIKE '" . chr($first_letter) . "' ) - AND user_id <> " . ANONYMOUS; - } + $bbcode_on = 0; } else { - $first_letter = (!empty($to_username)) ? ord(ucfirst($to_username)) : 65; - - $sql = "SELECT username - FROM " . USERS_TABLE . " - WHERE ( username LIKE '" . chr($first_letter) . "%' - OR username LIKE '" . chr($first_letter) . "' ) - AND user_id <> " . ANONYMOUS; + $bbcode_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_bbcode']) ) ? 0 : TRUE ) : $userdata['user_allowbbcode']; } - $result = $db->sql_query($sql); - $name_set = $db->sql_fetchrowset($result); - - $user_names_select = ""; - $user_alpha_select = ""; + $attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : $userdata['user_attachsig']; - if($submit || $preview) + $user_sig = ( $userdata['user_sig'] != "" ) ? $userdata['user_sig'] : ""; + + if( $submit && $mode != "edit" ) { // // Flood control // - if($mode != 'edit' && !$preview) + $sql = "SELECT MAX(privmsgs_date) AS last_post_time + FROM " . PRIVMSGS_TABLE . " + WHERE privmsgs_from_userid = " . $userdata['user_id']; + if( $result = $db->sql_query($sql) ) { - $sql = "SELECT MAX(privmsgs_date) AS last_post_time - FROM " . PRIVMSGS_TABLE . " - WHERE privmsgs_ip = '$user_ip'"; - if($result = $db->sql_query($sql)) - { - $db_row = $db->sql_fetchrow($result); - $last_post_time = $db_row['last_post_time']; - $current_time = get_gmt_ts(); + $db_row = $db->sql_fetchrow($result); - if(($current_time - $last_post_time) < $board_config['flood_interval']) - { - $error = TRUE; - $error_msg = $lang['Flood_Error']; - } + $last_post_time = $db_row['last_post_time']; + $current_time = time(); + + if( ( $current_time - $last_post_time ) < $board_config['flood_interval']) + { + message_die(GENERAL_MESSAGE, $lang['Flood_Error']); } } // - // End: Flood control + // End Flood control // + } - $subject = (!empty($HTTP_POST_VARS['subject'])) ? $HTTP_POST_VARS['subject'] : ""; - $subject = trim(strip_tags(htmlspecialchars($subject))); - $message = (!empty($HTTP_POST_VARS['message'])) ? $HTTP_POST_VARS['message'] : ""; - - if(empty($subject)) + if( $submit ) + { + if( !empty($HTTP_POST_VARS['username']) ) { - $error = TRUE; - if(isset($error_msg)) - { - $error_msg .= "
"; - } - $error_msg .= $lang['Empty_subject']; - } + $to_username = $HTTP_POST_VARS['username']; - if( !empty($message) ) - { - if(!$error && !$preview) - { - $html_on = ($disable_html) ? FALSE : TRUE; - $bbcode_on = ($diable_bbcode) ? FALSE : TRUE; - $smile_on = ($disable_smilies) ? FALSE : TRUE; - - $bbcode_uid = make_bbcode_uid(); - - $message = prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid); - $message = preg_replace('##si', '</TEXTAREA>', $message); - - if($attach_sig && !empty($userdata['user_sig'])) - { - $message .= "[addsig]"; - } - } - else - { - if(!$error) - { - // do stripslashes incase magic_quotes is on. - $message = stripslashes($HTTP_POST_VARS['message']); - $message = preg_replace('##si', '</TEXTAREA>', $message); - } - } - } - else - { - $error = TRUE; - if(isset($error_msg)) - { - $error_msg .= "
"; - } - $error_msg .= $lang['Empty_msg']; - } - - if( !empty($to_username) ) - { - $sql = "SELECT user_id, username, user_notify_pm, user_email + $sql = "SELECT user_id, user_notify_pm, user_email FROM " . USERS_TABLE . " - WHERE username = '" . addslashes($to_username) . "' + WHERE username = '" . $to_username . "' AND user_id <> " . ANONYMOUS; if(!$result = $db->sql_query($sql)) { @@ -628,132 +849,455 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit") $error_msg .= $lang['No_to_user']; } - if(!$preview && !$error) + $privmsg_subject = trim(strip_tags($HTTP_POST_VARS['subject'])); + if( empty($privmsg_subject) ) { - $msg_time = time(); - - if($mode != "edit") + $error = TRUE; + if( !empty($error_msg) ) { - $sql_info = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_bbcode_uid) - VALUES (" . PRIVMSGS_NEW_MAIL . ", '$subject', " . $userdata['user_id'] . ", " . $to_userdata['user_id'] . ", $msg_time, '$user_ip', '" . $bbcode_uid . "')"; - } - else - { - $sql_info = "UPDATE " . PRIVMSGS_TABLE . " - SET privmsgs_type = " . PRIVMSGS_NEW_MAIL . ", privmsgs_subject = '$subject', privmsgs_from_userid = " . $userdata['user_id'] . ", privmsgs_to_userid = " . $to_userdata['user_id'] . ", privmsgs_date = $msg_time, privmsgs_ip = '$user_ip', privmsgs_bbcode_uid = '$bbcode_uid' - WHERE privmsgs_id = $privmsgs_id"; + $error_msg .= "
"; } + $error_msg .= $lang['Empty_subject']; + } - if(!$pm_sent_status = $db->sql_query($sql_info, BEGIN_TRANSACTION)) + if( !empty($HTTP_POST_VARS['message']) ) + { + if( !$error ) { - message_die(GENERAL_ERROR, "Could not insert/update private message sent info.", "", __LINE__, __FILE__, $sql_info); - } - else - { - - if($mode != "edit") + if( $bbcode_on ) { - $privmsg_sent_id = $db->sql_nextid(); - - $sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_text) - VALUES ($privmsg_sent_id, '$message')"; - } - else - { - $sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . " - SET privmsgs_text = '$message' - WHERE privmsgs_text_id = $privmsgs_id"; + $bbcode_uid = make_bbcode_uid(); } - if(!$pm_sent_text_status = $db->sql_query($sql, END_TRANSACTION)) + $privmsg_message = prepare_message($HTTP_POST_VARS['message'], $html_on, $bbcode_on, $smilies_on, $bbcode_uid); + + } + } + else + { + $error = TRUE; + if(!empty($error_msg)) + { + $error_msg .= "
"; + } + $error_msg .= $lang['Empty_message']; + } + } + + if( $submit && !$error ) + { + // + // Has admin prevented user from sending PM's? + // + if( !$userdata['user_allow_pm'] ) + { + $message = $lang['Cannot_send_privmsg']; + message_die(GENERAL_MESSAGE, $message); + } + + $msg_time = time(); + + if( $mode != "edit" ) + { + // + // See if recipient is at their inbox limit + // + $sql = "SELECT COUNT(privmsgs_id) AS inbox_items, MIN(privmsgs_date) AS oldest_post_time + FROM " . PRIVMSGS_TABLE . " + WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " + OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " ) + AND privmsgs_from_userid = " . $to_userdata['user_id']; + if( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Could not obtain sent message info for sendee.", "", __LINE__, __FILE__, $sql); + } + + $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : ""; + + if( $db->sql_numrows($result) ) + { + $inbox_info = $db->sql_fetchrow($result); + + if( $inbox_info['inbox_items'] > $board_config['max_inbox_privmsgs'] ) { - message_die(GENERAL_ERROR, "Could not insert/update private message sent text.", "", __LINE__, __FILE__, $sql_info); - } - else if($mode != "edit") - { - if($to_userdata['user_notify_pm'] && !empty($to_userdata['user_email'])) + $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " + WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " + OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) + AND privmsgs_date = " . $inbox_info['oldest_post_time'] . " + AND privmsgs_to_userid = " . $to_userdata['user_id']; + if( !$result = $db->sql_query($sql) ) { - $email_headers = "From: " . $board_config['board_email'] . "\r\n"; - include($phpbb_root_path . 'includes/emailer.'.$phpEx); - $emailer = new emailer($board_config['smtp_delivery']); - - $emailer->use_template("privmsg_notify"); - $emailer->email_address($to_userdata['user_email']); - $emailer->set_subject($lang['Notification_subject']); - $emailer->extra_headers($email_headers); - - $emailer->assign_vars(array("SITENAME" => $board_config['sitename'], - "U_INBOX" => "http://".$SERVER_NAME . $PHP_SELF . "?folder=inbox", - "EMAIL_SIG" => $board_config['email_sig'])); - $emailer->send(); - $emailer->reset(); + message_die(GENERAL_ERROR, "Could not delete oldest privmsgs.", "", __LINE__, __FILE__, $sql); } } + } - $msg = $lang['Message_sent'] . "

" . $lang['Click'] . " " . $lang['Here'] . " " . $lang['to_return_inbox'] . "

" . $lang['Click'] . " " . $lang['Here'] . " ". $lang['to_return_index']; + // + // This area is reserved for future use :D + // + + // + // + // - message_die(GENERAL_MESSAGE, $msg); + $sql_info = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) + VALUES (" . PRIVMSGS_NEW_MAIL . ", '$privmsg_subject', " . $userdata['user_id'] . ", " . $to_userdata['user_id'] . ", $msg_time, '$user_ip', $html_on, $bbcode_on, $smilies_on, $attach_sig)"; + } + else + { + $sql_info = "UPDATE " . PRIVMSGS_TABLE . " + SET privmsgs_type = " . PRIVMSGS_NEW_MAIL . ", privmsgs_subject = '$privmsg_subject', privmsgs_from_userid = " . $userdata['user_id'] . ", privmsgs_to_userid = " . $to_userdata['user_id'] . ", privmsgs_date = $msg_time, privmsgs_ip = '$user_ip', privmsgs_enable_html = $html_on, privmsgs_enable_bbcode = $bbcode_on, privmsgs_enable_smilies = $smilies_on, privmsgs_attach_sig = $attach_sig + WHERE privmsgs_id = $privmsg_id"; + } + + if( !$pm_sent_status = $db->sql_query($sql_info, BEGIN_TRANSACTION) ) + { + message_die(GENERAL_ERROR, "Could not insert/update private message sent info.", "", __LINE__, __FILE__, $sql_info); + } + else + { + if( $mode != "edit" ) + { + $privmsg_sent_id = $db->sql_nextid(); + + $sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text) + VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '$privmsg_message')"; + } + else + { + $sql = "UPDATE " . PRIVMSGS_TEXT_TABLE . " + SET privmsgs_text = '$privmsg_message', privmsgs_bbcode_uid = '$bbcode_uid' + WHERE privmsgs_text_id = $privmsg_id"; + } + + if( !$pm_sent_text_status = $db->sql_query($sql, END_TRANSACTION) ) + { + message_die(GENERAL_ERROR, "Could not insert/update private message sent text.", "", __LINE__, __FILE__, $sql_info); + } + else if( $mode != "edit" ) + { + if( $to_userdata['user_notify_pm'] && !empty($to_userdata['user_email']) ) + { + $path = (dirname($HTTP_SERVER_VARS['REQUEST_URI']) == "/") ? "" : dirname($HTTP_SERVER_VARS['REQUEST_URI']); + $email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; + + include($phpbb_root_path . 'includes/emailer.'.$phpEx); + $emailer = new emailer($board_config['smtp_delivery']); + + $emailer->use_template("privmsg_notify"); + + $emailer->extra_headers($email_headers); + $emailer->email_address($to_userdata['user_email']); + $emailer->set_subject($lang['Notification_subject']); + + $emailer->assign_vars(array( + "USERNAME" => $to_username, + "SITENAME" => $board_config['sitename'], + "EMAIL_SIG" => str_replace("
", "\n", "-- \n" . $board_config['board_email_sig']), + + "U_INBOX" => "http://" . $HTTP_SERVER_VARS['SERVER_NAME'] . $path . "/privmsg.$phpEx?folder=inbox") + ); + + $emailer->send(); + $emailer->reset(); + } + } + + $template->assign_vars(array( + "META" => '') + ); + + $msg = $lang['Message_sent'] . "

" . $lang['Click'] . " " . $lang['Here'] . " " . $lang['to_return_inbox'] . "

" . $lang['Click'] . " " . $lang['Here'] . " ". $lang['to_return_index']; + + message_die(GENERAL_MESSAGE, $msg); + } + } + else if( $preview || $refresh || $error ) + { + + // + // If we're previewing or refreshing then obtain the data + // passed to the script, process it a little, do some checks + // where neccessary, etc. + // + $to_username = ( isset($HTTP_POST_VARS['username']) ) ? trim(strip_tags(stripslashes($HTTP_POST_VARS['username']))) : ""; + $privmsg_subject = ( isset($HTTP_POST_VARS['subject']) ) ? trim(strip_tags(stripslashes($HTTP_POST_VARS['subject']))) : ""; + $privmsg_message = ( isset($HTTP_POST_VARS['message']) ) ? trim(stripslashes($HTTP_POST_VARS['message'])) : ""; + $privmsg_message = preg_replace('##si', '</textarea>', $privmsg_message); + + $user_sig = $privmsg['user_sig']; + + $to_username = $privmsg['username']; + $to_userid = $privmsg['user_id']; + + } + else if( $mode == "reply" || $mode == "quote" ) + { + + $sql = "SELECT pm.privmsgs_subject, pm.privmsgs_date, pmt.privmsgs_text, u.username, u.user_id + FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u + WHERE pm.privmsgs_id = $privmsg_id + AND pmt.privmsgs_text_id = pm.privmsgs_id + AND pm.privmsgs_to_userid = " . $userdata['user_id'] . " + AND u.user_id = pm.privmsgs_from_userid"; + if(!$pm_reply_status = $db->sql_query($sql)) + { + message_die(GENERAL_ERROR, "Could not obtain private message for editing.", "", __LINE__, __FILE__, $sql); + } + if( !$db->sql_numrows($pm_reply_status) ) + { +// header("Location: " . append_sid("privmsg.$phpEx?folder=$folder")); + } + $privmsg = $db->sql_fetchrow($pm_reply_status); + + $privmsg_subject = ( (strstr("Re:", $privmsg['privmsgs_subject'])) ? $lang['Re'] . ":" : "" ) . $privmsg['privmsgs_subject']; + + $to_username = $privmsg['username']; + $to_userid = $privmsg['user_id']; + + if( $mode == "quote" ) + { + $privmsg_message = $privmsg['privmsgs_text']; + + $msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']); //"[date]" . $privmsg['privmsgs_time'] . "[/date]"; + + $privmsg_message = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $privmsg_message); + $privmsg_message = str_replace("
", "\n", $privmsg_message); + $privmsg_message = preg_replace($html_entities_match, $html_entities_replace, $privmsg_message); + $privmsg_message = preg_replace('##si', '</textarea>', $privmsg_message); + + $msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['default_timezone']); + + $privmsg_message = $to_username . " wrote:\n\n[quote]\n" . $privmsg_message . "\n[/quote]"; + + $mode = "reply"; } } } // - // Obtain list of groups/users is - // this user is a group moderator + // Has admin prevented user from sending PM's? // - if($mode == "post") + if( !$userdata['user_allow_pm'] && $mode != "edit" ) { - unset($mod_group_list); - $sql = "SELECT g.group_id, g.group_name, g.group_moderator, g.group_single_user, u.username - FROM " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u - WHERE g.group_moderator = " . $userdata['user_id'] ." - AND ug.group_id = g.group_id - AND u.user_id = ug.user_id"; - if(!$group_status = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not obtain group moderator list.", "", __LINE__, __FILE__, $sql); - } - if($db->sql_numrows($group_status)) - { - $mod_group_list = $db->sql_fetchrowset($group_status); - } + $message = $lang['Cannot_send_privmsg']; + message_die(GENERAL_MESSAGE, $message); } + // + // Start output, first preview, then errors + // then post form + // + $page_title = $lang['Send_private_message']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); - if($preview && !$error) + if( $preview && !$error ) { - $bbcode_uid = make_bbcode_uid(); + $orig_word = array(); + $replacement_word = array(); + $result = obtain_word_list($orig_word, $replacement_word); - $preview_message = $message; - $preview_message = prepare_message($preview_message, TRUE, TRUE, TRUE, $bbcode_uid); - $preview_message = bbencode_second_pass($preview_message, $bbcode_uid); - $preview_message = make_clickable($preview_message); - - $s_hidden_fields = ""; - $s_hidden_fields .= ""; - if(isset($HTTP_GET_VARS['quote'])) + if( $bbcode_on ) { - $s_hidden_fields .= ""; + $bbcode_uid = make_bbcode_uid(); } - if(isset($privmsg_id)) + + $preview_message = prepare_message($privmsg_message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid); + + // + // Finalise processing as per viewtopic + // + if( !$html_on ) { - $s_hidden_fields .= ""; + if( $user_sig != "" || !$userdata['user_allowhtml'] ) + { + $user_sig = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $user_sig); + } + } + + if( $attach_sig && $user_sig != "" && $userdata['user_sig_bbcode_uid'] ) + { + $user_sig = bbencode_second_pass($user_sig, $userdata['user_sig_bbcode_uid']); + } + + if( $bbcode_on ) + { + $preview_message = bbencode_second_pass($preview_message, $bbcode_uid); + } + + if( $attach_sig && $user_sig != "" ) + { + $preview_message = $preview_message . "

_________________
" . $user_sig; + } + + if( count($orig_word) ) + { + $preview_subject = preg_replace($orig_word, $replacement_word, $privmsg_subject); + $preview_message = preg_replace($orig_word, $replacement_word, $preview_message); + } + + if( $smilies_on ) + { + $preview_message = smilies_pass($preview_message); + } + + $preview_message = make_clickable($preview_message); + $preview_message = str_replace("\n", "
", $preview_message); + + $s_hidden_fields = ""; + $s_hidden_fields .= ""; + + if( isset($privmsg_id) ) + { + $s_hidden_fields .= ""; } $template->set_filenames(array( - "preview" => "posting_preview.tpl") + "preview" => "privmsgs_preview.tpl") ); $template->assign_vars(array( - "TOPIC_TITLE" => $subject, - "POST_SUBJECT" => $subject, - "ROW_COLOR" => "#" . $theme['td_color1'], - "POSTER_NAME" => $to_username, + "TOPIC_TITLE" => $preview_subject, + "POST_SUBJECT" => $preview_subject, + "MESSAGE_TO" => $to_username, + "MESSAGE_FROM" => $userdata['username'], "POST_DATE" => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']), - "MESSAGE" => stripslashes(nl2br($preview_message)), + "MESSAGE" => $preview_message, "S_HIDDEN_FIELDS" => $s_hidden_fields, + "L_SUBJECT" => $lang['Subject'], + "L_DATE" => $lang['Date'], + "L_FROM" => $lang['From'], + "L_TO" => $lang['To'], "L_PREVIEW" => $lang['Preview'], "L_POSTED" => $lang['Posted']) ); @@ -777,72 +1321,101 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit") // End error handling // + // + // Generic posting form ... + // + // // Load templates // $template->set_filenames(array( - "body" => "privmsgs_posting_body.tpl", + "body" => "posting_body.tpl", "jumpbox" => "jumpbox.tpl") ); $jumpbox = make_jumpbox(); $template->assign_vars(array( - "JUMPBOX_LIST" => $jumpbox, - "SELECT_NAME" => POST_FORUM_URL) + "L_GO" => $lang['Go'], + "L_JUMP_TO" => $lang['Jump_to'], + "L_SELECT_FORUM" => $lang['Select_forum'], + + "S_JUMPBOX_LIST" => $jumpbox, + "S_JUMPBOX_ACTION" => append_sid("viewforum.$phpEx")) ); $template->assign_var_from_handle("JUMPBOX", "jumpbox"); + // + // Generate username search output + // + $result = $db->sql_query($sql_namesearch); + $name_set = $db->sql_fetchrowset($result); + + $user_names_select = ""; + if($db->sql_numrows($result)) + { + for($i = 0; $i < count($name_set); $i++) + { + $name_selected = ($to_username == $name_set[$i]['username']) ? " selected=\"selected\"" : ""; + $user_names_select .= "\n"; + } + } + else + { + $user_names_select .= "\n"; + } + + // + // Enable extensions in posting_body + // + $template->assign_block_vars("privmsg_extensions", array()); + + // + // HTML toggle selection + // if($board_config['allow_html']) { $html_status = $lang['ON']; - $html_toggle = 'assign_block_vars("html_checkbox", array()); } else { $html_status = $lang['OFF']; } + // + // BBCode toggle selection + // if($board_config['allow_bbcode']) { $bbcode_status = $lang['ON']; - $bbcode_toggle = 'assign_block_vars("bbcode_checkbox", array()); } else { - $bbcode_status = $lang['BBCode'] . $lang['is_OFF']; + $bbcode_status = $lang['OFF']; } + // + // Smilies toggle selection + // if($board_config['allow_smilies']) { $smilies_status = $lang['ON']; - $smile_toggle = 'assign_block_vars("smilies_checkbox", array()); } else { $smilies_status = $lang['OFF']; } - $sig_toggle = 'assign_block_vars("signature_checkbox", array()); } - $sig_toggle .= "> " . $lang['Attach_signature']; if($mode == 'post') { @@ -863,30 +1436,31 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit") $post_a = $lang['Edit_message']; } - $username_input = ''; - $subject_input = ''; - $message_input = ''; - - $s_hidden_fields = ""; - $s_hidden_fields .= ""; + $s_hidden_fields = ""; + $s_hidden_fields .= ""; if($mode == "edit") { - $s_hidden_fields .= ""; + $s_hidden_fields .= ""; } $template->assign_vars(array( - "S_USERNAME_INPUT" => $username_input, + "SUBJECT" => preg_replace($html_entities_match, $html_entities_replace, $privmsg_subject), + "USERNAME" => preg_replace($html_entities_match, $html_entities_replace, $to_username), + "MESSAGE" => $privmsg_message, + "HTML_STATUS" => $html_status, + "SMILIES_STATUS" => $smilies_status, + "BBCODE_STATUS" => $bbcode_status, + "FORUM_NAME" => $lang['Private_message'], - "SUBJECT_INPUT" => $subject_input, - "MESSAGE_INPUT" => $message_input, - "HTML_STATUS" => $html_status, - "HTML_TOGGLE" => $html_toggle, - "SMILIES_STATUS" => $smilies_status, - "SMILE_TOGGLE" => $smile_toggle, - "SIG_TOGGLE" => $sig_toggle, - "NOTIFY_TOGGLE" => $notify_toggle, - "BBCODE_TOGGLE" => $bbcode_toggle, - "BBCODE_STATUS" => $bbcode_status, + "BOX_NAME" => $l_box_name, + "INBOX_IMG" => $inbox_img, + "SENTBOX_IMG" => $sentbox_img, + "OUTBOX_IMG" => $outbox_img, + "SAVEBOX_IMG" => $savebox_img, + "INBOX_LINK" => $inbox_url, + "SENTBOX_LINK" => $sentbox_url, + "OUTBOX_LINK" => $outbox_url, + "SAVEBOX_LINK" => $savebox_url, "L_SUBJECT" => $lang['Subject'], "L_MESSAGE_BODY" => $lang['Message_body'], @@ -900,179 +1474,37 @@ else if($mode == "post" || $mode == "reply" || $mode == "edit") "L_HTML_IS" => $lang['HTML'] . " " . $lang['is'], "L_BBCODE_IS" => $lang['BBCode'] . " " . $lang['is'], "L_SMILIES_ARE" => $lang['Smilies'] . " " . $lang['are'], + "L_DISABLE_HTML" => $lang['Disable'] . $lang['HTML'] . $lang['in_this_post'], + "L_DISABLE_BBCODE" => $lang['Disable'] . $lang['BBCode'] . $lang['in_this_post'], + "L_DISABLE_SMILIES" => $lang['Disable'] . $lang['Smilies'] . $lang['in_this_post'], + "L_ATTACH_SIGNATURE" => $lang['Attach_signature'], - "S_ALPHA_SELECT" => $user_alpha_select, + "S_HTML_CHECKED" => (!$html_on) ? "checked=\"checked\"" : "", + "S_BBCODE_CHECKED" => (!$bbcode_on) ? "checked=\"checked\"" : "", + "S_SMILIES_CHECKED" => (!$smilies_on) ? "checked=\"checked\"" : "", + "S_SIGNATURE_CHECKED" => ($attach_sig) ? "checked=\"checked\"" : "", "S_NAMES_SELECT" => $user_names_select, + "S_HIDDEN_FORM_FIELDS" => $s_hidden_fields, "S_POST_ACTION" => append_sid("privmsg.$phpEx"), - "S_HIDDEN_FORM_FIELDS" => $s_hidden_fields) + + "U_VIEW_FORUM" => append_sid("privmsg.$phpEx")) ); $template->pparse("body"); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); -} -else if( ( isset($HTTP_POST_VARS['delete']) && !empty($HTTP_POST_VARS['mark']) ) || !empty($HTTP_POST_VARS['deleteall']) ) -{ - if(!$userdata['session_logged_in']) - { - header("Location: " . append_sid("login.$phpEx?forward_page=privmsg.$phpEx&folder=inbox")); - } - - - if(isset($HTTP_POST_VARS['delete'])) - { - $delete_ary = $HTTP_POST_VARS['mark']; - } - else if(!empty($HTTP_POST_VARS['deleteall'])) - { - switch($folder) - { - case 'inbox': - $delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND ( - privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " )"; - break; - case 'outbox': - $delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_NEW_MAIL; - break; - case 'sentbox': - $delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL; - break; - case 'savebox': - $delete_type = "( privmsgs_from_userid = " . $userdata['user_id'] . " OR privmsgs_to_userid = " . $userdata['user_id'] . " ) - AND privmsgs_type = " . PRIVMSGS_SAVED_MAIL; - break; - } - - $deleteall_sql = "SELECT privmsgs_id - FROM " . PRIVMSGS_TABLE . " - WHERE " . $delete_type; - - if(!$del_list_status = $db->sql_query($deleteall_sql)) - { - message_die(GENERAL_ERROR, "Could not obtain id list to delete all messages.", "", __LINE__, __FILE__, $deleteall_sql); - } - - $delete_list = $db->sql_fetchrowset($del_list_status); - for($i = 0; $i < count($delete_list); $i++) - { - $delete_ary[] = $delete_list[$i]['privmsgs_id']; - } - unset($delete_list); - unset($delete_type); - } - - $delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . " - WHERE "; - $delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . " - WHERE "; - - for($i = 0; $i < count($delete_ary); $i++) - { - $delete_sql .= "privmsgs_id = " . $delete_ary[$i] . " "; - $delete_text_sql .= "privmsgs_text_id = " . $delete_ary[$i] . " "; - - if($i < count($delete_ary) -1) - { - $delete_sql .= "OR "; - $delete_text_sql .= "OR "; - } - } - - $delete_sql .= "AND "; - - switch($folder) - { - case 'inbox': - $delete_sql .= "privmsgs_to_userid = " . $userdata['user_id'] . " AND ( - privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " )"; - break; - case 'outbox': - $delete_sql .= "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_NEW_MAIL; - break; - case 'sentbox': - $delete_sql .= "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL; - break; - case 'savebox': - $delete_sql .= "( privmsgs_from_userid = " . $userdata['user_id'] . " OR privmsgs_to_userid = " . $userdata['user_id'] . " ) - AND privmsgs_type = " . PRIVMSGS_SAVED_MAIL; - break; - } - - if(!$del_status = $db->sql_query($delete_sql, BEGIN_TRANSACTION)) - { - message_die(GENERAL_ERROR, "Could not delete private message info.", "", __LINE__, __FILE__, $delete_sql); - } - else - { - if(!$del_text_status = $db->sql_query($delete_text_sql, END_TRANSACTION)) - { - message_die(GENERAL_ERROR, "Could not delete private message text.", "", __LINE__, __FILE__, $delete_text_sql); - } - } - -} -else if( ( isset($HTTP_POST_VARS['save']) && !empty($HTTP_POST_VARS['mark']) ) && $folder != "savebox" && $folder != "outbox") -{ - if(!$userdata['session_logged_in']) - { - header("Location: " . append_sid("login.$phpEx?forward_page=privmsg.$phpEx&folder=inbox")); - } - - $saved_sql = "UPDATE " . PRIVMSGS_TABLE . " - SET privmsgs_type = " . PRIVMSGS_SAVED_MAIL . " - WHERE "; - - if(isset($HTTP_POST_VARS['save'])) - { - $saved_ary = $HTTP_POST_VARS['mark']; - - for($i = 0; $i < count($saved_ary); $i++) - { - $saved_sql .= "privmsgs_id = " . $saved_ary[$i] . " "; - if($i < count($saved_ary) -1) - { - $saved_sql .= "OR "; - } - } - $saved_sql .= "AND "; - } - - switch($folder) - { - case 'inbox': - $saved_sql .= "privmsgs_to_userid = " . $userdata['user_id'] . " AND ( - privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " )"; - break; - case 'sentbox': - $saved_sql .= "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_READ_MAIL; - break; - } - - if(!$save_status = $db->sql_query($saved_sql)) - { - message_die(GENERAL_ERROR, "Could not save private messages.", "", __LINE__, __FILE__, $saved_sql); - } - - $folder = "savebox"; - -} -else if($HTTP_POST_VARS['cancel']) -{ - $folder = "inbox"; - $mode = ""; - } // // Default page // - if(!$userdata['session_logged_in']) { - header("Location: " . append_sid("login.$phpEx?forward_page=privmsg.$phpEx&folder=inbox")); + header("Location: " . append_sid("login.$phpEx?forward_page=privmsg.$phpEx&folder=inbox")); } +$page_title = $lang['Private_Messaging']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); // @@ -1082,36 +1514,30 @@ $template->set_filenames(array( "body" => "privmsgs_body.tpl", "jumpbox" => "jumpbox.tpl") ); + $jumpbox = make_jumpbox(); $template->assign_vars(array( - "JUMPBOX_LIST" => $jumpbox, - "SELECT_NAME" => POST_FORUM_URL) + "L_GO" => $lang['Go'], + "L_JUMP_TO" => $lang['Jump_to'], + "L_SELECT_FORUM" => $lang['Select_forum'], + + "S_JUMPBOX_LIST" => $jumpbox, + "S_JUMPBOX_ACTION" => append_sid("viewforum.$phpEx")) ); $template->assign_var_from_handle("JUMPBOX", "jumpbox"); // -// These may well be better handled in the -// templates +// New message // -$inbox_url = " "; -$inbox_url .= ($folder != "inbox") ? "" . $lang['Inbox'] . "" : "" . $lang['Inbox'] . ""; - -$sentbox_url = " "; -$sentbox_url .= ($folder != "sentbox") ? "" . $lang['Sent'] . "" : "" . $lang['Sent'] . ""; - -$outbox_url = " "; -$outbox_url .= ($folder != "outbox") ? "" . $lang['Outbox'] . "" : "" . $lang['Outbox'] . ""; - -$savebox_url = " "; -$savebox_url .= ($folder != "savebox") ? "" . $lang['Saved'] . "" : "" . $lang['Saved'] . ""; - -$post_new_mesg_url = ""; +$post_new_mesg_url = "\"""; // // General SQL to obtain messages // -$sql_tot = "SELECT COUNT(privmsgs_id) AS total FROM " . PRIVMSGS_TABLE . " "; -$sql = "SELECT pm.privmsgs_type, pm.privmsgs_id, pm.privmsgs_date, pm.privmsgs_subject, u.user_id, u.username FROM " . PRIVMSGS_TABLE . " pm, " . USERS_TABLE . " u "; +$sql_tot = "SELECT COUNT(privmsgs_id) AS total + FROM " . PRIVMSGS_TABLE . " "; +$sql = "SELECT pm.privmsgs_type, pm.privmsgs_id, pm.privmsgs_date, pm.privmsgs_subject, u.user_id, u.username + FROM " . PRIVMSGS_TABLE . " pm, " . USERS_TABLE . " u "; switch($folder) { @@ -1145,19 +1571,24 @@ switch($folder) break; case 'savebox': - $sql_tot .= "WHERE privmsgs_to_userid = " . $userdata['user_id'] . " - AND privmsgs_type = " . PRIVMSGS_SAVED_MAIL; + $sql_tot .= "WHERE ( ( privmsgs_to_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) + OR ( privmsgs_from_userid = " . $userdata['user_id'] . " + AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . ") )"; - $sql .= "WHERE pm.privmsgs_to_userid = " . $userdata['user_id'] . " - AND u.user_id = pm.privmsgs_from_userid - AND pm.privmsgs_type = " . PRIVMSGS_SAVED_MAIL; + $sql .= "WHERE ( ( pm.privmsgs_to_userid = " . $userdata['user_id'] . " + AND pm.privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " + AND u.user_id = pm.privmsgs_from_userid ) + OR ( pm.privmsgs_from_userid = " . $userdata['user_id'] . " + AND pm.privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " + AND u.user_id = pm.privmsgs_from_userid ) )"; break; } // // Show messages over previous x days/months // -if(!empty($HTTP_POST_VARS['msgdays']) || !empty($HTTP_GET_VARS['msgdays'])) +if( $submit_msgdays && ( !empty($HTTP_POST_VARS['msgdays']) || !empty($HTTP_GET_VARS['msgdays']) ) ) { $msg_days = (!empty($HTTP_POST_VARS['msgdays'])) ? $HTTP_POST_VARS['msgdays'] : $HTTP_GET_VARS['msgdays']; $min_msg_time = time() - ($msg_days * 86400); @@ -1177,106 +1608,220 @@ else } $sql .= $limit_msg_time . " ORDER BY pm.privmsgs_date DESC LIMIT $start, " . $board_config['topics_per_page']; +$sql_all_tot = $sql_tot; $sql_tot .= $limit_msg_time_total; +// +// Get messages +// +if( !$pm_tot_status = $db->sql_query($sql_tot) ) +{ + message_die(GENERAL_ERROR, "Could not query private message information.", "", __LINE__, __FILE__, $sql_tot); +} +else +{ + if( $db->sql_numrows($pm_tot_status) ) + { + $row = $db->sql_fetchrow($pm_tot_status); + $pm_total = $row['total']; + } +} + +if( !$pm_all_status = $db->sql_query($sql_all_tot) ) +{ + message_die(GENERAL_ERROR, "Could not query private message information.", "", __LINE__, __FILE__, $sql_tot); +} +else +{ + if( $db->sql_numrows($pm_all_status) ) + { + $row = $db->sql_fetchrow($pm_all_status); + $pm_all_total = $row['total']; + } +} + +if( !$pm_status = $db->sql_query($sql) ) +{ + message_die(GENERAL_ERROR, "Could not query private messages.", "", __LINE__, __FILE__, $sql); +} +$pm_count = $db->sql_numrows($pm_status); + +$pm_list = $db->sql_fetchrowset($pm_status); + // // Build select box // $previous_days = array(0, 1, 7, 14, 30, 90, 180, 364); $previous_days_text = array($lang['All_Messages'], "1 " . $lang['Day'], "7 " . $lang['Days'], "2 " . $lang['Weeks'], "1 " . $lang['Month'], "3 ". $lang['Months'], "6 " . $lang['Months'], "1 " . $lang['Year']); -$select_msg_days = ""; + +// +// Define correct icons +// +if( $folder == "inbox" ) +{ + $post_pm_img = "\"""; + $reply_pm_img = "\"""; + $quote_pm_img = "\"""; + $edit_pm_img = ""; + + $l_box_name = $lang['Inbox']; +} +else if( $folder == "outbox" ) +{ + $post_pm_img = "\"""; + $reply_pm_img = ""; + $quote_pm_img = ""; + $edit_pm_img = "\"""; + + $l_box_name = $lang['Outbox']; +} +else if( $folder == "savebox" ) +{ + $post_pm_img = "\"""; + $reply_pm_img = "\"""; + $quote_pm_img = "\"""; + $edit_pm_img = ""; + + $l_box_name = $lang['Savedbox']; +} +else if( $folder == "sentbox" ) +{ + $post_pm_img = "\"""; + $reply_pm_img = ""; + $quote_pm_img = "\"""; + $edit_pm_img = ""; + + $l_box_name = $lang['Sentbox']; +} + +// +// Output data for inbox status +// +if( $folder != "outbox" ) +{ + $inbox_limit_pct = round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * 100); + $inbox_limit_img_length = round(( $pm_all_total / $board_config['max_' . $folder . '_privmsgs'] ) * $board_config['privmsg_graphic_length']); + $inbox_limit_remain = $board_config['max_' . $folder . '_privmsgs'] - $pm_all_total; + + $template->assign_block_vars("box_size_notice", array()); + + $l_box_size_status = $lang['Your'] . " " . $l_box_name . " " . $lang['is'] . " " . $inbox_limit_pct . "% " . $lang['full']; + +} // // Dump vars to template // $template->assign_vars(array( - "INBOX" => $inbox_url, - "SENTBOX" => $sentbox_url, - "OUTBOX" => $outbox_url, - "SAVEBOX" => $savebox_url, + "BOX_NAME" => $l_box_name, + "INBOX_IMG" => $inbox_img, + "SENTBOX_IMG" => $sentbox_img, + "OUTBOX_IMG" => $outbox_img, + "SAVEBOX_IMG" => $savebox_img, + "INBOX_LINK" => $inbox_url, + "SENTBOX_LINK" => $sentbox_url, + "OUTBOX_LINK" => $outbox_url, + "SAVEBOX_LINK" => $savebox_url, + "POST_PM_IMG" => $post_pm_img, + + "INBOX_LIMIT_IMG_WIDTH" => $inbox_limit_img_length, + "INBOX_LIMIT_PERCENT" => $inbox_limit_pct, + + "BOX_SIZE_STATUS" => $l_box_size_status, + + "L_INBOX" => $lang['Inbox'], + "L_OUTBOX" => $lang['Outbox'], + "L_SENTBOX" => $lang['Sent'], + "L_SAVEBOX" => $lang['Saved'], "L_MARK" => $lang['Mark'], "L_FLAG" => $lang['Flag'], "L_SUBJECT" => $lang['Subject'], "L_DATE" => $lang['Date'], "L_DISPLAY_MESSAGES" => $lang['Display_messages'], - "L_FROM_OR_TO" => (($folder == "inbox" || $folder == "savebox") ? $lang['From'] : $lang['To']), + "L_FROM_OR_TO" => ($folder == "inbox" || $folder == "savebox") ? $lang['From'] : $lang['To'], + "L_MARK_ALL" => $lang['Mark_all'], + "L_UNMARK_ALL" => $lang['Unmark_all'], - "S_HIDDEN_FIELDS" => "", "S_PRIVMSGS_ACTION" => append_sid("privmsg.$phpEx?folder=$folder"), + "S_HIDDEN_FIELDS" => "", "S_POST_NEW_MSG" => $post_new_mesg_url, - "S_SELECT_MSG_DAYS" => $select_msg_days, - "S_MSG_DAYS_ACTION" => append_sid("privmsg.$phpEx?folder=$folder&start=$start"), + "S_MSG_DAYS_OPTIONS" => $select_msg_days, "U_POST_NEW_TOPIC" => $post_new_topic_url) ); -// -// Get messages -// -if(!$pm_tot_status = $db->sql_query($sql_tot)) -{ - message_die(GENERAL_ERROR, "Could not query private message information.", "", __LINE__, __FILE__, $sql_tot); -} -if(!$pm_status = $db->sql_query($sql)) -{ - message_die(GENERAL_ERROR, "Could not query private messages.", "", __LINE__, __FILE__, $sql); -} -$pm_total = $db->sql_numrows($pm_tot_status); -$pm_count = $db->sql_numrows($pm_status); -$pm_list = $db->sql_fetchrowset($pm_status); // // Okay, let's build the correct folder // -if($pm_count) +if( $pm_count ) { for($i = 0; $i < $pm_count; $i++) { $privmsg_id = $pm_list[$i]['privmsgs_id']; $flag = $pm_list[$i]['privmsgs_type']; - $icon_flag = ($flag == PRIVMSGS_READ_MAIL || $flag == PRIVMSGS_SAVED_MAIL || $flag == PRIVMSGS_SENT_MAIL) ? "" : ""; + $icon_flag = ($flag == PRIVMSGS_NEW_MAIL ) ? "\""" : "\"""; $msg_userid = $pm_list[$i]['user_id']; - $msg_username = stripslashes($pm_list[$i]['username']); + $msg_username = $pm_list[$i]['username']; - $u_from_user_profile = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$msg_userid"); + $u_from_user_profile = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$msg_userid"); - $msg_subject = stripslashes($pm_list[$i]['privmsgs_subject']); - $u_subject = append_sid("privmsg.$phpEx?folder=$folder&mode=read&" . POST_POST_URL . "=$privmsg_id"); + $msg_subject = $pm_list[$i]['privmsgs_subject']; + + if( count($orig_word) ) + { + $msg_subject = preg_replace($orig_word, $replacement_word, $msg_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['board_timezone']); - if($flag == PRIVMSGS_NEW_MAIL && $folder == "inbox") + if( $flag == PRIVMSGS_NEW_MAIL && $folder == "inbox" ) { $msg_subject = "" . $msg_subject . ""; $msg_date = "" . $msg_date . ""; $msg_username = "" . $msg_username . ""; } - $row_color = (!($i % 2)) ? "#".$theme['td_color1'] : "#".$theme['td_color2']; + $row_color = (!($i % 2)) ? $theme['td_color1'] : $theme['td_color2']; + $row_class = (!($i % 2)) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars("listrow", array( + "ROW_COLOR" => "#". $row_color, + "ROW_CLASS" => $row_class, "ICON_FLAG_IMG" => $icon_flag, "FROM" => $msg_username, "SUBJECT" => $msg_subject, "DATE" => $msg_date, - "ROW_COLOR" => $row_color, - "S_DEL_CHECKBOX" => "", + "S_MARK_ID" => $privmsg_id, "U_READ" => $u_subject, "U_FROM_USER_PROFILE" => $u_from_user_profile) ); } // for ... + + $template->assign_vars(array( + "PAGINATION" => generate_pagination("privmsg.$phpEx?folder=$folder", $pm_total, $board_config['topics_per_page'], $start), + "ON_PAGE" => (floor($start/$board_config['topics_per_page'])+1), + "TOTAL_PAGES" => ceil(($pm_total)/$board_config['topics_per_page']), + + "L_OF" => $lang['of'], + "L_PAGE" => $lang['Page'], + "L_GOTO_PAGE" => $lang['Goto_page']) + ); + } else { @@ -1287,16 +1832,6 @@ else $template->assign_block_vars("nomessages", array() ); } -$template->assign_vars(array( - "PAGINATION" => generate_pagination("privmsg.$phpEx?folder=$folder", $pm_total, $board_config['topics_per_page'], $start), - "ON_PAGE" => (floor($start/$board_config['topics_per_page'])+1), - "TOTAL_PAGES" => ceil(($pm_total)/$board_config['topics_per_page']), - - "L_OF" => $lang['of'], - "L_PAGE" => $lang['Page'], - "L_GOTO_PAGE" => $lang['Goto_page']) -); - $template->pparse("body"); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); diff --git a/phpBB/templates/PSO/PSO.cfg b/phpBB/templates/PSO/PSO.cfg index 73be66064b..5cfd2159c1 100644 --- a/phpBB/templates/PSO/PSO.cfg +++ b/phpBB/templates/PSO/PSO.cfg @@ -55,7 +55,7 @@ $images['pm_savebox'] = "images/msg_savebox.gif"; $images['pm_sentbox'] = "images/msg_sentbox.gif"; $images['pm_readmsg'] = "images/msg_read.gif"; $images['pm_unreadmsg'] = "images/msg_unread.gif"; -$images['pm_postmsg'] = "templates/PSO/images/post.giff"; +$images['pm_postmsg'] = "templates/PSO/images/post.gif"; $images['pm_replymsg'] = "templates/PSO/images/reply.gif"; $images['pm_editmsg'] = "images/icon_edit.gif"; $images['pm_quotemsg'] = "images/icon_quote.gif"; @@ -91,5 +91,6 @@ $images['auth_mod'] = ""; // graphic, ie. 100% = this length // $board_config['vote_graphic_length'] = 300; +$board_config['privmsg_graphic_length'] = 200; ?> \ No newline at end of file diff --git a/phpBB/templates/PSO/admin/admin_config_body.tpl b/phpBB/templates/PSO/admin/admin_config_body.tpl index 100b03ea2b..a0978180b3 100644 --- a/phpBB/templates/PSO/admin/admin_config_body.tpl +++ b/phpBB/templates/PSO/admin/admin_config_body.tpl @@ -9,145 +9,156 @@ {L_GENERAL_SETTINGS} - {L_SITE_NAME}: + {L_SITE_NAME}: - {L_ACCT_ACTIVATION}: + {L_ACCT_ACTIVATION}: {L_NO}ne   User   Admin - Flood Interval:
Number of seconds a user must wait between posts + Flood Interval:
Number of seconds a user must wait between posts - Topics Per Page + Topics Per Page: - Posts Per Page + Posts Per Page: - Hot Threshold + Hot Threshold: - Default Style: + Default Style: {STYLE_SELECT} - Override user style:
Replaces users style with the default + Override user style:
Replaces users style with the default {L_YES}   {L_NO} - Default Language: + Default Language: {LANG_SELECT} - Date Format:
{L_DATE_FORMAT_EXPLAIN} + Date Format:
{L_DATE_FORMAT_EXPLAIN} - System Timezone: + System Timezone: {TIMEZONE_SELECT} - Enable GZip Compression: + Enable GZip Compression: {L_YES}   {L_NO} - Enable Forum Pruning: + Enable Forum Pruning: {L_YES}   {L_NO} User/Forum Ability Settings - Allow HTML + Allow HTML: {L_YES}   {L_NO} - Allow BBCode + Allow BBCode: {L_YES}   {L_NO} - Allow Smilies + Allow Smilies: {L_YES}   {L_NO} - Smilies Storage Path
Path under your phpBB root dir, e.g. images/smilies + Smilies Storage Path:
Path under your phpBB root dir, e.g. images/smilies - Allow Signatures + Allow Signatures: {L_YES}   {L_NO} - Maximum signature length
Number of characters allowed + Maximum signature length:
Number of characters allowed - Allow Name Change + Allow Name Change: {L_YES}   {L_NO} + + Inbox limit: + messages + + + Sentbox limit: + messages + + + Savebox limit: + messages + Avatar Settings - Allow local gallery avatars + Allow local gallery avatars: {L_YES}   {L_NO} - Allow remote avatars
Avatars linked from another website + Allow remote avatars:
Avatars linked from another website {L_YES}   {L_NO} - Allow avatar uploading + Allow avatar uploading: {L_YES}   {L_NO} - Max. Avatar File Size
For uploaded avatar files + Max. Avatar File Size:
For uploaded avatar files Bytes - Max. Avatar Size
- (height x width) + Max. Avatar Size:
(height x width) x - Avatar Storage Path
Path under your phpBB root dir, e.g. images/avatars + Avatar Storage Path:
Path under your phpBB root dir, e.g. images/avatars Email Settings - Admin Email Address + Admin Email Address: - Email Signature
This text will be attached to all emails the board sends + Email Signature:
This text will be attached to all emails the board sends - Use SMTP for delivery
Say {L_YES} if you want or have to send email via a server instead of the local mail function + Use 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 + SMTP Server: COPPA Settings - FAX Number + FAX Number: - Mailing Address
Signed COPPA agreements will be mailed here + Mailing Address:
Signed COPPA agreements will be mailed here diff --git a/phpBB/templates/PSO/bbcode.tpl b/phpBB/templates/PSO/bbcode.tpl index 2cfdb4b0fe..73697e5a92 100755 --- a/phpBB/templates/PSO/bbcode.tpl +++ b/phpBB/templates/PSO/bbcode.tpl @@ -15,62 +15,48 @@ +
  • + - +
    - + - + - +
    - {L_QUOTE} -
    -
    {L_QUOTE}
    - -
    +
    -
    -
    -
    -
    -

    + - +
    - + - + - +
    - {L_CODE} -
    -
    {L_CODE}
    - -
    +		
     				
     
    -				
    -
    -
    -
    -

    + @@ -78,6 +64,7 @@ + @@ -85,6 +72,7 @@ + @@ -92,28 +80,33 @@ + - + - + + - + - + + - + + {DESCRIPTION} + -{EMAIL} +{EMAIL} diff --git a/phpBB/templates/PSO/mini_search.tpl b/phpBB/templates/PSO/mini_search.tpl new file mode 100644 index 0000000000..1eb50aaef6 --- /dev/null +++ b/phpBB/templates/PSO/mini_search.tpl @@ -0,0 +1,74 @@ + + + + + + + +{META} +{SITENAME} -+- {PAGE_TITLE} + + + + + + + + +
    + + + +
    + + + + + + + + + + + + + +
    {L_SEARCH_USERNAME}
    {L_SEARCH_USERNAME}:
    Use * as a wildcard
    {L_UPDATE_USERNAME}:
    + +
    {L_CLOSE_WINDOW}
    + + + \ No newline at end of file diff --git a/phpBB/templates/PSO/posting_body.tpl b/phpBB/templates/PSO/posting_body.tpl index d97a7ebcf9..c94392523f 100644 --- a/phpBB/templates/PSO/posting_body.tpl +++ b/phpBB/templates/PSO/posting_body.tpl @@ -1,9 +1,21 @@ + + + + + + +
    {INBOX_IMG} {INBOX_LINK}   {SENTBOX_IMG} {SENTBOX_LINK}   {OUTBOX_IMG} {OUTBOX_LINK}   {SAVEBOX_IMG} {SAVEBOX_LINK}
    + +
    + +
    {SITENAME} {L_INDEX} -> {FORUM_NAME}
    + + + + + + + + + +
    {INBOX_IMG} {INBOX_LINK}   {SENTBOX_IMG} {SENTBOX_LINK}   {OUTBOX_IMG} {OUTBOX_LINK}   {SAVEBOX_IMG} {SAVEBOX_LINK} + + + + + + + + + + + +
    {BOX_SIZE_STATUS}
    + + +
    {INBOX_LIMIT_PERCENT}
    0%50%100%
    +
    + + - + - - + +
    {SITENAME} {L_INDEX}{L_DISPLAY_MESSAGES}: {S_SELECT_MSG_DAYS}
    {L_DISPLAY_MESSAGES}:
    - + - +
    @@ -28,8 +66,8 @@ - - + + @@ -40,20 +78,26 @@
    - - +
     {INBOX}   {SENTBOX}   {OUTBOX}   {SAVEBOX}{S_POST_NEW_MSG}{POST_PM_IMG}
    {listrow.ICON_FLAG_IMG}  {listrow.FROM}  {listrow.SUBJECT}{listrow.DATE}{listrow.S_DEL_CHECKBOX}{listrow.DATE}
    - - - - + + + +
    {S_POST_NEW_MSG}   {L_PAGE} {ON_PAGE} {L_OF} {TOTAL_PAGES} {PAGINATION} {S_HIDDEN_FIELDS}  {POST_PM_IMG}   {L_PAGE} {ON_PAGE} {L_OF} {TOTAL_PAGES} {PAGINATION} {S_HIDDEN_FIELDS}  
    - +
    + + + +
    Mark all :: Unmark all
    + + -
    {S_TIMEZONE} {JUMPBOX}
    \ No newline at end of file + diff --git a/phpBB/templates/PSO/privmsgs_preview.tpl b/phpBB/templates/PSO/privmsgs_preview.tpl new file mode 100644 index 0000000000..0f54f4fc09 --- /dev/null +++ b/phpBB/templates/PSO/privmsgs_preview.tpl @@ -0,0 +1,54 @@ + + + + +
    + + + + + + + + + + + + + + + + + + +
    + + + +
    {L_PREVIEW}
    + + + + +
    {L_SUBJECT}:{POST_SUBJECT}
    + + + + +
    {L_POSTED}:{POST_DATE}
    + + + + +
    {L_FROM}:{MESSAGE_FROM}
    + + + + +
    {L_TO}:{MESSAGE_TO}
    + + + +
    {MESSAGE}
    + +
    diff --git a/phpBB/templates/PSO/privmsgs_read_body.tpl b/phpBB/templates/PSO/privmsgs_read_body.tpl index 403888bd48..5ee85d1ff4 100644 --- a/phpBB/templates/PSO/privmsgs_read_body.tpl +++ b/phpBB/templates/PSO/privmsgs_read_body.tpl @@ -1,60 +1,76 @@ - + +
    - +
    {SITENAME} {L_INDEX}{SITENAME} {L_INDEX}
    - - -
    +
    + +
    -
    + - - + - +
    - - + +
    {INBOX}   {SENTBOX}   {OUTBOX}   {SAVEBOX} {S_POST_REPLY_MSG}  {S_POST_NEW_MSG}{INBOX_IMG} {INBOX_LINK}   {SENTBOX_IMG} {SENTBOX_LINK}   {OUTBOX_IMG} {OUTBOX_LINK}   {SAVEBOX_IMG} {SAVEBOX_LINK}{QUOTE_PM_IMG} {REPLY_PM_IMG} {EDIT_PM_IMG}
    {L_FROM_OR_TO}{L_MESSAGE}{BOX_NAME} :: {L_MESSAGE}
    + - - - -
    - - -
    {POSTER_NAME}
    {POSTER_RANK}
    {RANK_IMAGE}

    {POSTER_AVATAR}

    {POSTER_JOINED}
    {POSTER_POSTS}
    {POSTER_FROM}
    - - - - - - - - + +
    - - - - -
    Post image icon{L_POSTED}: {POST_DATE}    {L_SUBJECT}: {POST_SUBJECT}  {EDIT_IMG} {QUOTE_IMG} 

    {MESSAGE}

    {PROFILE_IMG} {EMAIL_IMG} {WWW_IMG} {ICQ_STATUS_IMG} {ICQ_ADD_IMG} {AIM_IMG} {YIM_IMG} {MSN_IMG}
    {L_SUBJECT}:{POST_SUBJECT}
    + + + + + + + + + + + + +
    - + + + +
    {S_POST_NEW_MSG}  {S_POST_REPLY_MSG}{L_POSTED}:{POST_DATE}
    + + + + +
    {L_FROM}:{MESSAGE_FROM}
    + + + + +
    {L_TO}:{MESSAGE_TO}
    + + + +
    {MESSAGE}
    {PROFILE_IMG} {EMAIL_IMG} {SEARCH_IMG} {WWW_IMG} {ICQ_STATUS_IMG} {ICQ_ADD_IMG} {AIM_IMG} {YIM_IMG} {MSN_IMG}
    + +
    {QUOTE_PM_IMG} {REPLY_PM_IMG} {EDIT_PM_IMG} {S_HIDDEN_FIELDS} 
    +
    - +
    diff --git a/phpBB/templates/subSilver/admin/admin_config_body.tpl b/phpBB/templates/subSilver/admin/admin_config_body.tpl index baf19aeba4..a0978180b3 100644 --- a/phpBB/templates/subSilver/admin/admin_config_body.tpl +++ b/phpBB/templates/subSilver/admin/admin_config_body.tpl @@ -9,152 +9,162 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + - + - + - + - + - - + - + - + - + - + - + - + - + -
    {S_TIMEZONE} {JUMPBOX}{L_GENERAL_SETTINGS}
    {L_SITE_NAME}:{L_SITE_NAME}:
    {L_ACCT_ACTIVATION}:{L_ACCT_ACTIVATION}: {L_NO}ne   User   Admin
    Flood Interval:
    Number of seconds a user must wait between posts
    Flood Interval:
    Number of seconds a user must wait between posts
    Topics Per PageTopics Per Page:
    Posts Per PagePosts Per Page:
    Hot ThresholdHot Threshold:
    Default Style:Default Style: {STYLE_SELECT}
    Override user style:
    Replaces users style with the default
    Override user style:
    Replaces users style with the default
    {L_YES}   {L_NO}
    Default Language:Default Language: {LANG_SELECT}
    Date Format:
    {L_DATE_FORMAT_EXPLAIN}
    Date Format:
    {L_DATE_FORMAT_EXPLAIN}
    System Timezone:System Timezone: {TIMEZONE_SELECT}
    Enable GZip Compression:Enable GZip Compression: {L_YES}   {L_NO}
    Enable Forum Pruning:Enable Forum Pruning: {L_YES}   {L_NO}
    User/Forum Ability Settings
    Allow HTMLAllow HTML: {L_YES}   {L_NO}
    Allow BBCodeAllow BBCode: {L_YES}   {L_NO}
    Allow SmiliesAllow Smilies: {L_YES}   {L_NO}
    Smilies Storage Path
    Path under your phpBB root dir, e.g. images/smilies
    Smilies Storage Path:
    Path under your phpBB root dir, e.g. images/smilies
    Allow SignaturesAllow Signatures: {L_YES}   {L_NO}
    Maximum signature length
    Number of characters allowed
    Maximum signature length:
    Number of characters allowed
    Allow Name ChangeAllow Name Change: {L_YES}   {L_NO}
    Inbox limit: messages
    Sentbox limit: messages
    Savebox limit: messages
    Avatar Settings
    Allow local gallery avatarsAllow local gallery avatars: {L_YES}   {L_NO}
    Allow remote avatars
    Avatars linked from another website
    Allow remote avatars:
    Avatars linked from another website
    {L_YES}   {L_NO}
    Allow avatar uploadingAllow avatar uploading: {L_YES}   {L_NO}
    Max. Avatar File Size
    For uploaded avatar files
    Max. Avatar File Size:
    For uploaded avatar files
    Bytes
    Max. Avatar Size
    - (height x width) +
    Max. Avatar Size:
    (height x width)
    x
    Avatar Storage Path
    Path under your phpBB root dir, e.g. images/avatars
    Avatar Storage Path:
    Path under your phpBB root dir, e.g. images/avatars
    Email Settings
    Admin Email AddressAdmin Email Address:
    Email Signature
    This text will be attached to all emails the board sends
    Email Signature:
    This text will be attached to all emails the board sends
    Use SMTP for delivery
    Say {L_YES} if you want or have to send email via a server instead of the local mail function
    Use 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 ServerSMTP Server:
    COPPA Settings
    FAX NumberFAX Number:
    Mailing Address
    Signed COPPA agreements will be mailed here
    Mailing Address:
    Signed COPPA agreements will be mailed here
    {S_HIDDEN_FIELDS}

    diff --git a/phpBB/templates/subSilver/agreement.tpl b/phpBB/templates/subSilver/agreement.tpl index c91c8e0fce..d548aff360 100644 --- a/phpBB/templates/subSilver/agreement.tpl +++ b/phpBB/templates/subSilver/agreement.tpl @@ -4,74 +4,56 @@
    {SITENAME} {L_INDEX}
    - +
    -
    - + + + + diff --git a/phpBB/templates/subSilver/bbcode.tpl b/phpBB/templates/subSilver/bbcode.tpl index 2cfdb4b0fe..82ad67d7c7 100755 --- a/phpBB/templates/subSilver/bbcode.tpl +++ b/phpBB/templates/subSilver/bbcode.tpl @@ -20,94 +20,75 @@ -
    {SITENAME} + - Forums Registration Agreement
    + - +
    - - - - - - - -
    {SITENAME} - Forums Registration - Agreement
    - - - - -

    - While the administrators and moderators of this forum - will attempt to remove or edit any generally objectionable - material as quickly as possible, it is impossible to review - every message. Therefore you acknowledge that all posts - made to these forums express the views and opinions of - the author and not the administrators, moderators or webmaster - (except for posts by these people) and hence will not - be held liable.
    -
    - You agree not to post any abusive, obscene, vulgar, slanderous, - hateful, threatening, sexually-orientated or any other - material that may violate any applicable laws. Doing so - may lead to you being immediately and permanently banned - (and your service provider being informed). The IP address - of all posts is recorded to aid in enforcing these conditions. - You agree that the webmaster, administrator and moderators - of this forum have the right to remove, edit, move or - close any topic at any time should they see fit. As a - user you agree to any information you have entered above - being stored in a database. While this information will - not be disclosed to any third party without your consent - the webmaster, administrator and moderators cannot be - held responsible for any hacking attempt that may lead - to the data being compromised.
    -
    - This forum system uses cookies to store information on - your local computer. These cookies do not contain any - of the information you have entered above, they serve - only to improve your viewing pleasure. The email address - is used only for confirming your registration details - and password (and for sending new passwords should you - forget your current one).
    -
    - By clicking Register below you agree to be bound by these - conditions.
    -
    -
    - -
    -
    -
    -

    + While the administrators and moderators of this forum will attempt + to remove or edit any generally objectionable material as quickly + as possible, it is impossible to review every message. Therefore you + acknowledge that all posts made to these forums express the views + and opinions of the author and not the administrators, moderators + or webmaster (except for posts by these people) and hence will not + be held liable.
    +
    + You agree not to post any abusive, obscene, vulgar, slanderous, hateful, + threatening, sexually-orientated or any other material that may violate + any applicable laws. Doing so may lead to you being immediately and + permanently banned (and your service provider being informed). The + IP address of all posts is recorded to aid in enforcing these conditions. + You agree that the webmaster, administrator and moderators of this + forum have the right to remove, edit, move or close any topic at any + time should they see fit. As a user you agree to any information you + have entered above being stored in a database. While this information + will not be disclosed to any third party without your consent the + webmaster, administrator and moderators cannot be held responsible + for any hacking attempt that may lead to the data being compromised.
    +
    + This forum system uses cookies to store information on your local + computer. These cookies do not contain any of the information you + have entered above, they serve only to improve your viewing pleasure. + The email address is used only for confirming your registration details + and password (and for sending new passwords should you forget your + current one).
    +
    + By clicking Register below you agree to be bound by these conditions.
    +
    +
    + +
    +
    - - + +
    - {L_QUOTE} -
    -
    + + - - - -
    Quote:
    - -
    - - -
    -
    -
    -
    +
    + +
    + - - - + +
    - {L_CODE} -
    -
    + + - - - -
    {L_CODE}:
    - -
    -				
    -
    -				
    -
    -
    -
    +
    + +
    + + - + - + - + - +
    - + - + - + - + - + - + - + diff --git a/phpBB/templates/subSilver/confirm_body.tpl b/phpBB/templates/subSilver/confirm_body.tpl index f53bd67c21..d28ddb5847 100644 --- a/phpBB/templates/subSilver/confirm_body.tpl +++ b/phpBB/templates/subSilver/confirm_body.tpl @@ -1,30 +1,21 @@ - -
    - - - - -
    - - - - -
    - - - - - - - -
    {MESSAGE_TITLE}

    - {MESSAGE_TEXT}
    -
    - {S_HIDDEN_FIELDS} - -    -
    -
    -
    -
    -
    \ No newline at end of file + + + + + + + + +
    {MESSAGE_TITLE}
    +
    +
    + {MESSAGE_TEXT}
    +
    + {S_HIDDEN_FIELDS} + +    + +
    +
    +
    +
    diff --git a/phpBB/templates/subSilver/error_body.tpl b/phpBB/templates/subSilver/error_body.tpl index 43d2be9b32..36d486cb92 100644 --- a/phpBB/templates/subSilver/error_body.tpl +++ b/phpBB/templates/subSilver/error_body.tpl @@ -1,29 +1,18 @@ - + +
    - -
    + - + + + + + + +
    - - - - -
    - - - - - - - - - - -
     
    {ERROR_MESSAGE}
     
    -
    -
     
    {ERROR_MESSAGE}
     
    \ No newline at end of file +
    diff --git a/phpBB/templates/subSilver/formIE.css b/phpBB/templates/subSilver/formIE.css index d6caab6392..9e4bf2ceb4 100644 --- a/phpBB/templates/subSilver/formIE.css +++ b/phpBB/templates/subSilver/formIE.css @@ -14,4 +14,5 @@ border-top-width : 1px; border-right-width : 1px; border-bottom-width : 1px; border-left-width : 1px; -} \ No newline at end of file +} + diff --git a/phpBB/templates/subSilver/groupcp_info_body.tpl b/phpBB/templates/subSilver/groupcp_info_body.tpl index 8aa3e758fa..84647e57cd 100644 --- a/phpBB/templates/subSilver/groupcp_info_body.tpl +++ b/phpBB/templates/subSilver/groupcp_info_body.tpl @@ -4,121 +4,94 @@
    {SITENAME} {L_INDEX}
    - - - - -
    - - - - -
    - - - - - - - - - - - - - - - - -
    {L_GROUP_INFORMATION}
    {L_GROUP_NAME}:{GROUP_NAME}
    {L_GROUP_DESC}:{GROUP_DESC}
    {L_GROUP_MEMBERSHIP}:{GROUP_DETAILS}{S_HIDDEN_FIELDS}
    -
    -
    -
    +
    + + + + + + + + + + + + + + + + +
    {L_GROUP_INFORMATION}
    {L_GROUP_NAME}:{GROUP_NAME}
    {L_GROUP_DESC}:{GROUP_DESC}
    {L_GROUP_MEMBERSHIP}:{GROUP_DETAILS}{S_HIDDEN_FIELDS}
    +
    - +
    - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Private Message{L_USERNAME}{L_POSTS}{L_FROM}{L_EMAIL}{L_WEBSITE}
    Group - Moderator
    {MOD_PM_IMG} {MOD_USERNAME}{MOD_POSTS}{MOD_FROM}{MOD_EMAIL_IMG}{MOD_WWW_IMG}
    Group - Members
    {memberrow.PM_IMG} - {memberrow.USERNAME}{memberrow.POSTS} - {memberrow.FROM} {memberrow.EMAIL_IMG} - {memberrow.WWW_IMG}
    Pending - MembersAction
    {pendingmembersrow.PM_IMG} - {pendingmembersrow.USERNAME}{pendingmembersrow.POSTS}{pendingmembersrow.FROM}{pendingmembersrow.EMAIL_IMG}{pendingmembersrow.WWW_IMG}{pendingmembersrow.SELECT} {L_SELECT}
    - -   - -
    {L_NO_MEMBERS}
    -
    -
    Private Message{L_USERNAME}{L_POSTS}{L_FROM}{L_EMAIL}{L_WEBSITE}
    Group Moderator
    {MOD_PM_IMG} {MOD_USERNAME}{MOD_POSTS}{MOD_FROM}{MOD_EMAIL_IMG}{MOD_WWW_IMG}
    Group Members
    {memberrow.PM_IMG} {memberrow.USERNAME}{memberrow.POSTS} {memberrow.FROM} + {memberrow.EMAIL_IMG} {memberrow.WWW_IMG}
    Pending MembersAction
    {pendingmembersrow.PM_IMG} + {pendingmembersrow.USERNAME}{pendingmembersrow.POSTS}{pendingmembersrow.FROM}{pendingmembersrow.EMAIL_IMG}{pendingmembersrow.WWW_IMG}{pendingmembersrow.SELECT} + {L_SELECT}
    + +   + +
    {L_NO_MEMBERS}
    diff --git a/phpBB/templates/subSilver/groupcp_list_body.tpl b/phpBB/templates/subSilver/groupcp_list_body.tpl index 820dc5ca18..a56802acdf 100644 --- a/phpBB/templates/subSilver/groupcp_list_body.tpl +++ b/phpBB/templates/subSilver/groupcp_list_body.tpl @@ -1,68 +1,56 @@ -
    +
    -
    - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/phpBB/templates/subSilver/groupcp_user_body.tpl b/phpBB/templates/subSilver/groupcp_user_body.tpl index 04bc7c1f7c..0e8428d67b 100644 --- a/phpBB/templates/subSilver/groupcp_user_body.tpl +++ b/phpBB/templates/subSilver/groupcp_user_body.tpl @@ -4,69 +4,63 @@
    Group Moderator
    {L_PM}{L_USERNAME}{L_EMAIL}{L_FROM}{L_JOINED}{L_POSTS}{L_WEBSITE}
     {MOD_PM_IMG} {MOD_USERNAME} {MOD_EMAIL_IMG} {MOD_FROM}{MOD_JOINED}{MOD_POSTS} {MOD_WWW_IMG} 
    Group + Members
    {L_PM}{L_USERNAME}{L_EMAIL}{L_FROM}{L_JOINED}{L_POSTS}{L_WEBSITE}
     {memberrow.PM_IMG} {memberrow.USERNAME} {memberrow.EMAIL_IMG} {memberrow.FROM}{memberrow.JOINED}{memberrow.POSTS} {memberrow.WWW_IMG} 
    + - + +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Group Moderator
    {L_PM}{L_USERNAME}{L_EMAIL}{L_FROM}{L_JOINED}{L_POSTS}{L_WEBSITE}
     {MOD_PM_IMG} {MOD_USERNAME} {MOD_EMAIL_IMG} {MOD_FROM}{MOD_JOINED}{MOD_POSTS} {MOD_WWW_IMG} 
    Group Members
    {L_PM}{L_USERNAME}{L_EMAIL}{L_FROM}{L_JOINED}{L_POSTS}{L_WEBSITE}
     {memberrow.PM_IMG} {memberrow.USERNAME} {memberrow.EMAIL_IMG} {memberrow.FROM}{memberrow.JOINED}{memberrow.POSTS} {memberrow.WWW_IMG} 
    - - - - - -
     {L_PAGE} {ON_PAGE} {L_OF} - {TOTAL_PAGES}{PAGINATION} 
    -
    -
     {L_PAGE} {ON_PAGE} {L_OF} {TOTAL_PAGES}{PAGINATION} 
    {SITENAME} {L_INDEX}
    - +
    -
    - + + + + + + + + + + + + + + + + diff --git a/phpBB/templates/subSilver/index_body.tpl b/phpBB/templates/subSilver/index_body.tpl index 927b337649..d2c43f5a93 100644 --- a/phpBB/templates/subSilver/index_body.tpl +++ b/phpBB/templates/subSilver/index_body.tpl @@ -5,116 +5,76 @@ - - -
    {L_GROUP_MEMBERSHIP_DETAILS}
    {L_YOU_BELONG_GROUPS} + - + + + + + + +
    - - - - - - - - - - - - - - - - - - - -
    {L_GROUP_MEMBERSHIP_DETAILS}
    {L_YOU_BELONG_GROUPS} - - - - - - - - -
    {GROUP_MEMBER_SELECT} - -
    -
    {L_PENDING_GROUPS} - - - - - - - - -
    {GROUP_PENDING_SELECT} - -
    -
    {L_JOIN_A_GROUP}
    {L_SELECT_A_GROUP} - - - - - - - - -
    {GROUP_LIST_SELECT} - -
    -
    -
    {GROUP_MEMBER_SELECT} + + + +
    +
    {L_PENDING_GROUPS} + + + + + + + + +
    {GROUP_PENDING_SELECT} + + + +
    +
    {L_JOIN_A_GROUP}
    {L_SELECT_A_GROUP} + + + + + + +
    {GROUP_LIST_SELECT} + + + +
    {L_SEARCH_NEW}
    on {LAST_VISIT_DATE}
    - - - - -
    - - - - - - - - - - - - - - - - - - - - - - -
     {L_FORUM}  {L_TOPICS}  {L_POSTS}  {L_LASTPOST} 
    {catrow.CAT_DESC} 
    {catrow.forumrow.FOLDER} - {catrow.forumrow.FORUM_NAME}
    -
    {catrow.forumrow.FORUM_DESC}
    -
    {L_MODERATOR} {catrow.forumrow.MODERATORS}
    {catrow.forumrow.TOPICS}{catrow.forumrow.POSTS} - {catrow.forumrow.LAST_POST}
    -
    -
    - +
    + + + + + + + + + + + + + + + + + + + + + +
     {L_FORUM}  {L_TOPICS}  {L_POSTS}  {L_LASTPOST} 
    {catrow.CAT_DESC} 
    {catrow.forumrow.FOLDER} {catrow.forumrow.FORUM_NAME}
    +
    {catrow.forumrow.FORUM_DESC}
    +
    {L_MODERATOR} {catrow.forumrow.MODERATORS}
    {catrow.forumrow.TOPICS}{catrow.forumrow.POSTS} {catrow.forumrow.LAST_POST}
    +
    {L_MARK_FORUMS_READ} {S_TIMEZONE}
    - +
    - + + + + + + +
    - - - - -
    - - - - - - - - - - - -
    {L_WHO_IS_ONLINE}
    {L_WHO_IS_ONLINE} -

    A total of {TOTAL_POSTS} posts - have been made.
    - We have {TOTAL_USERS} registered users.
    - Welcome to our newest member {NEWEST_USER}.

    -
    {TOTAL_USERS_ONLINE}.
    - {LOGGED_IN_USER_LIST}
    -
    +
    {L_WHO_IS_ONLINE}
    {L_WHO_IS_ONLINE} +

    A total of {TOTAL_POSTS} posts have been + made.
    + We have {TOTAL_USERS} registered users.
    + Welcome to our newest member {NEWEST_USER}.

    {TOTAL_USERS_ONLINE}.
    + {LOGGED_IN_USER_LIST}

    - - - - -
    - - - - -
    - - - - - - - - -
    {L_LOGIN_LOGOUT}
    {L_USERNAME}: - - -    {L_PASSWORD}: - - -      {L_AUTO_LOGIN} - -     - - -
    -
    -
    -
    + + + + + + + +
    {L_LOGIN_LOGOUT}
    {L_USERNAME}: + +    {L_PASSWORD}: + +      {L_AUTO_LOGIN} + +     + +
    +  
    diff --git a/phpBB/templates/subSilver/login_body.tpl b/phpBB/templates/subSilver/login_body.tpl index f45d934181..7b2d34b755 100644 --- a/phpBB/templates/subSilver/login_body.tpl +++ b/phpBB/templates/subSilver/login_body.tpl @@ -4,57 +4,46 @@
    - +
    - + + +
    - - - - -
    - - - - - - - -
    Please enter your username and password to login
    -
    - - - - - - - - - - - - - - - - - - - - - -
     
    {L_USERNAME}: - -
    {L_PASSWORD}: - -
    {L_AUTO_LOGIN}: - -
    - - -
    {L_SEND_PASSWORD}
    -
    -
    -
    +
    Please enter your username and password + to login
    +
    + + + + + + + + + + + + + + + + + + + + + +
     
    {L_USERNAME}: + +
    {L_PASSWORD}: + +
    {L_AUTO_LOGIN}: + +
    + + +
    {L_SEND_PASSWORD}
    +
    diff --git a/phpBB/templates/subSilver/memberlist_body.tpl b/phpBB/templates/subSilver/memberlist_body.tpl index 7dc3e32c35..aad19cbfd4 100644 --- a/phpBB/templates/subSilver/memberlist_body.tpl +++ b/phpBB/templates/subSilver/memberlist_body.tpl @@ -3,51 +3,38 @@ -
    {SITENAME} {L_INDEX}{L_SELECT_SORT_METHOD}: {S_MODE_SELECT}  {L_ORDER} {S_ORDER_SELECT}   + {L_SELECT_SORT_METHOD}: {S_MODE_SELECT}  {L_ORDER} {S_ORDER_SELECT}  
    - +
    -
    - + + + + + + + + + + + + + + + + + + + + + diff --git a/phpBB/templates/subSilver/message_body.tpl b/phpBB/templates/subSilver/message_body.tpl index f52f2cb89d..10da9d7734 100644 --- a/phpBB/templates/subSilver/message_body.tpl +++ b/phpBB/templates/subSilver/message_body.tpl @@ -4,34 +4,21 @@
     {L_USERNAME}{L_EMAIL}{L_FROM}{L_JOINED}{L_POSTS}{L_WEBSITE}
     {memberrow.PM_IMG} {memberrow.USERNAME} {memberrow.EMAIL_IMG} {memberrow.FROM}{memberrow.JOINED}{memberrow.POSTS} {memberrow.WWW_IMG} 
    + - + +
    - - - - - - - - - - - - - - - - - - - - - - - - -
     {L_USERNAME}{L_EMAIL}{L_FROM}{L_JOINED}{L_POSTS}{L_WEBSITE}
     {memberrow.PM_IMG} {memberrow.USERNAME} {memberrow.EMAIL_IMG} {memberrow.FROM}{memberrow.JOINED}{memberrow.POSTS} {memberrow.WWW_IMG} 
    - - - - - -
     {L_PAGE} {ON_PAGE} - {L_OF} {TOTAL_PAGES}{PAGINATION} 
    -
    -
     {L_PAGE} {ON_PAGE} {L_OF} {TOTAL_PAGES}{PAGINATION} 
    - +
    - + + + diff --git a/phpBB/templates/subSilver/mini_search.tpl b/phpBB/templates/subSilver/mini_search.tpl new file mode 100644 index 0000000000..b8cc546148 --- /dev/null +++ b/phpBB/templates/subSilver/mini_search.tpl @@ -0,0 +1,162 @@ + + + + + + + + +{SITENAME} -+- {PAGE_TITLE} + + + + + + + + +
    + {MESSAGE_TITLE}
    - + + + + + + +
    - - - - - - - -
    {MESSAGE_TITLE}
    - - - - - - - - - - -
     
    {MESSAGE_TEXT}
     
    - -
    -
     
    {MESSAGE_TEXT}
     
    + + + +
    +
    + + + + + + + +
    {L_SEARCH_USERNAME}

    + + +

    + Use * as a wildcard
    +
    + + {L_UPDATE_USERNAME}
    + + +

    +
    + + Close window +
    +
    +
    +  + + + diff --git a/phpBB/templates/subSilver/modcp_body.tpl b/phpBB/templates/subSilver/modcp_body.tpl index 2343390136..5d573af433 100644 --- a/phpBB/templates/subSilver/modcp_body.tpl +++ b/phpBB/templates/subSilver/modcp_body.tpl @@ -4,64 +4,54 @@
    {SITENAME} {L_INDEX} -> {FORUM_NAME}
    - - - - -
    - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {L_MOD_CP} -
    {L_MOD_CP_EXPLAIN}
      {L_TOPICS}  {L_REPLIES}  {L_LASTPOST}  {L_SELECT} 
    {topicrow.FOLDER_IMG} {topicrow.TOPIC_TITLE}{topicrow.REPLIES}{topicrow.LAST_POST} - -
    {S_HIDDEN_FIELDS} - -   - -   - -   - -
    -
    -
    - + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    {L_MOD_CP} +
    {L_MOD_CP_EXPLAIN}
      {L_TOPICS}  {L_REPLIES}  {L_LASTPOST}  {L_SELECT} 
    {topicrow.FOLDER_IMG} {topicrow.TOPIC_TITLE}{topicrow.REPLIES}{topicrow.LAST_POST} + +
    {S_HIDDEN_FIELDS} + +   + +   + +   + +
    + -
    {L_PAGE} {ON_PAGE} {L_OF} {TOTAL_PAGES}{PAGINATION} + {PAGINATION}
    {S_TIMEZONE}
    + diff --git a/phpBB/templates/subSilver/modcp_move.tpl b/phpBB/templates/subSilver/modcp_move.tpl index 0f350a5459..93cc1dc057 100644 --- a/phpBB/templates/subSilver/modcp_move.tpl +++ b/phpBB/templates/subSilver/modcp_move.tpl @@ -5,45 +5,32 @@
    {JUMPBOX}
    - +
    - + + +
    + {MESSAGE_TITLE}
    - + + + + + +
    - - - - - - - -
    {MESSAGE_TITLE}
    - - - - - - - - - - -
     
    {L_MOVE_TO_FORUM} -   {S_FORUM_BOX}
    -
    - {MESSAGE_TEXT}

    -
    - {S_HIDDEN_FIELDS} - -    - -
     
    -
    +
     
    {L_MOVE_TO_FORUM}   {S_FORUM_BOX}
    +
    + {MESSAGE_TEXT}

    +
    + {S_HIDDEN_FIELDS} + +    +
     
    - + diff --git a/phpBB/templates/subSilver/modcp_split.tpl b/phpBB/templates/subSilver/modcp_split.tpl index 342dfd888f..13a2a1a0e4 100644 --- a/phpBB/templates/subSilver/modcp_split.tpl +++ b/phpBB/templates/subSilver/modcp_split.tpl @@ -6,90 +6,76 @@ -> {FORUM_NAME}
    - +
    -
    - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/phpBB/templates/subSilver/modcp_viewip.tpl b/phpBB/templates/subSilver/modcp_viewip.tpl index 8f4f7ba3ed..f8628762ca 100644 --- a/phpBB/templates/subSilver/modcp_viewip.tpl +++ b/phpBB/templates/subSilver/modcp_viewip.tpl @@ -4,66 +4,54 @@
    {L_SPLIT_TOPIC}
    {L_SPLIT_TOPIC_EXPLAIN}
    {L_SPLIT_SUBJECT} + +
    {L_SPLIT_FORUM}{FORUM_INPUT}
    + - + + +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {L_SPLIT_TOPIC}
    {L_SPLIT_TOPIC_EXPLAIN}
    {L_SPLIT_SUBJECT} - -
    {L_SPLIT_FORUM}{FORUM_INPUT}
    - - - - - -
    - - - -
    -
    {L_AUTHOR}{L_MESSAGE}{L_SELECT}
    {postrow.POSTER_NAME} - - - - - - - -
    Post image icon{L_POSTED}: - {postrow.POST_DATE}    {L_POST_SUBJECT}: - {postrow.POST_SUBJECT}
    -
    - {postrow.MESSAGE}
    - -
      - -  
    .
    - - - - - -
    - - - - {S_HIDDEN_FIELDS}
    -
    +
    + + +
    +
    {L_AUTHOR}{L_MESSAGE}{L_SELECT}
    {postrow.POSTER_NAME} + + + + + + + +
    Post image icon{L_POSTED}: + {postrow.POST_DATE}    {L_POST_SUBJECT}: {postrow.POST_SUBJECT}
    +
    + {postrow.MESSAGE}
    +
      + +  
    .
    + + + +
    + + + + {S_HIDDEN_FIELDS}
    {SITENAME} {L_INDEX}
    - +
    - - -
    - + + + + + + + + + + + + + + + + + + + + + + +
    {L_IP_INFO}
    {L_THIS_POST_IP}
    + - + +
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {L_IP_INFO}
    {L_THIS_POST_IP}
    - - - - - -
     {IP}[ {L_LOOKUP_IP} - ] 
    -
    {L_OTHER_USERS}
    - - - - - -
     {userrow.USERNAME}{L_SEARCH_POSTS} -  
    -
    {L_OTHER_IPS}
    - - - - - -
     {iprow.IP}[ {L_LOOKUP_IP} - ] 
    -
    -
     {IP}[ {L_LOOKUP_IP} + ] 
    {L_OTHER_USERS}
    + + + + + +
     {userrow.USERNAME}{L_SEARCH_POSTS} +  
    +
    {L_OTHER_IPS}
    + + + + + +
     {iprow.IP}[ {L_LOOKUP_IP} + ] 
    +
    diff --git a/phpBB/templates/subSilver/overall_footer.tpl b/phpBB/templates/subSilver/overall_footer.tpl index 745f1b6a74..d883f569d2 100644 --- a/phpBB/templates/subSilver/overall_footer.tpl +++ b/phpBB/templates/subSilver/overall_footer.tpl @@ -18,9 +18,6 @@ // --> Powered by phpBB {PHPBB_VERSION} © 2001 phpBB Group -
    diff --git a/phpBB/templates/subSilver/overall_header.tpl b/phpBB/templates/subSilver/overall_header.tpl index c17d641dcb..64416b665e 100644 --- a/phpBB/templates/subSilver/overall_header.tpl +++ b/phpBB/templates/subSilver/overall_header.tpl @@ -6,9 +6,15 @@ + + + {META} -{PAGE_TITLE} +{SITENAME} :: {PAGE_TITLE}