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

Reply
 
Thread Tools Display Modes
  #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,776
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
  #2  
Old 05-18-2009, 03:07 PM
SJC SJC is offline
Member
 
Join Date: Apr 2009
Posts: 118
Credits: 10,110
SJC
Default RE: A Enhanced PM System.

Nice, I like how you made it like a forum topic (the design/ layout when viewing a PM).
Reply With Quote
  #3  
Old 05-18-2009, 03:27 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,776
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: A Enhanced PM System.

Quote:
Originally Posted by SJC
Nice, I like how you made it like a forum topic (the design/ layout when viewing a PM).
Lol, thats what I made it for ;)
Reply With Quote
  #4  
Old 05-18-2009, 05:19 PM
SJC SJC is offline
Member
 
Join Date: Apr 2009
Posts: 118
Credits: 10,110
SJC
Default RE: A Enhanced PM System.

For messages.php, it shows the content of the index.php page.
Reply With Quote
  #5  
Old 05-19-2009, 01:20 AM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,776
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: A Enhanced PM System.

Quote:
Originally Posted by SJC
For messages.php, it shows the content of the index.php page.
Then you have to do two things.

One, find where it says:

PHP Code:
$pagecontent getsitecontent("index");
$article_title $pagecontent[title];
$article_content $pagecontent[content]; 
and take out the:

PHP Code:
$pagecontent getsitecontent("index"); 
And number two, find your error in your script. Lol =/

If you paste it here, I can take a look at it for you.
Reply With Quote
  #6  
Old 05-19-2009, 01:25 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,776
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: A Enhanced PM System.

Oops, my apologies, the messages.php file that was originally there to download, wasn't the messages.php file at all. The correct file is there now. So everything should now work.
Reply With Quote
  #7  
Old 05-19-2009, 03:51 PM
SJC SJC is offline
Member
 
Join Date: Apr 2009
Posts: 118
Credits: 10,110
SJC
Default RE: A Enhanced PM System.

I'm getting this message:
PHP Code:
Fatal errorCall to undefined function getpostbar() in /home/a7685593/public_html/messages.php on line 194 
Reply With Quote
  #8  
Old 05-19-2009, 10:22 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,776
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: A Enhanced PM System.

Quote:
Originally Posted by SJC
I'm getting this message:
PHP Code:
Fatal errorCall to undefined function getpostbar() in /home/a7685593/public_html/messages.php on line 194 
Did you put the postbar function into your functions file?
If not, either put it in, or get rid of that part in your messages.php (though, thats the whole reason I made this).
Reply With Quote
  #9  
Old 05-19-2009, 10:28 PM
SJC SJC is offline
Member
 
Join Date: Apr 2009
Posts: 118
Credits: 10,110
SJC
Default RE: A Enhanced PM System.

Now I'm getting this:
Parse error: syntax error, unexpected T_ELSE in /home/a7685593/public_html/inc/functions.php on line 268
Do you want me to PM or post my funstions.php page?
Reply With Quote
  #10  
Old 05-19-2009, 10:29 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,776
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: A Enhanced PM System.

Quote:
Originally Posted by SJC
Now I'm getting this:
Parse error: syntax error, unexpected T_ELSE in /home/a7685593/public_html/inc/functions.php on line 268
Do you want me to PM or post my funstions.php page?
Post it, unless there are things you dont want people to see in it.
Reply With Quote
Reply


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 11:34 AM.

Currently Active Users: 700 (0 members and 700 guests)
Threads: 4,081, Posts: 32,031, 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