Thread: Small Add-On
View Single Post
  #1  
Old 01-18-2011, 03:53 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 28,623
Bloodrun
Send a message via Yahoo to Bloodrun
Default Small Add-On

Okay, so while I wait for a list of what was changed from the old script, here is two additions that were not added on the new update.

They are both easy fixes are go in the sidebar function in your functions.php file.

So you will need to open up your functions.php file and locate your

function getsidebar(){

Right below where it says:

if($isloggedin == "yes") {

Put this:

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>";

}







$group = getgroup();

$cancp = cancp($group);



if($cancp == "yes"){

$admin = "<a href='admin.php'><b>ACP</b></a><br>";
And then below that, locate where it says:

$sidebar = "

And where ever you want your Private Message notification to show place this:
".$msgctr."

And where ever you want your admins to see the link to the Admin Control Panel, place this:
".$admin."

And where ever you want a Member List to show up, place this:
<a href='profile.php?'>Member List</a><br>

This is what it will look like:


Just ignore the 'Visit Reports' thats for something in the future.
__________________
Have any questions?
Feel Free to PM Me! =D
What you could get with a Premium Member account.
The Forum has been released!
Reply With Quote