MyBB Community Forums

Full Version: buddy list
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
is there a mod so that on some one's profile there is a link to add that person to your buddy list?
NO there is not!.
could someone make one?
nekng Wrote:could someone make one?

Follow this tutorial ( http://mods.mybboard.com/tutorials.php?tid=6 ) but use this code

} 
elseif($mybb->input['action'] == "quickaddbuddy")
{ 
if($mybb->input['uid'] == $mybb->user['uid']) 
{ 
error("You cannot add yourself to your own buddy list.", $mybb->user['username']); 
} 
$query = $db->query("SELECT buddylist FROM ".TABLE_PREFIX."users WHERE uid='".$mybb->user[uid]."'"); 
$list = $db->fetch_array($query); 
if(strpos($list['buddylist'], ",") || strlen($list['buddylist'] > 0)) 
{ 
$newlist = $list['buddylist'].",".$mybb->input['uid'].""; 
} 
else 
{ 
$newlist = $mybb->input['uid']; 
} 
$query = $db->query("UPDATE ".TABLE_PREFIX."users SET buddylist='$newlist' WHERE uid='".$mybb->user[uid]."'"); 
redirect("usercp.php?action=editlists", $lang->redirect_buddyupdated);
But that's for postbit tho...
couldn,t i use that for the profile too, any ways i get
"Parse error: parse error, unexpected T_ELSEIF in /home2/backsta/public_html/forum/usercp.php on line 2035"
when i use the code that LeX- said to use
i still get "Parse error: parse error, unexpected T_ELSEIF in /home2/backsta/public_html/forum/usercp.php on line 2035" , the code on line 2035 is
		$displaycode = "<input type=\"radio\" name=\"displaygroup\" 
add your usercp.php as attachment, i'll take a look at it ... and if you want it in your memberprofile

Open Member Templates -> member_profile

add after $location or where ever you want to have the link

<a href="usercp.php?action=quickaddbuddy&uid=$memprofile[uid]">Add to Buddy List</a>
k, i did that and here is the usercp.php
Try now with this file , http://thingiej.be/usercp.rar
Pages: 1 2