########################################################
## Mod Title: Add PM Support To Your Entire Site
## Mod Version: 1.0.1
## Author: AJ Quick, (http://www.ajquick.com/)
##
## Description:
## This mod will add the ability to get private messages
## pop-ups when viewing your main site, if you have the
## hack that allows viewers to be logged in your site,
## other than just your forums.
##
## It was designed for PHPBB 2.0+
##
## Installation Level: Complex!
## Installation Time: As long as it takes.
##
## Notes..
## You must have some form of the login through base address
## hack installed. See example:
##
########################################################
#
#-----[ You Must Have Something Like This: ]------------------------------------------
#
#
#-----[ //end of example ]------------------------------------------
#
#
#-----[ Add This Above Your Head Tags: ]------------------------------------------
#
$userdata['user_lastvisit'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_last_privmsg = " . $userdata['user_lastvisit'] . "
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql);
}
$s_privmsg_new = 1;
$icon_pm = $images['pm_new_msg'];
}
else
{
$s_privmsg_new = 0;
$icon_pm = $images['pm_no_new_msg'];
}
}
else
{
$l_privmsgs_text = $lang['No_new_pm'];
$s_privmsg_new = 0;
$icon_pm = $images['pm_no_new_msg'];
}
if ( $userdata['user_unread_privmsg'] )
{
$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);
}
else
{
$l_privmsgs_text_unread = $lang['No_unread_pm'];
}
?>
#
#-----[ Add This In Your Head Tags: ]------------------------------------------
#
#
#-----[ If you want PM statuses add this somewhere: ]------------------------------------------
#
//change the path to the file
# That's It!
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM