View Full Version : Mini Mods - Facebook button in postbit
SLY LS1
10-13-2007, 10:00 PM
I couldn't find this anywhere else so I made my own using Bratz-Designs Myspace mod (https://vborg.vbsupport.ru/showthread.php?t=142290&highlight=facebook&page=2) 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:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]
After add:
<!-- 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:
<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:
<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
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
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
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
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.
<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
Shouldn't it show a link there? It only show IDs...
SLY LS1
11-16-2007, 12:01 PM
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
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
<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.
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
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]
I have this code....
<div> $post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon] </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
I'd love to see one of these for HELLO
www.hello.com
hello.com is shutting down.
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
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
Managed to get it working.
<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
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 $post[skypeicon] OR $post[field6]
zonaenlinea
09-14-2010, 11:44 PM
for 4.0.6 ?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.