diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php index 20d7e057b5..17a1ca9f6e 100755 --- a/phpBB/language/lang_english.php +++ b/phpBB/language/lang_english.php @@ -213,9 +213,10 @@ $lang['From'] = "From"; $lang['To'] = "To"; $lang['Date'] = "Date"; $lang['Mark'] = "Mark"; +$lang['Display_messages'] = "Display messages from previous"; // Followed by number of days/weeks/months +$lang['All_Messages'] = "All Messages"; $lang['Cannot_send_privmsg'] = "Sorry but you are not currently allowed to send private messages."; - $lang['No_to_user'] = "You must specify a username to send this message"; $lang['No_such_user'] = "Sorry but no such user exists"; @@ -257,12 +258,10 @@ $lang['Always_smile'] = "Always enable Smilies"; $lang['Always_html'] = "Always allow HTML"; $lang['Always_bbcode'] = "Always allow BBCode"; $lang['Always_add_sig'] = "Always attach my signature"; - -$l_boardtheme = "Board Theme"; -$l_boardlang = "Board Language"; -$l_nothemes = "No Themes In database"; -$l_saveprefs = "Save $l_preferences"; -$l_timezone = "Timezone"; +$lang['Board_theme'] = "Board Theme"; +$lang['Board_lang'] = "Board Language"; +$lang['No_themes'] = "No Themes In database"; +$lang['Timezone'] = "Timezone"; $lang['Avatar_panel'] = "Avatar control panel"; $lang['Avatar'] = "Avatar"; @@ -291,12 +290,12 @@ $lang['Avatar_filetype'] = "The avatar filetype must be .jpg, .gif or .png"; $lang['Avatar_filesize'] = "The avatar image file size must more than 0 kB and less than " . round($board_config['avatar_filesize'] / 1024) . " kB"; $lang['Avatar_imagesize'] = "The avatar must be less than " . $board_config['avatar_max_width'] . " pixels wide and " . $board_config['avatar_max_height'] . " pixels high"; +$lang['Account_added'] = "Thank you for registering, your account has been created. You may now login with your username and password"; +$lang['Account_inactive'] = "Your account has been created. However, this forum requires account activation, an activation key has been sent to the email address you provided. Pease check your email for further information"; + $lang['Welcome_subject'] = "Welcome to " . $board_config['sitename'] . " Forums"; -$lang['Account_added'] = "Thank you for registering, your account has been created. You may now login with your username and password"; - -$lang['Account_inactive'] = "Your account has been created. However, this forum requires account activation, an activation key has been sent to the email address you provided. Pease check your email for further information"; -$lang['Welcome_email_activate'] = $lang['Welcome_subject'] . " +$lang['Welcome_email_activate'] = $lang['Welcome_subject'] . ", Please keep this email for your records. @@ -316,7 +315,24 @@ However, should you forget your password you can request a new one which will be Thank you for registering. -"; +"; // END +$lang['Welcome_email'] = $lang['Welcome_subject'] . ", + +Please keep this email for your records. + +Your account information is as follows: + +---------------------------- +Username: $username +Password: $password +---------------------------- + +Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. +However, should you forget your password we provide an easy to use script to generate and mail a new, random, password. + +Thank you for registering. + +"; // END $lang['COPPA'] = "Your account has been created but has to be approved, please check your email for details."; $lang['Welcome_COPPA'] = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to:
" . $lang['Mailing_address'] . "
Or fax it to:
" . $lang['Fax_info'] . "
Once this information has been received your account will be activated by the administrator and you will receive an email notification."; diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php index 5c0c04ae9a..9a72a86b7e 100644 --- a/phpBB/privmsg.php +++ b/phpBB/privmsg.php @@ -1058,23 +1058,9 @@ $savebox_url .= ($folder != "savebox") ? ""; -$template->assign_vars(array( - "INBOX" => $inbox_url, - "SENTBOX" => $sentbox_url, - "OUTBOX" => $outbox_url, - "SAVEBOX" => $savebox_url, - - "L_MARK" => $lang['Mark'], - "L_FLAG" => $lang['Flag'], - "L_SUBJECT" => $lang['Subject'], - "L_DATE" => $lang['Date'], - "L_FROM_OR_TO" => (($folder == "inbox" || $folder == "savebox") ? $lang['From'] : $lang['To']), - - "S_HIDDEN_FIELDS" => "", - "S_PRIVMSGS_ACTION" => append_sid("privmsg.$phpEx?folder=$folder"), - "S_POST_NEW_MSG" => $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 "; @@ -1088,7 +1074,7 @@ switch($folder) $sql .= "WHERE pm.privmsgs_to_userid = " . $userdata['user_id'] . " AND u.user_id = pm.privmsgs_from_userid AND ( pm.privmsgs_type = " . PRIVMSGS_NEW_MAIL . " - OR pm.privmsgs_type = " . PRIVMSGS_READ_MAIL . " )"; + OR pm.privmsgs_type = " . PRIVMSGS_READ_MAIL . " )"; break; case 'outbox': @@ -1119,8 +1105,73 @@ switch($folder) break; } -$sql .= " ORDER BY pm.privmsgs_date DESC LIMIT $start, " . $board_config['topics_per_page']; +// +// Show messages over previous x days/months +// +if(!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); + $limit_msg_time_total = " AND privmsgs_date > $min_msg_time"; + $limit_msg_time = " AND pm.privmsgs_date > $min_msg_time "; + + if(!empty($HTTP_POST_VARS['msgdays'])) + { + $start = 0; + } +} +else +{ + $limit_msg_time = ""; + $post_days = 0; +} + +$sql .= $limit_msg_time . " ORDER BY pm.privmsgs_date DESC LIMIT $start, " . $board_config['topics_per_page']; +$sql_tot .= $limit_msg_time_total; + +// +// 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 = ""; + +// +// Dump vars to template +// +$template->assign_vars(array( + "INBOX" => $inbox_url, + "SENTBOX" => $sentbox_url, + "OUTBOX" => $outbox_url, + "SAVEBOX" => $savebox_url, + + "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']), + + "S_HIDDEN_FIELDS" => "", + "S_PRIVMSGS_ACTION" => append_sid("privmsg.$phpEx?folder=$folder"), + "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"), + + "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); @@ -1135,7 +1186,6 @@ $pm_list = $db->sql_fetchrowset($pm_status); // // Okay, let's build the correct folder // - for($i = 0; $i < count($pm_list); $i++) { $privmsg_id = $pm_list[$i]['privmsgs_id'];