Page Builder -> Account
1)
add a new HTML-block
Caption Lang Key: _New Friend and Message
2)
add a new language key
Key name: _New Friend and Message
Category: System
String text for English language: New Messages and Friends Request
3)
edit table sys_page_compose (the last ID)
Desc: Show new messages and friends request
Caption: _New Friend and Message
Func: PHP
Content: Pfriend();
4)
Add this code to file inc/design.inc.php (above this function: get_member_thumbnail)
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?&communicator_mode=friends_requests"> ' . $alertText . $row . ' Friend Request</a>' . $alertTextE);
elseif($row >= 2):
echo MsgBox('<img src="templates/base/images/icons/action_broadcast.png"><a href="/communicator.php?&communicator_mode=friends_requests"> ' . $alertText . $row . ' Friend Requests</a>' . $alertTextE);
else:
echo '';
endif;
$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"><a href="/mail.php?mode=inbox"> ' . $alertText . $row . ' New Message</a>' . $alertTextE);
elseif($row >= 2):
echo MsgBox('<img src="templates/base/images/icons/mails.png"><a href="/mail.php?mode=inbox"> ' . $alertText . $row . ' New Messages</a>' . $alertTextE);
else:
echo '';
endif;
}
5)
Clear cache
6) DONE