View Full Version : Adding Facebook Icon to Postbit
s0lidgr0und
01-27-2010, 11:30 PM
I'm looking to add a link to my postbit legacy to a member's Facebook account. I've seen the modification for this, but it seems more involved than it really needs to be. I looked at the postbit legacy template and found the portion of the code where the other icons are listed. It looks like it could be added a lot easier.
Here's the piece of code I'm looking at:
<div class="imlinks">
{vb:raw post.icqicon} {vb:raw post.aimicon} {vb:raw post.msnicon} {vb:raw post.yahooicon} {vb:raw post.skypeicon}
</div>
Now for each of these references to the icq, aim, msn, and other icons, where are they being referred from? I'd like to simply be able to add {vb:raw post.facebookicon} to this part of the code, but what's the other part that I'm missing? Obviously, it must be referring to the image file and also a url, but beyond that I'm lost.
Thanks for any thoughts.
BBR-APBT
01-27-2010, 11:48 PM
Make a custom profile field for your facebook link, then do
{vb:raw post.fieldXX}
Change the XX to the custom profile field number.
s0lidgr0und
01-28-2010, 06:25 PM
That will add the image file and link without anything else being coded anywhere else?
Edit:
That only adds the member's Facebook ID number to the postbit.
James Birkett
01-29-2010, 05:16 PM
<vb:if condition="$post['fieldX']"><a href="http://facebook.com/$post[fieldX]"><img src="http://facebook.com/favicon.ico" /></a></vb:if>
If the user inputs into fieldX the value 15253535, then it will take them to http://facebook.com/15253535 when the facebook link is clicked.
You may want to save the facebook icon to your server and do a relative link <img src="/images/facebookicon.gif" />
s0lidgr0und
01-29-2010, 11:15 PM
Thanks for the reply. :cool:
Well, I accomplished what I wanted to accomplish, I just wanted to know what else I'd have to add so I'd be able to just add that one piece of code. It must call on some other piece of code somewhere.
James Birkett
01-30-2010, 02:27 PM
The $post array must store the values, so you need to search for where the other icons are and add it.
ChrisG.
01-31-2010, 04:32 AM
Hmm... I'm looking to add Linkedin, Facebook, and Twitter as options.
I'm going to skim over this thread and see if there is enough information for me to figure out how to accomplish this, but it also seems like something others have surely done already. So I'm posting a reply to bump the thread.
Please chime in if you have any experience with such a modification.
Or if there is an article that covers this territory that could help enlighten me, please point me to it.
Thank you graciously.
s0lidgr0und
02-01-2010, 12:21 AM
The $post array must store the values, so you need to search for where the other icons are and add it.I think that's what I meant to ask for from the beginning. Thank you. :cool:
James Birkett
02-01-2010, 02:45 PM
If the icons show in the postbit, which is on showthread.php, check the showthread.php page for $post[aimicon] etc.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.