Run into your database:
CREATE TABLE IF NOT EXISTS `blocked` (
`id` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`blockid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `userfriend` (`userid`,`blockid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `friends` (
`id` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`friendid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `userfriend` (`userid`,`friendid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Into mailbox.php, before the line that begin with:
Copy this code:
Into account-details.php, before the line that begin with:
Copy this code:
And after this line:
Copy this code:
Into account.php, after this line:
Copy this code:
And finally, upload in your root the contents of friend.zip archive

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6684"]friends.zip[/url]
CREATE TABLE IF NOT EXISTS `blocked` (
`id` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`blockid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `userfriend` (`userid`,`blockid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `friends` (
`id` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`friendid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `userfriend` (`userid`,`friendid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Into mailbox.php, before the line that begin with:
SQL_Query_exec("INSERT INTO `messages`Copy this code:
//===| Start Blocked Users
$blocked = SQL_Query_exec("SELECT id FROM blocked WHERE userid=$sendto AND blockid=$CURUSER[id]");
$show = mysql_num_rows($blocked);
if ($show != 0 && $CURUSER["control_panel"] != "yes")
show_error_msg("Error", "<div style='margin-top:10px; margin-bottom:10px' align='center'><font size=2 color=#FF2000><b>You're blocked by this member and you can not send messages to him!</b></font></div>", 1);
//===| End Blocked UsersInto account-details.php, before the line that begin with:
<?php echo T_("AGE"); ?>Copy this code:
<!--| Start Friends |-->
<div style="margin-bottom:10px">
<?php
If ($CURUSER["id"] != $user["id"])
{
$r = mysql_query("SELECT id FROM friends WHERE userid=$CURUSER[id] AND friendid=$id");
$friend = mysql_num_rows($r);
$r = mysql_query("SELECT id FROM blocked WHERE userid=$CURUSER[id] AND blockid=$id");
$block = mysql_num_rows($r);
if ($friend)
print("[<a href=friends.php?action=delete&type=friend&targetid=$id>Remove from Friends</a>]n");
elseif($block)
print(" [<a href=friends.php?action=delete&type=block&targetid=$id>Remove from Blocked</a>]n");
else
{
print("[<a href=friends.php?action=add&type=friend&targetid=$id><b>Add to Friends</b></a>] ");
print(" [<a href=friends.php?action=add&type=block&targetid=$id><b>Add to Blocked</b></a>]n");
}
}
?>
</div>
<!--| End Friends |-->And after this line:
show_error_msg(T_("ERROR"), T_("NO_ACCESS_ACCOUNT_DISABLED"), 1);Copy this code:
//===| Start Blocked Users
$blocked = SQL_Query_exec("SELECT id FROM blocked WHERE userid=$user[id] AND blockid=$CURUSER[id]");
$show = mysql_num_rows($blocked);
if ($show != 0 && $CURUSER["control_panel"] != "yes")
show_error_msg("Error", "<div style='margin-top:10px; margin-bottom:10px' align='center'><font size=2 color=#FF2000><b>You're blocked by this member and you can not see his profile!</b></font></div>", 1);
//===| End Blocked UsersInto account.php, after this line:
<?php print("<a href='mailbox.php'><b>".T_("YOUR_MESSAGES")."</b></a>");?>Copy this code:
|
<?php print("<a href='friends.php'><b>Your Friends</b></a>");?>And finally, upload in your root the contents of friend.zip archive

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6684"]friends.zip[/url]
