vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Mini Mods - Facebook button in postbit (https://vborg.vbsupport.ru/showthread.php?t=160214)

SLY LS1 10-13-2007 10:00 PM

Facebook button in postbit
 
I couldn't find this anywhere else so I made my own using Bratz-Designs Myspace mod as a start.

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:

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]
After add:
Code:

<!-- Facebook display start -->
<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>
</if><!-- Facebook display end -->

3. Button Upload

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


4. Add link in members profile "Contact Info: section

Edit template - "memberinfo"

Find:
Code:

<if condition="$show['homepage']">
                                <tr>
                                        <td>
                                                $vbphrase[home_page]:<br />
                                                <a href="$userinfo[homepage]" target="_blank" dir="ltr">$userinfo[homepage]</a>
                                        </td>
                                </tr>
                                </if>

Above add:
Code:

<if condition="$userinfo[fieldX]">
                                <tr>
                                        <td>
                                                Facebook Profile:<br />
                                                <a href="http://www.facebook.com/profile.php?id=$userinfo[fieldX]" target="_blank">Check out my Facebook page</a>
                                        </td>
                                </tr>
                                </if>

Dont forget to change the X to your field number.

Munzo 10-14-2007 08:16 PM

Ah First post - Great Add!!

I will add it for sure in the future!

Mazoo 10-15-2007 07:39 AM

I add it ..
wonderfull ..

Thanks :)

Lyricsmama 10-15-2007 11:56 PM

Added... Thanks :D

Meghwar 10-18-2007 01:00 PM

added but its not working

SLY LS1 10-18-2007 01:15 PM

Quote:

Originally Posted by Meghwar (Post 1363037)
added but its not working

It will only show if you have your facebook ID number in filled in, in your profile.

Meghwar 10-18-2007 01:21 PM

SLY LS1 I have Facebook id :)

i did add the fieldX = my Id and i added all the modification to postbit_legacy and postbit , then follow with members on members info,,,edited and saved added the new fields ot the "Add New User Profile Field" Save and refresh ....nothing happen i double check the info on my userCp ,,,,doesnt view the FACE BOOK modification :) some thing not right,,, and ist [fieldX] should be my Example: [89749819] id .... thanx

Meghwar 10-18-2007 08:48 PM

Any one !!! could help

SLY LS1 10-19-2007 12:03 AM

Quote:

Originally Posted by Meghwar (Post 1363050)
SLY LS1 I have Facebook id :)

i did add the fieldX = my Id and i added all the modification to postbit_legacy and postbit , then follow with members on members info,,,edited and saved added the new fields ot the "Add New User Profile Field" Save and refresh ....nothing happen i double check the info on my userCp ,,,,doesnt view the FACE BOOK modification :) some thing not right,,, and ist [fieldX] should be my Example: [89749819] id .... thanx


No the [fieldX] should be the number of the field you created, NOT your facebook number, if you go to userfields in your Admin control panel and look for the field you named "Facebook Profile" it will have a field number next to it, you need to change all the X to that field number.

Check through the instructions from the start again and you will work it out.

Your facebook number gets added in your UserCP.

Hope this helps

youradhere4222 10-30-2007 02:53 AM

It isn't showing up for me...

SLY LS1 10-30-2007 03:56 AM

Quote:

Originally Posted by youradhere4222 (Post 1371636)
It isn't showing up for me...

Check through the instructions again, id say you have missed something...

Cheers

ChU v2 11-04-2007 05:38 PM

Quote:

Originally Posted by youradhere4222 (Post 1371636)
It isn't showing up for me...

https://vborg.vbsupport.ru/showthread.php?t=160232

That might be to your liking as well, it also displays the MySpace icon.

powerful_rogue 11-05-2007 10:59 AM

Managed to get it working.

Quote:

<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon] OR $post[skypeicon] OR $post[field6]"><div class="nzbpostbit">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon] <!-- Facebook display start -->
<if condition="$post[field6]"><a href="http://www.facebook.com/profile.php?id=$post[field6]" alt="View my Facebook" target="_blank">
<img src="images/misc/facebook.gif" border="0"></a></div>
</if><!-- Facebook display end --> </div></if>
</div>
I had to add the bolded bit into the code, otherwise the facebook icon would only show if someone had MSN/ICQ etc

2impulsiv 11-08-2007 11:37 AM

Cheers Sly...


:)


Installed

ged 11-16-2007 05:26 AM

Shouldn't it show a link there? It only show IDs...

SLY LS1 11-16-2007 12:01 PM

Quote:

