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
[Addon] Friends system
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2007-11-25 08:41:06
Posting in "in progress" because I hope others can bring improvements to this.

Original post is [url="http://www.torrenttrader.org/index.php?showtopic=4592"]here[/url].

SQL:

CREATE TABLE `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`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
In header.php, add this wherever you like... this is totally optional and you can skip it if you don't want a link in your header.


<a href=friend.php>Friends</a>





Now open up account-details.php and find:



			   <a href=report.php?user=<?=$user["id"]?>>Report Member</a><BR>



Below, add:



			   <a href=friends.php?user=<?=$user["id"]?>>Add to my Friends</a>




Upload all 3 files to your server, and enjoy!

I'll update the account-details code later so it checks if the user is in the friend list, and if it is add a delete friend link instead...

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

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=1783"]friend.php[/url]

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=1784"]takedelfriend.php[/url]
friends.php
Download
friend.php
Download
takedelfriend.php
Download
Unknown User
2007-11-26 18:29:40
well, not much to add to acctualy:D.. works like a charm.

got to little points to be exact, and its not to add something to your script, but it might be a simple mistake.

When i uploaded the mysql database, i got a error, ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 doesnt work for me, so for anybody who got the same error, try this:

CREATE TABLE `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`)

);
secondly, strange line 38 in friends.php:S.. i dont have a clue what it does, and it shows a error when you add a friend, so i deleted it and the script rolls out great xD.. so:



Delete (line 38) Friends.php:


hit_end();





if you got the same error:



Fatal error: Call to undefined function hit_end() in /mounted-storage/home61b/sub003/sc38543-GMYU/www/torrent/friends.php on line 38



btw, i added the online and offline buttons. If you dont upgrade from ver 1.X, but install from ver 2.X, it will not be in the images folder.



button_offline.gif
button_offline.gif
button_online.gif
button_online.gif
Unknown User
2007-11-26 19:06:00
Edit: As TS said, just remove the line hit_end();
Unknown User
2007-11-26 19:07:27
just remove the hit_* lines, the functions have never done anything.
Unknown User
2007-11-27 19:59:14
*edit* nevermind, got it working.
Unknown User
2007-11-27 20:45:17
We able to have a block list like in Tbdev friend system? that would make this a full blown friends list I think since you can also block the annoying ones lol
Unknown User
2007-11-27 20:46:45
I'll check it out
Unknown User
2007-11-28 20:19:36
Thanks Ezerbeth your the best :)
Unknown User
2007-11-30 19:46:44
Thanks :)
Unknown User
2007-12-11 20:42:05
any update on this thanks
Unknown User
2007-12-12 21:50:38
What should be blocked when you add someone to the blocklist? PM only? Comments/forum posts too? Access to the user's detail page?
Unknown User
2008-01-19 18:27:00
blocks the sender from sending that user a pm think of a spam block list for the user kinda deal but just a way to block them from pm's, although that would be really cool if it would be possible that you can block members downloading the uploaders torrents if on there block list that would rock thanks ezerbeth
Unknown User
2008-01-25 16:55:23
<a href=friends.php?user=<?=$user["id"]?>>Add to my Friends</a>

dont work for me in tt v.2.2 i  got this mesage when i add a friend....

Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/scratchy/public_html/account-details.php on line 154

in line 154 is :

echo "<B>This member has elected to keep their details private</B><br><br><a href=#>Report Member</a><br><br><a href=friends.php?user=<?=$user["id"]?>>Add to my Friends</a<BR>";
Unknown User
2008-12-10 01:28:02
that's work but i don't see my friends, don't have block for this? sorry my bad english
Unknown User
2008-12-11 01:16:48
Quote:
that's work but i don't see my friends, don't have block for this? sorry my bad english

You have to put a link somewhrere to friend.php, like in blocks/login_block.php

you put where you want to display the link:

print("<a href=friend.php>My Friends</a>");
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728