Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-18-2009, 12:08 AM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,943
Bloodrun
Send a message via Yahoo to Bloodrun
Default A Enhanced PM System.

Enhanced PM System includes:
  • A more dynamic PM Read layout.
  • A better PM Notification.
  • A 'total pm' feature.

Preview:
(The missing 'have', is fixed within the coding. ;))



Alrighty then, first things first. This modification, does not require any Database entries =D, kinda..

If you have installed my Forum Modification, you don't need mess around with your Database =D
This PM Enhancement, uses the 'postbar' feature from the Forum Modification, if you want details on how to 'install' the postbar feature(meaning the database part) go to this thread:
Forum Modification

Okay, so first go to your functions.php file, and find your sidebar function where it says:

PHP Code:

$msgctr 
"<a href='messages.php'>Visit Message Center</a><br>";

$query "SELECT * FROM ".$prefix."messages WHERE touser='".$loggedinname."' and status='unread'";
$result mysql_query($query);
$num mysql_numrows($result);

if(
$num 0){
$msgctr "<a href='messages.php'>Visit Message Center</a>(<b>".$num."</b>)<br>"
And replace that entire thing with this:

PHP Code:
$msgctr "<a href='messages.php'>Visit Message Center</a>(Unread: 0 | Total: 0)<br>";

$query "SELECT * FROM ".$prefix."messages WHERE touser='".$loggedinname."'";
$result mysql_query($query);
$num2 mysql_numrows($result);

if(
$num2 0){
$msgctr "<a href='messages.php'>Visit Message Center</a>(Unread: 0 | Total: ".$num2.")<br>";
}

$query "SELECT * FROM ".$prefix."messages WHERE touser='".$loggedinname."' and status='unread'";
$result mysql_query($query);
$num mysql_numrows($result);

if(
$num 0){
$msgctr "<a href='messages.php'>Visit Message Center</a>(Unread: <b>".$num."</b> | Total: ".$num2.")<br>"
The newly added query will help us get the 'total amount' of PM's that we have currently. (The total amount is based off of the PM's sent to you, not the PM's you have sent.)

Now, just for the sake of it, I am going to have you add the function that calls that 'postbar', you will be adding it right after your 'sidebar' function.

PHP Code:
function getpostbar($name){

include(
"config.php");

    
$query "SELECT * FROM ".$prefix."users WHERE username = '".$name."'";
    
$result mysql_query($query);
    
$num mysql_numrows($result);

    
$membersince=@mysql_result($result,$i,"membersince");
    
$displayquote=@mysql_result($result,$i,"displayquote");
    
$profilepic=@mysql_result($result,$i,"profilepic");

$postbar "
<span class='smalltext'>
<img src='"
.$profilepic."'><br>
<b>Member Since: </b><br>"
.$membersince."<br>
<b>Quote:</b><br>
"
.$displayquote."<br>
</span>
"
;

return 
$postbar;

Now, you make the 'postbar' contain whatever you want. But I had the 'postbar' act like that of an actual 'postbar' minus the posts. (For now ;) )

Okay, now you will need to add the following code, to any page you want your PM Notification to show up. You will need to paste at the of each page:

PHP Code:
if($isloggedin == "yes") {

$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='450' border='1' cellpadding='3' cellspacing='1' bordercolor='1' bgcolor='#F9AE00'>
<td>
<table width='450' border='1' cellpadding='3' cellspacing='1' bordercolor='1' bgcolor='#FECF61'>
<tr>
<td><center>You a new message(s): <a href='messages.php'>Visit Message Center</a>(<b>"
.$num."</b>)<br></center></td>
</tr>
</table>
</table>"
;
}

$article_content "".$msg."<br>".$article_content."";

The Mysql query in this code, does the samething as the one in your 'sidebar' function, except the output is more.. attention seeking ;)

Now, the last thing(s) you have to do is replace your message.php file and your pmpost.php file, with these new message.php and pmpost.php files.

A little notice, the new message.php file, contains the neccesssary(sp) coding for my Report Member Modification. If you want that part of the code to work, you will need to 'install' my Warning System Modification, found here:
Warning System
If you don't want it, all you have to do, edit the out the link that takes the member to the reporting page.

Another notice, any link inside the new message.php file that goes to the profile, you will have to edit, because as it is currently the link will say profile2.php, You currently don't have (or shouldnt have) a file that says that, because I haven't 'release' my Custom Profile Modification yet.

(The reason I don't do this myself, is because I am trying to get you familiarized with the coding.)

Anywho, on to the pages you need to install:
[attachment=181][attachment=180][attachment=187]
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mys v1.3.3 Personality System Hwona Mys v1.3.x Mods 15 12-18-2016 10:13 PM
System Shop sensacion Questions and Supports 0 05-08-2011 07:40 PM
Enhanced PM Bloodrun Mys v1.1.x Mods 7 02-15-2011 07:04 PM
Abandon system bokkun Mys v1.1.x Mods 30 11-16-2010 11:19 PM
Trade System? SieghartZeke Questions and Supports 1 12-28-2009 08:06 AM


All times are GMT -5. The time now is 06:18 AM.

Currently Active Users: 638 (0 members and 638 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636