vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Add Friend Button (https://vborg.vbsupport.ru/showthread.php?t=257470)

wh1t3dr3am 01-20-2011 01:05 PM

Add Friend Button
 
How to make add friend button in red mark ?but if already has been friend it will not show button.
Any advice for this ? Thx :D

http://img213.imageshack.us/img213/6562/testhr.jpg

wh1t3dr3am 01-23-2011 01:33 PM

go up :D

MichelangeloITA 01-23-2011 02:21 PM

Yes, that's cool dude, I need this too :)

It should be default :D

wh1t3dr3am 01-24-2011 02:09 PM

Thx :D

I hope someone can tell me how to make add friend button :)

Yellow Slider 01-24-2011 04:15 PM

Create a new plugin using the hook location postbit_display_complete.

PHP Code:

$postuserinfo fetch_userinfo($post['userid'], 128);
$isfriend $postuserinfo['isfriend'];
if (!
$isfriend)
{
    
$template_hook['postbit_userinfo_right'] .= '<a href="profile.php? ' $vbulletin->session->vars['sessionurl'] . 'do=addlist&amp;userlist=friend&amp;u=' $post['userid'] . '">' construct_phrase($vbphrase['befriend_x'], $post['username']) . '</a>';



MichelangeloITA 01-25-2011 03:42 PM

Quote:

Originally Posted by Yellow Slider (Post 2153885)
Create a new plugin using the hook location postbit_display_complete.

PHP Code:

$postuserinfo fetch_userinfo($post['userid'], 128);
$isfriend $postuserinfo['isfriend'];
if (!
$isfriend)
{
    
$template_hook['postbit_userinfo_right'] .= '<a href="profile.php? ' $vbulletin->session->vars['sessionurl'] . 'do=addlist&amp;userlist=friend&amp;u=' $post['userid'] . '">' construct_phrase($vbphrase['befriend_x'], $post['username']) . '</a>';



Not working ob vB4.1.1 :(

My settings here

http://img148.imageshack.us/img148/1821/immaginevq.png

Lynne 01-25-2011 04:49 PM

The original works fine for me (yours won't work since you have <ahref instead of <a href). Needs a bit of styling (CSS) but it shows up when it should. It's just text right now, not a button.

wh1t3dr3am 01-25-2011 04:54 PM

Thank You Very Very Much Yellow Slider :D
Working on VB PL 4.1.0 Patch lvl 2 :)

But can you give me some advice for how to change text "befriend" to image ? :D

Yellow Slider 01-25-2011 09:17 PM

Quote:

Originally Posted by wh1t3dr3am (Post 2154431)
Thank You Very Very Much Yellow Slider :D
Working on VB PL 4.1.0 Patch lvl 2 :)

But can you give me some advice for how to change text "befriend" to image ? :D

Sure.
PHP Code:

$postuserinfo fetch_userinfo($post['userid'], 128);
$isfriend $postuserinfo['isfriend'];
if (!
$isfriend)
{
    
$template_hook['postbit_userinfo_right'] .= '<a href="profile.php? ' $vbulletin->session->vars['sessionurl'] . 'do=addlist&amp;userlist=friend&amp;u=' $post['userid'] . '"><img src="YOUR IMAGE" alt="" border="0" /></a>';



wh1t3dr3am 01-26-2011 03:12 PM

Not Success :)
Edit :
1.Why if i has been add people still show image for add friend ?

2.why Image add friend show to post you create ?

sry,if i can't speak english very well :)
Thx :D


All times are GMT. The time now is 09:28 PM.

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.01137 seconds
  • Memory Usage 1,746KB
  • 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
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete