How to add Tom like MySpace in D7

Hi,

How to add a default profile that automatically becomes a friend of any user that joins the site.

In 6.1, these instructions did the trick - http://www.dialme.com/articles/entry/Tom-Like-Myspace-Mod

Will they work for D7 too???

Thanks

Mick

Quote · 2 Dec 2009

Probably, but you would need to make some modifications to it.

$dump = db_res("INSERT INTO FriendList SET `ID` = '{$iMemID}', `Profile` = 1, `Check` = 1");

This would have to be changed from INSERT INTO FriendList

To this:

INSERT INTO sys_friends_list

Hope I didnt break any rules on this post :)

Chris

Nothing to see here
Quote · 2 Dec 2009

Ya know..... I really hated the fact  that 'Tom' on myspace that was put on my friends list without ever asking me.  I bet a lot of other people did too.  All it's going to do is annoy people.  What if they don't want a total stranger as a friend, being able to look at all the media reserved for their real friends.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 2 Dec 2009

Ya know..... I really hated the fact  that 'Tom' on myspace that was put on my friends list without ever asking me.  I bet a lot of other people did too.  All it's going to do is annoy people.  What if they don't want a total stranger as a friend, being able to look at all the media reserved for their real friends.

Hmm...personally, I hated it too :D

So, I wpuld go live without this feature, lets see...

Thanks a lot Zarcon..I might use it in future :)

Quote · 2 Dec 2009

Here is what I did, a little crude but I just started messing with D7 so I am still not familiar with the code structure...

 

In join.php find around line 93:

list( $iMemID, $sStatus ) = $this -> registerMember();

 

Add directly after:

  

//////MYSPACE TOM LIKE FEATURE
//////FRIENDING ADMIN (1) & HANGMAN (2)
$friendadmin = "INSERT INTO `sys_friend_list` (`ID`,`Profile`,`Check`,`When`) VALUES
('$iMemID', '1', '1', NOW( )),
('$iMemID', '2', '1', NOW( ))";

mysql_query($friendadmin) or die("Query: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
//////END MYSPACE TOM LIKE FEATURE

 

Note:

My admin profile id is 1, you need to set this to who you want to be auto added.  I am also adding a second friend automatically here as well as you can see.  Just keep repeating the insert values for the appropriate profile id for as many people as you want to have auto friended, or trim it down to just the one line for the admin (or whoever).  Also this only works for NEW members, it does not add to existing members.

Quote · 13 Dec 2009

We have had lost of discussions about Tom here.  He is still my only friend on Myspace :-(  Here is a link where you might get other ideas: http://www.boonex.com/unity/forums/?action=goto&topic_id=Default-Friend-Like-TOM-on-Myspace-

Quote · 13 Dec 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.