Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
  #1  
Old 01-27-2010, 11:30 PM
s0lidgr0und's Avatar
s0lidgr0und s0lidgr0und is offline
 
Join Date: Dec 2006
Location: Colonie, New York
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Adding Facebook Icon to Postbit

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:

Code:
<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.
Reply With Quote
  #2  
Old 01-27-2010, 11:48 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make a custom profile field for your facebook link, then do

Code:
{vb:raw post.fieldXX}
Change the XX to the custom profile field number.
Reply With Quote
  #3  
Old 01-28-2010, 06:25 PM
s0lidgr0und's Avatar
s0lidgr0und s0lidgr0und is offline
 
Join Date: Dec 2006
Location: Colonie, New York
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 01-29-2010, 05:16 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<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" />
Reply With Quote
  #5  
Old 01-29-2010, 11:15 PM
s0lidgr0und's Avatar
s0lidgr0und s0lidgr0und is offline
 
Join Date: Dec 2006
Location: Colonie, New York
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the reply.

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.
Reply With Quote
  #6  
Old 01-30-2010, 02:27 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The $post array must store the values, so you need to search for where the other icons are and add it.
Reply With Quote
  #7  
Old 01-31-2010, 04:32 AM
ChrisG. ChrisG. is offline
 
Join Date: Feb 2007
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 02-01-2010, 12:21 AM
s0lidgr0und's Avatar
s0lidgr0und s0lidgr0und is offline
 
Join Date: Dec 2006
Location: Colonie, New York
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by James Birkett View Post
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.
Reply With Quote
  #9  
Old 02-01-2010, 02:45 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the icons show in the postbit, which is on showthread.php, check the showthread.php page for $post[aimicon] etc.
Reply With Quote
Reply

Thread Tools
Display Modes

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 02:28 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.04559 seconds
  • Memory Usage 2,236KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete