add new friends request

I saw on the code sharing section, that someone made a new mail request....you created a new page and it pops up when you have a new mail....can anyone modify this to make the same thing happen to new friend requst?  here is the script.  thanks

function Pmessages(){

$User = getNickName($ID);
$SQLselect = mysql_query("SELECT Profiles.ID, Profiles.Headline, Profiles.NickName, sys_messages.New, sys_messages.Recipient
FROM Profiles
INNER JOIN sys_messages
ON Profiles.ID = sys_messages.Recipient
WHERE Profiles.NickName = '$User'
AND sys_messages.New = '1' ORDER BY sys_messages.New");


$alertText = '<span style="color:maroon;font-size:20px;text-shadow:1px 1px 3px #000;">';
$alertTextE = '</span>';

$row = mysql_num_rows($SQLselect);

if($row == 1):

echo MsgBox('<img src="templates/base/images/icons/mails.png"> ' . $alertText . $row . ' New Message' . $alertTextE);


elseif($row >= 2):

echo MsgBox('<img src="templates/base/images/icons/mails.png"> ' . $alertText . $row . ' New Messages' . $alertTextE);

else:

echo '';

endif;

}
//Ends uread messages

 

Quote · 10 Nov 2010

You can try this code, inside your inc/design.inc.php file, paste this function anywhere, aslong as it's not inside another function.
( remember also to add a PHP Block where the Caption = New Friend Request and Content = Pfriend(); )

 

function Pfriend(){
global $site;
global $oTemplConfig;

$User = getNickName($ID);
$SQLselect = mysql_query("SELECT Profiles.ID, Profiles.NickName, sys_friend_list.Profile
FROM Profiles
INNER JOIN sys_friend_list
ON Profiles.ID = sys_friend_list.Profile
WHERE Profiles.NickName = '$User'
AND sys_friend_list.Check = '0'");


$alertText = '<span style="color:maroon;font-size:20px;text-shadow:1px 1px 3px #000;">';
$alertTextE = '</span>';

$row = mysql_num_rows($SQLselect);
if($row == 1):
echo MsgBox('<img src="templates/base/images/icons/action_broadcast.png"><a href="/communicator.php"> ' . $alertText . $row . ' Friend Request</a>' . $alertTextE);
elseif($row >= 2):
echo MsgBox('<img src="templates/base/images/icons/action_broadcast.png"><a href="/communicator.php"> ' . $alertText . $row . ' Friend Request</a>' . $alertTextE);
else:
echo '';
endif;
}

Quote · 11 Nov 2010

perfect....works excellent..no people can use these two mods for free

Quote · 12 Nov 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.