PDA

View Full Version : Add friend button


Mellymonster
03-06-2009, 03:29 AM
Is there anyway I can add a "Add me" to the members postbit?

Lynne
03-06-2009, 02:11 PM
It's in the drop-down for their username "Add xxxx to your Contacts" You click on it and then are asked if you want to send a Friend Request also.

Mellymonster
03-07-2009, 12:44 AM
Yes I know, but a member requested a button on the actual post, if there is no such thing, or can't be done, that is fine :)

Lynne
03-07-2009, 02:48 AM
If you change the url from profile.php?do=addlist&userlist=buddy&u=xx to profile.php?do=addlist&userlist=friend&u=9&friend=xx, then the check box that says "Also send a friend request to xx" is already checked, but you still need to confirm the action.

vidan
03-29-2009, 09:32 PM
hello, how about if already being a friend? <if condition="$prepared['myprofile']">
<a class="edit_friends_link" href="profile.php?$session[sessionurl]do=buddylist">$vbphrase[edit_your_friends_list]</a>
<else /><if condition="$prepared['canbefriend']">
<a class="edit_friends_link" href="profile.php?$session[sessionurl]do=addlist&amp;userlist=friend&amp;u=$prepared[userid]"><phrase 1="$prepared[username]">$vbphrase[befriend_x]</phrase></a>
</if></if>
<if condition="$block_data['friendbits']">
<a href="#friends" onclick="return vB_TabCtrls['profile_tabs'].switch_tab('friends');">$vbphrase[show_all_friends]</a>
<else />
&nbsp;
</if>
code in memberinfo, if user is friend, then show all friend, if not a friend, show add as a friend, how to make this thing in postbit? is it need a plugin again?

Lynne
03-29-2009, 11:05 PM
I'm not sure if you'd need a plugin, but I know you will need to replace $prepared with $post if you are going to use it in the postbit template. And, $block_data is also not going to be defined in the postbit. And, those css classes I don't think are defined in a regular vb page either (only on the member.php page).

TNCclubman
03-30-2009, 02:24 AM
love this idea...