vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Facebook button in Postbit (https://vborg.vbsupport.ru/showthread.php?t=319185)

tommyturnage 06-22-2015 09:00 PM

Facebook button in Postbit
 
1 Attachment(s)
This is a mod that I saw from 3.6.8

I really liked it, but the codes were a little off for vbulletin 4.2.
So here are the updated codes


1. Make a profile field

In Admin CP go to - User Profile Fields - Add New User Profile Field
Profile field type = Single-line text box
Title: Facebook Profile
Description: Type your Facebook ID number
You can leave the rest to default

**Note down the number of the field! Example: field16. You need to replace the fieldX in the next code with the number!**

2. Template changes - In postbit_lecacy & Postbit

Find:
Code:

{vb:raw post.icqicon} {vb:raw post.aimicon} {vb:raw post.msnicon} {vb:raw post.yahooicon} {vb:raw post.skypeicon}
                                </div>
                        </vb:if>

After Add:
Code:

<vb:if condition="$post[fieldX]"><a

href="http://www.facebook.com/profile.php?id=$post

[fieldX]" alt="View my Facebook" target="_blank">
<img src="images/misc/im_facebook.gif" border="0"></a>
</vb:if>

3. Button Upload

Upload the attached image to your: /images/misc folder!

4. Enjoy!

ramesh_umk3 06-24-2015 06:42 AM

you could have given code for googleplus, twitter, pinrest it will be handy for users

Alan_SP 06-24-2015 03:46 PM

You could easily use this code to produce links to whichever site you wish. Code is pretty obvious.

ezak 06-25-2015 02:46 PM

thanks installed

but some modify to be compatible with vb 4.2.3

Code:

<vb:if condition="$post['fieldX']">
<a href="http://www.facebook.com/profile.php?id={vb:raw post.fieldX}" alt="View my Facebook" target="_blank">
<img src="images/misc/im_facebook.gif" border="0"></a>
</vb:if>


vBarsiv 09-30-2015 08:29 PM

For vB 4.2.3 that's better ;)

PHP Code:

<br />
<
vb:if condition="$post['field14']">
<
b>Facebook Sayfam :</b> <a href="{vb:raw post.field14}" alt="Facebook Profilim" target="_blank">
<
img src="images/misc/vBa_facebook.gif" border="0"></a>
</
vb:if> 



All times are GMT. The time now is 01:13 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.01081 seconds
  • Memory Usage 1,721KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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