PDA

View Full Version : Enhanced PM


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.

Kaeliah
01-25-2011, 08:23 PM
Ooh, very nice Bloodrun. :) I like the presentation of the message and notification too.

Bloodrun
01-25-2011, 08:25 PM
Thanks, its just a couple table edits Lol =P

Hall of Famer
01-25-2011, 09:31 PM
So this is the new version of PM enhancement system compatible with Mys v1.1.x series? Thank you for doing this Bloodrun, this is surely helpful.

Bloodrun
01-25-2011, 09:35 PM
I don't see why it wouldnt be compatible, its on my test site which is the current version of the script.

Hall of Famer
01-25-2011, 09:38 PM
I see. Oh btw what's with the 'report this member' button? Is it one of your other mods?

Bloodrun
01-25-2011, 09:40 PM
I see. Oh btw what's with the 'report this member' button? Is it one of your other mods?

I had to make a Report a post/member feature for the Forum, so I figured why not add one for nasty PMs?

Hall of Famer
02-15-2011, 06:04 PM
Well it seems that you defined a new function but somehow forgot to attach a function.php file:

Fatal error: Call to undefined function getpostbar() in

I personally have no idea what getpostbar() does, would you please explain a little bit?