Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=87)
-   -   Friends (and blocked users) Mod for 2.08 (http://www.bvlist.com/showthread.php?t=9570)

soulblazer 9th October 2013 20:24

Friends (and blocked users) Mod for 2.08
 
1 Attachment(s)
all credit for this mod goes to BigMax1... Im simply sharing it here...

Run into your database:
PHP Code:

CREATE TABLE IF NOT EXISTS `blocked` (   `idint(10unsigned NOT NULL auto_increment,   
`
useridint(10unsigned NOT NULL default '0',   
`
blockidint(10unsigned NOT NULL default '0',   
PRIMARY KEY  (`id`),   
UNIQUE KEY `userfriend` (`userid`,`blockid`)
 ) 
ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=;  

CREATE TABLE IF NOT EXISTS `friends` (   
`
idint(10unsigned NOT NULL auto_increment,   
`
useridint(10unsigned NOT NULL default '0',   
`
friendidint(10unsigned NOT NULL default '0',   
PRIMARY KEY  (`id`),   
UNIQUE KEY `userfriend` (`userid`,`friendid`) 
ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=

Into mailbox.php, before the line that begin with:

Code:

SQL_Query_exec("INSERT INTO `messages`
Copy this code:
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", "
You're blocked by this member and you can not send messages to him!
", 1); //===| End Blocked Users

Into account-details.php, before the line that begin with:
Code:


Copy this code:
Code:

Remove from Friends]\n");    elseif($block)        print(" [Remove from Blocked]\n");    else    {        print("[Add to Friends] ");        print(" [Add to Blocked]\n");    } } ?>

And after this line:
Code:

show_error_msg(T_("ERROR"), T_("NO_ACCESS_ACCOUNT_DISABLED"), 1);
Copy this code:
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", "
You're blocked by this member and you can not see his profile!
", 1); //===| End Blocked Users

Into account.php, after this line:
Code:

".T_("YOUR_MESSAGES")."");?>
Copy this code:
Code:

 |         Your Friends");?>
And finally, upload in your root the contents of friend.zip archive.

anaxu 1st November 2016 21:31

amazing thnx


All times are GMT +2. The time now is 06:53.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.