mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 23:25:30 +02:00
PM popup and icon are finally in place
git-svn-id: file:///svn/phpbb/trunk@1405 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
db41a689f8
commit
cad29155b8
@ -173,10 +173,12 @@ if( $userdata['session_logged_in'] )
|
||||
}
|
||||
|
||||
$s_privmsg_new = true;
|
||||
$icon_pm = $images['pm_new_msg'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$s_privmsg_new = 0;
|
||||
$icon_pm = $images['pm_no_new_msg'];
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -184,6 +186,7 @@ if( $userdata['session_logged_in'] )
|
||||
$l_privmsgs_text = $lang['No_new_pm'];
|
||||
|
||||
$s_privmsg_new = 0;
|
||||
$icon_pm = $images['pm_no_new_msg'];
|
||||
}
|
||||
|
||||
if( $userdata['user_unread_privmsg'] )
|
||||
@ -219,6 +222,21 @@ $template->assign_vars(array(
|
||||
"PRIVATE_MESSAGE_NEW_FLAG" => $s_privmsg_new,
|
||||
"LAST_VISIT_DATE" => sprintf($lang['You_last_visit'], $s_last_visit),
|
||||
|
||||
"PRIVMSG_IMG" => $icon_pm,
|
||||
"FORUM_IMG" => $images['forum'],
|
||||
"FORUM_NEW_IMG" => $images['forum_new'],
|
||||
"FORUM_LOCKED_IMG" => $images['forum_locked'],
|
||||
"FOLDER_IMG" => $images['folder'],
|
||||
"FOLDER_NEW_IMG" => $images['folder_new'],
|
||||
"FOLDER_HOT_IMG" => $images['folder_hot'],
|
||||
"FOLDER_HOT_NEW_IMG" => $images['folder_hot_new'],
|
||||
"FOLDER_LOCKED_IMG" => $images['folder_locked'],
|
||||
"FOLDER_LOCKED_NEW_IMG" => $images['folder_locked_new'],
|
||||
"FOLDER_STICKY_IMG" => $images['folder_sticky'],
|
||||
"FOLDER_STICKY_NEW_IMG" => $images['folder_sticky_new'],
|
||||
"FOLDER_ANNOUNCE_IMG" => $images['folder_announce'],
|
||||
"FOLDER_ANNOUNCE_NEW_IMG" => $images['folder_announce_new'],
|
||||
|
||||
"L_USERNAME" => $lang['Username'],
|
||||
"L_PASSWORD" => $lang['Password'],
|
||||
"L_LOGIN" => $lang['Login'],
|
||||
@ -260,7 +278,8 @@ $template->assign_vars(array(
|
||||
"U_INDEX" => append_sid("index.".$phpEx),
|
||||
"U_REGISTER" => append_sid("profile.".$phpEx."?mode=register"),
|
||||
"U_PROFILE" => append_sid("profile.".$phpEx."?mode=editprofile"),
|
||||
"U_PRIVATEMSGS" => append_sid("privmsg.".$phpEx."?folder=inbox"),
|
||||
"U_PRIVATEMSGS" => append_sid("privmsg.".$phpEx."?folder=inbox"),
|
||||
"U_PRIVATEMSGS_POPUP" => append_sid("privmsg.".$phpEx."?mode=newpm"),
|
||||
"U_SEARCH" => append_sid("search.".$phpEx),
|
||||
"U_MEMBERLIST" => append_sid("memberlist.".$phpEx),
|
||||
"U_MODCP" => append_sid("modcp.".$phpEx),
|
||||
|
@ -363,6 +363,9 @@ $lang['No_new_pm'] = "You have no new messages";
|
||||
$lang['Unread_pms'] = "You have %d unread messages";
|
||||
$lang['Unread_pm'] = "You have %d unread message";
|
||||
$lang['No_unread_pm'] = "You have no unread messages";
|
||||
$lang['You_new_pm'] = "A new private message is waiting for you in your Inbox";
|
||||
$lang['You_new_pms'] = "New private messages are waiting for you in your Inbox";
|
||||
$lang['You_no_new_pm'] = "No new private messages are waiting for you";
|
||||
|
||||
$lang['Inbox'] = "Inbox";
|
||||
$lang['Outbox'] = "Outbox";
|
||||
@ -420,6 +423,7 @@ $lang['Inbox_size'] = "Your Inbox is %d%% full"; // eg. Your Inbox is 50% full
|
||||
$lang['Sentbox_size'] = "Your Sentbox is %d%% full";
|
||||
$lang['Savebox_size'] = "Your Savebox is %d%% full";
|
||||
|
||||
$lang['Click_view_privmsg'] = "Click %sHere%s to visit your Inbox";
|
||||
|
||||
//
|
||||
// Profiles/Registration
|
||||
|
@ -118,7 +118,46 @@ $savebox_url = ($folder != "savebox" || $mode != "") ? '<a href="' . append_sid(
|
||||
// ----------
|
||||
// Start main
|
||||
//
|
||||
if( $mode == "read" )
|
||||
if( $mode == "newpm" )
|
||||
{
|
||||
$gen_simple_header = TRUE;
|
||||
|
||||
$page_title = $lang['Private_Messaging'];
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
||||
$template->set_filenames(array(
|
||||
"body" => "privmsgs_popup.tpl")
|
||||
);
|
||||
|
||||
if( $userdata['session_logged_in'] )
|
||||
{
|
||||
if( $userdata['user_new_privmsg'] )
|
||||
{
|
||||
$l_new_message = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['You_new_pm'] : $lang['You_new_pms'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_new_message = $lang['You_no_new_pm'];
|
||||
}
|
||||
|
||||
$l_new_message .= "<br /><br />" . sprintf($lang['Click_view_privmsg'], "<a href=\"" . append_sid("privmsg.".$phpEx."?folder=inbox") . "\" onClick=\"jump_to_inbox();return false;\" target=\"_new\">", "</a>");
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_new_message = $lang['Login_check_pm'];
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
"L_CLOSE_WINDOW" => $lang['Close_window'],
|
||||
"L_MESSAGE" => $l_new_message)
|
||||
);
|
||||
|
||||
$template->pparse("body");
|
||||
|
||||
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
|
||||
|
||||
}
|
||||
else if( $mode == "read" )
|
||||
{
|
||||
if( !empty($HTTP_GET_VARS[POST_POST_URL]) )
|
||||
{
|
||||
@ -931,7 +970,7 @@ else if( $submit || $refresh || $mode != "" )
|
||||
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);
|
||||
message_die(GENERAL_MESSAGE, $lang['No_such_user']);
|
||||
}
|
||||
|
||||
$sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : "";
|
||||
|
@ -4,7 +4,7 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<meta http-equiv="Content-Type" content="text/html" />
|
||||
<meta http-equiv="Content-Style-Type" content="text/css" />
|
||||
{META}
|
||||
<title>{SITENAME} :: {PAGE_TITLE}</title>
|
||||
@ -201,6 +201,18 @@ a.copyright { color: #333333; text-decoration: none;}
|
||||
a.copyright:hover { color: #000000; text-decoration: underline;}
|
||||
-->
|
||||
</style>
|
||||
<!-- BEGIN switch_enable_pm_popup -->
|
||||
<script language="Javascript" type="text/javascript">
|
||||
<!--
|
||||
var new_pm_flag = {PRIVATE_MESSAGE_NEW_FLAG};
|
||||
|
||||
if( new_pm_flag )
|
||||
{
|
||||
window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=200,resizable=yes,WIDTH=400');;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<!-- END switch_enable_pm_popup -->
|
||||
</head>
|
||||
|
||||
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
|
||||
|
22
phpBB/templates/subSilver/privmsgs_popup.tpl
Normal file
22
phpBB/templates/subSilver/privmsgs_popup.tpl
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
function jump_to_inbox()
|
||||
{
|
||||
opener.document.location.href = "{U_PRIVATEMSGS}";
|
||||
window.close();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="4" class="forumline">
|
||||
<tr>
|
||||
<td valign="top" class="row1" align="center"><br /><span class="gen">{L_MESSAGE}</span><br /><br /><span class="genmed"><a href="javascript:window.close();" class="genmed">{L_CLOSE_WINDOW}</a></span><br /><br /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
@ -71,6 +71,8 @@ $images['pm_replymsg'] = "templates/subSilver/images/reply.gif";
|
||||
$images['pm_postmsg'] = "templates/subSilver/images/msg_newpost.gif";
|
||||
$images['pm_quotemsg'] = "templates/subSilver/images/icon_quote.gif";
|
||||
$images['pm_editmsg'] = "templates/subSilver/images/icon_edit.gif";
|
||||
$images['pm_new_msg'] = "";
|
||||
$images['pm_no_new_msg'] = "";
|
||||
|
||||
$images['topic_watch'] = "";
|
||||
$images['topic_un_watch'] = "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user