Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Friends (and blocked users) Mod for 2.08
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2013-04-21 05:44:13
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:
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 Users

Into 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("&nbsp;[<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>]&nbsp;");
       print("&nbsp;[<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 Users

Into account.php, after this line:
<?php print("<a href='mailbox.php'><b>".T_("YOUR_MESSAGES")."</b></a>");?>

Copy this code:
&nbsp;|&nbsp;
       <?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]
friends.jpg
friends.jpg
friends.zip
Download
2013-04-21 13:20:44
Wowww! big thanks you BigMax1 !  :D works very well!  :)

((Always a pleasure to put on my site your tips and fashion!))
Unknown User
2013-04-23 09:34:34
works great mate thanks for the good work
Unknown User
2013-06-26 03:39:15
Thank you BigMax1  
Unknown User
2013-06-26 11:27:25
That's great! Thanks.
Unknown User
2013-09-26 05:34:07

Fatal error: Call to undefined function class_user() in /home/public_html/friends.php on line 90
Unknown User
2013-09-26 06:03:19
hi,

Then you send your error by a lack of function in your function.php then you either follow clickhere and make changes.

[url="https://www.torrenttrader.org/index.php?/topic/17452-class-colors-function-for-208/?hl=user-class-selec-color-in-admincp"]https://www.torrenttrader.org/index.php?/topic/17452-class-colors-function-for-208/?hl=user-class-selec-color-in-admincp[/url]

or you open friends.php you go to line 90 and you change this part of code

".class_user($user[username])."

by

".$user[username]."

Besides, if this code appears several times in the file make the following changes above.
Unknown User
2019-11-23 00:16:28
Cool it works very well, thank you! (y)
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 8
  • Members: 0
  • Guests online: 8
  • Comments: 3
  • Messages: 1,728