diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-07-22 19:53:08 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-07-22 19:53:08 +0000 |
| commit | 287feac024fbe6e19f1580ef5429614f36da0a88 (patch) | |
| tree | 67364a5560f6fdbe369a6b7a886a8b0aae392d10 | |
| parent | 7d83ba703c66ae93106042d6b294e8e4cd364f25 (diff) | |
| download | forums-287feac024fbe6e19f1580ef5429614f36da0a88.tar forums-287feac024fbe6e19f1580ef5429614f36da0a88.tar.gz forums-287feac024fbe6e19f1580ef5429614f36da0a88.tar.bz2 forums-287feac024fbe6e19f1580ef5429614f36da0a88.tar.xz forums-287feac024fbe6e19f1580ef5429614f36da0a88.zip | |
Yet another faked if loop
git-svn-id: file:///svn/phpbb/trunk@727 89ea8834-ac86-4346-8a33-228a782c2dd0
| -rwxr-xr-x | phpBB/language/lang_english.php | 31 | ||||
| -rw-r--r-- | phpBB/privmsg.php | 66 | ||||
| -rw-r--r-- | phpBB/templates/PSO/privmsgs_body.tpl | 5 |
3 files changed, 59 insertions, 43 deletions
diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php index 66b3307cf0..c5b5587a2b 100755 --- a/phpBB/language/lang_english.php +++ b/phpBB/language/lang_english.php @@ -167,9 +167,14 @@ $lang['No_Posts'] = "No Posts"; $lang['Forum_Index'] = "Forum Index"; $lang['No_forums'] = "This board has no forums"; +$lang['Private_Messages'] = "Private Messages"; +$lang['Who_is_Online'] = "Who is Online"; + // // Viewforum // +$lang['View_forum'] = "View Forum"; + $lang['Forum_not_exist'] = "The forum you selected does not exist, please go back and try again"; $lang['Reached_on_error'] = "You have reached this page in error, please go back and try again"; @@ -181,6 +186,7 @@ $lang['Sticky'] = "<b>Sticky:</b>"; // Viewtopic // $lang['View_topic'] = "View topic"; + $lang['Guest'] = 'Guest'; $lang['Post_subject'] = "Post subject"; $lang['View_next_topic'] = "View next topic"; @@ -265,6 +271,8 @@ $lang['to_return_topic'] = "to return to the topic"; // // Private Messaging // +$lang['Private_Messaging'] = "Private Messaging"; + $lang['You_have'] = "You have"; // followed by "x new message/s" $lang['new'] = "new"; // see above $lang['message'] = "message"; // see above @@ -285,6 +293,8 @@ $lang['Mark'] = "Mark"; $lang['Display_messages'] = "Display messages from previous"; // Followed by number of days/weeks/months $lang['All_Messages'] = "All Messages"; +$lang['No_messages_folder'] = "You have no messages in this folder"; + $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"; @@ -463,6 +473,7 @@ $lang['Non_member_groups'] = "Non-member groups"; $lang['Memberships_pending'] = "Memberships pending"; $lang['Join_group'] = "Join Group"; +$lang['No_group_members'] = "This group has no members"; $lang['This_open_group'] = "This is an open group, click to request membership"; $lang['This_closed_group'] = "This is a closed group, no more users accepted"; @@ -613,24 +624,12 @@ $lang[11] = "GMT + 11" . " " . $lang['Hours']; $lang[12] = "GMT + 12" . " " . $lang['Hours']; // +// End +// ------------------------------------------------- + +// ------------------------------------------------- // Old format ... _DON'T_add_any_ new entries here!! // -// Index page -// Members and profile -// Viewforum -// Private forums -// Viewtopic -// Functions -// Page_header -$l_statsblock = '$statsblock = "Our users have posted a total of -$total_posts- $l_messages.<br> -We have -$total_users- Registered Users.<br> -The newest Registered User is -<a href=\"$profile_url\">$newest_user</a>-.<br> --$users_online- ". ($users_online==1?"user is":"users are") ." <a href=\"$online_url\">currently browsing</a> the forums.<br>";'; -$l_privnotify = '$privnotify = "<br>You have $new_message <a href=\"$privmsg_url\">new private ".($new_message>1?"messages":"message")."</a>.";'; - -// Page_tail -// Auth - // Register $l_mailingaddress = " diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php index 45e388cca2..b1ce1074e4 100644 --- a/phpBB/privmsg.php +++ b/phpBB/privmsg.php @@ -1209,50 +1209,62 @@ 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 // -for($i = 0; $i < count($pm_list); $i++) +if($pm_count) { - $privmsg_id = $pm_list[$i]['privmsgs_id']; + 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) ? "<img src=\"images/msg_read.gif\">" : "<img src=\"images/msg_unread.gif\">"; + $flag = $pm_list[$i]['privmsgs_type']; + $icon_flag = ($flag == PRIVMSGS_READ_MAIL || $flag == PRIVMSGS_SAVED_MAIL || $flag == PRIVMSGS_SENT_MAIL) ? "<img src=\"images/msg_read.gif\">" : "<img src=\"images/msg_unread.gif\">"; - $msg_userid = $pm_list[$i]['user_id']; - $msg_username = stripslashes($pm_list[$i]['username']); + $msg_userid = $pm_list[$i]['user_id']; + $msg_username = stripslashes($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 = stripslashes($pm_list[$i]['privmsgs_subject']); + $u_subject = append_sid("privmsg.$phpEx?folder=$folder&mode=read&" . POST_POST_URL . "=$privmsg_id"); - $msg_date = create_date($board_config['default_dateformat'], $pm_list[$i]['privmsgs_date'], $board_config['default_timezone']); + $msg_date = create_date($board_config['default_dateformat'], $pm_list[$i]['privmsgs_date'], $board_config['default_timezone']); - if($flag == PRIVMSGS_NEW_MAIL && $folder == "inbox") - { - $msg_subject = "<b>" . $msg_subject . "</b>"; - $msg_date = "<b>" . $msg_date . "</b>"; - $msg_username = "<b>" . $msg_username . "</b>"; - } + if($flag == PRIVMSGS_NEW_MAIL && $folder == "inbox") + { + $msg_subject = "<b>" . $msg_subject . "</b>"; + $msg_date = "<b>" . $msg_date . "</b>"; + $msg_username = "<b>" . $msg_username . "</b>"; + } - $row_color = (!($i % 2)) ? "#".$theme['td_color1'] : "#".$theme['td_color2']; + $row_color = (!($i % 2)) ? "#".$theme['td_color1'] : "#".$theme['td_color2']; - $template->assign_block_vars("listrow", array( - "ICON_FLAG_IMG" => $icon_flag, - "FROM" => $msg_username, - "SUBJECT" => $msg_subject, - "DATE" => $msg_date, - "ROW_COLOR" => $row_color, + $template->assign_block_vars("listrow", array( + "ICON_FLAG_IMG" => $icon_flag, + "FROM" => $msg_username, + "SUBJECT" => $msg_subject, + "DATE" => $msg_date, + "ROW_COLOR" => $row_color, - "S_DEL_CHECKBOX" => "<input type=\"checkbox\" name=\"mark[]\" value=\"$privmsg_id\">", + "S_DEL_CHECKBOX" => "<input type=\"checkbox\" name=\"mark[]\" value=\"$privmsg_id\">", - "U_READ" => $u_subject, - "U_FROM_USER_PROFILE" => $u_from_user_profile) + "U_READ" => $u_subject, + "U_FROM_USER_PROFILE" => $u_from_user_profile) + ); + } // for ... +} +else +{ + $template->assign_vars(array( + "L_NO_MESSAGES" => $lang['No_messages_folder']) ); -} // for ... + + $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), diff --git a/phpBB/templates/PSO/privmsgs_body.tpl b/phpBB/templates/PSO/privmsgs_body.tpl index 5f6cb9f797..fb84d9c41e 100644 --- a/phpBB/templates/PSO/privmsgs_body.tpl +++ b/phpBB/templates/PSO/privmsgs_body.tpl @@ -32,6 +32,11 @@ <td width="5%" align="center" valign="middle">{listrow.S_DEL_CHECKBOX}</td> </tr> <!-- END listrow --> + <!-- BEGIN nomessages --> + <tr> + <td class="row1" colspan="5" align="center" valign="middle"><span class="gen">{L_NO_MESSAGES}</span></td> + </tr> + <!-- END nomessages --> <tr> <td class="cat" colspan="5"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> |