Originally Posted by ged (Post 1383574)
Shouldn't it show a link there? It only show IDs...


The link shows on the right hand side of the page on the member profile and also in the postbit.

SLY LS1 11-16-2007 12:05 PM

Quote:

Originally Posted by powerful_rogue (Post 1376186)
Managed to get it working.

I had to add the bolded bit into the code, otherwise the facebook icon would only show if someone had MSN/ICQ etc


thats already in your code

Quote:

<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon] OR $post[skypeicon] OR $post[field6]"> <div class="nzbpostbit">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon] <!-- Facebook display start -->
<if condition="$post[field6]"><a href="http://www.facebook.com/profile.php?id=$post[field6]" alt="View my Facebook" target="_blank">
<img src="images/misc/facebook.gif" border="0"></a></div>
</if><!-- Facebook display end --> </div></if>
</div>
The facebook icon will only show if you have it filled in on your profile.

cSh 12-31-2007 01:16 PM

nice add !
thank u SLY LS1

gizabo 01-01-2008 03:41 PM

can u do the same with Myspace?

gizabo 01-02-2008 12:05 AM

Instead of the code
PHP Code:

<div>$post[icqicon$post[aimicon$post[msnicon$post[yahooicon$post[skypeicon

I have this code....
PHP Code:

<div>&nbsp;$post[icqicon$post[aimicon$post[msnicon$post[yahooicon$post[skypeicon]&nbsp;</div

and it dosent work.... is it now working cuz of that?

hyppa 01-10-2008 03:16 PM

Cant get it to work.

hyppa 01-10-2008 03:30 PM

Sorry, my mistake, forgot to change the fieldnumber in posbit.

thanks!

sunnycher 03-10-2008 04:00 AM

Mine isn't working either and I have followed all the instructions, uploaded the image, etc.
Not sure what else to do.

Brandon Sheley 03-10-2008 04:16 AM

would be nice if something like this was made for linkden :)

sunnycher 03-10-2008 04:59 AM

Got it working! There is another fieldx and I was missing it :)
THANK YOU! love it!

sunnycher 03-10-2008 04:59 AM

I'd love to see one of these for HELLO

www.hello.com

MAZAG 05-14-2008 08:25 PM

NOt Working, idid all instruction exactly and i entered my facebook ID in my profile and there is no facebook icon in my postbit

ChU v2 05-14-2008 08:44 PM

Quote:

Originally Posted by sunnycher (Post 1461235)
I'd love to see one of these for HELLO

www.hello.com

hello.com is shutting down.

Quote:

Originally Posted by MAZAG (Post 1519778)
NOt Working, idid all instruction exactly and i entered my facebook ID in my profile and there is no facebook icon in my postbit

You courl try https://vborg.vbsupport.ru/showthread.php?t=174863

Quote:

Originally Posted by Loco.M (Post 1461217)
would be nice if something like this was made for linkden :)

This has linkdin: https://vborg.vbsupport.ru/showthread.php?t=174863
Check post 22.

SnapOff Racing 10-27-2009 05:38 AM

Quote:

Originally Posted by powerful_rogue (Post 1376186)
Managed to get it working.

Quote:

<if condition="$post[icqicon] OR $post[aimicon] OR $post[msnicon] OR $post[yahooicon] OR $post[skypeicon] OR $post[field6]"><div class="nzbpostbit">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon] <!-- Facebook display start -->
<if condition="$post[field6]"><a href="http://www.facebook.com/profile.php?id=$post[field6]" alt="View my Facebook" target="_blank">
<img src="images/misc/facebook.gif" border="0"></a></div>
</if><!-- Facebook display end --> </div></if>
</div>

I had to add the bolded bit into the code, otherwise the facebook icon would only show if someone had MSN/ICQ etc

Quote:

Originally Posted by SLY LS1 (Post 1383710)
thats already in your code



The facebook icon will only show if you have it filled in on your profile.

powerful_rogue is right, your not realizing what he is saying. If a user doesn't have an MSN or Yahoo listed in their profile, then the FaceBook button WILL NOT SHOW UP regardless if they have any info listed in their facebook field or not. So let's say a user has listed info in their facebook field but they haven't listed a yahoo or msn etc, then the facebook button will not show up.

You have to add OR $post[field6] after $post[skypeicon] so it looks like this
Code:

$post[skypeicon] OR $post[field6]

zonaenlinea 09-14-2010 11:44 PM

for 4.0.6 ?


All times are GMT. The time now is 01:24 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.01270 seconds
  • Memory Usage 1,817KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (30)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