Bloodrun
01-25-2011, 07:21 PM
I was asked to redo this so here it is, just replace your old Messages.php with the new.
For the notification, just place the following bit of code on any page you would like PM notification to show up:
Find this on any of the pages you want to notification to go:
$loginstatus = logincheck();
$isloggedin = $loginstatus[loginstatus];
$loggedinname = $loginstatus[username];
// ************************************************** ********************
// End Prepwork - Output the page to the user
// ************************************************** ********************
// This page handles user profiles and shows the site members...
if($isloggedin == "yes") {
And place this right below it.
$query = "SELECT * FROM ".$prefix."messages WHERE touser='".$loggedinname."' and status='unread'";
$result = mysql_query($query);
$num = mysql_numrows($result);
if($num > 0){
$msg = "
<table width='100%' border='1' cellpadding='3' cellspacing='1' bordercolor='1' bgcolor='#F9AE00' class='ftable'>
<td>
<table width='100%' border='1' cellpadding='3' cellspacing='1' bordercolor='1' bgcolor='#FECF61'>
<tr>
<td><center>You have a new message(s): <a href='messages.php'>Visit Message Center</a>(<b>".$num."</b>)<br /></center></td>
</tr>
</table>
</table><br />";
}
$article_content = $article_content."".$msg."<br />";
Here is how it looks:
http://i54.tinypic.com/idvw46.png
http://i54.tinypic.com/153o85k.png
You can change the designs and colors to anything you like.
To my knowledge this is suppose to be going into the next release, so you will notice that the Report function doesn't work, and you will probably notice that Postbar Function doesn't work (unless you have installed my forum modification) BUT, the next release will have these functions.
For the notification, just place the following bit of code on any page you would like PM notification to show up:
Find this on any of the pages you want to notification to go:
$loginstatus = logincheck();
$isloggedin = $loginstatus[loginstatus];
$loggedinname = $loginstatus[username];
// ************************************************** ********************
// End Prepwork - Output the page to the user
// ************************************************** ********************
// This page handles user profiles and shows the site members...
if($isloggedin == "yes") {
And place this right below it.
$query = "SELECT * FROM ".$prefix."messages WHERE touser='".$loggedinname."' and status='unread'";
$result = mysql_query($query);
$num = mysql_numrows($result);
if($num > 0){
$msg = "
<table width='100%' border='1' cellpadding='3' cellspacing='1' bordercolor='1' bgcolor='#F9AE00' class='ftable'>
<td>
<table width='100%' border='1' cellpadding='3' cellspacing='1' bordercolor='1' bgcolor='#FECF61'>
<tr>
<td><center>You have a new message(s): <a href='messages.php'>Visit Message Center</a>(<b>".$num."</b>)<br /></center></td>
</tr>
</table>
</table><br />";
}
$article_content = $article_content."".$msg."<br />";
Here is how it looks:
http://i54.tinypic.com/idvw46.png
http://i54.tinypic.com/153o85k.png
You can change the designs and colors to anything you like.
To my knowledge this is suppose to be going into the next release, so you will notice that the Report function doesn't work, and you will probably notice that Postbar Function doesn't work (unless you have installed my forum modification) BUT, the next release will have these functions.