Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Add friend button on postbit Details »»
Add friend button on postbit
Version: 1.0, by fxdigi-cash fxdigi-cash is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.2.1 Rating:
Released: 04-18-2014 Last Update: Never Installs: 21
Uses Plugins
 
No support by the author.

Intro:
just to give a quick summery about this mod. This is a plugin that can show add friend button in the post where users can take advantage of requesting friendships with other users without going to their profile pages.

I found most of the code in here : https://vborg.vbsupport.ru/showpost....2&postcount=15

so it is not actually mine, but was trying around how to make a use of it. The main Thanks goes to the coder: Yellow Slider :up:

installation:

1- create a new plugin in your Adin cp by going to Plugins & Products --> add new plugin

2- use the following settings:

Product ---> vbulletin
Hook Location --> postbit_displate_complete
Title ---> "write your own words or whatsoever you like"
Execution Order --> 5
Plugin PHP Code --> insert the following code there:

PHP Code:
$postuserinfo fetch_userinfo($post['userid'], 128);
$isfriend $postuserinfo['isfriend'];
if (!
$isfriend)
{
    
$template_hook['postbit_controls'] .= '<span class="addfriend"><a href="profile.php? ' $vbulletin->session->vars['sessionurl'] . 'do=addlist&amp;userlist=friend&amp;u=' $post['userid'] . '">' construct_phrase($vbphrase['add_as_friend'], $post['username']) . '<img class="addimg" alt="Add as Friend" src="images/site_icons/add.png"></a></span>';

save the work and you will see that add friend text has shown up in your postbit...

now you just need to add css to your additional.css:

PHP Code:
.addimg{margin:-2px;}
.
addfriend{positionabsolute;right378px;} 
save your template and check it out!!

ScreenShot:




Known Bugs:

The only issue with this plugin is that the button shows up to the logged in user as well in his own post which shouldn't. Instead, it is supposed to be hidden. if a fix is found, I will post it here.

Please mark this mod as installed if you used it

Nominate MOTM if you LOVE it!

Good luck for all!!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 07-03-2014, 07:07 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

See your not suppose to get sick. Glad your better.
Reply With Quote
Благодарность от:
fxdigi-cash
  #13  
Old 07-04-2014, 09:33 AM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks tbworld,

I was working for more than 27 hours without stop... only drinking coffee, and then went to bed and when woke up I got fever...

The doctor told me off not to do that again...!! so now only 10 hours a day.

wish you and all others great health
Reply With Quote
  #14  
Old 07-05-2014, 01:04 AM
men2dope men2dope is offline
 
Join Date: Jul 2014
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

never-mind, problem solved.
Reply With Quote
Благодарность от:
fxdigi-cash
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:43 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06308 seconds
  • Memory Usage 2,259KB
  • Queries Executed 19 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (4)post_thanks_box
  • (2)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete