vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Add friend button (https://vborg.vbsupport.ru/showthread.php?t=207491)

Mellymonster 03-06-2009 03:29 AM

Add friend button
 
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?
PHP Code:

<if condition="$prepared['myprofile']">
        <
class="edit_friends_link" href="profile.php?$session[sessionurl]do=buddylist">$vbphrase[edit_your_friends_list]</a>
    <else /><if 
condition="$prepared['canbefriend']">
        <
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...


All times are GMT. The time now is 08:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01114 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete