vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Forum Home Enhancements - UKBL ~ FaceBook profile link on Postbit (https://vborg.vbsupport.ru/showthread.php?t=208147)

sdfontanini 11-16-2010 07:06 AM

I also noticed the </a> was missing, wasted about 20 min figuring it out. :-) LOL

Here's the code for VB 4

<vb:if condition="$post['field25']">
<a href="http://www.facebook.com/home.php/#/profile.php?id=$post[field25]&ref=profile">
<img src="http://www.yoursite.com/forums/images/misc/fb.bmp"></a>
</vb:if>

sdfontanini 11-16-2010 07:12 AM

here's another modification to the vb 4 version, where i have made the ID code appear on hover

<vb:if condition="$post['field25']">
<a href="http://www.facebook.com/home.php/#/profile.php?id=$post[field25]&ref=profile">
<img alt="{vb:raw post.field25}" border="0" src="http://www.coloradoevo.com/forums/images/misc/fb.bmp"></a>
</vb:if>

sdfontanini 11-16-2010 08:03 AM

Last but not least I fixed all the issues with the coding. this was a real pain, here's the new vb 4 version. it directly links to your friends facebook accounts

<vb:if condition="$post['field25']">
<a href="http://www.facebook.com/profile.php?id={vb:raw post.field25}">
<img alt="My Profile" border="1" src="http://www.yourforum.com/forums/images/misc/fb.bmp"></a>
</vb:if>

sdfontanini 11-16-2010 09:23 AM

finally one more, this one opens the links in a new page

<vb:if condition="$post['field25']">
<a href="http://www.facebook.com/profile.php?id={vb:raw post.field25}" target="_blank">
<img alt="Facebook Profile" border="1" src="http://www.yoursite.com/forums/images/misc/fb.bmp"></a>
</vb:if>

TheLastSuperman 11-17-2010 01:58 PM

Quote:

Originally Posted by sdfontanini (Post 2122341)
I also noticed the </a> was missing, wasted about 20 min figuring it out. :-) LOL

Here's the code for VB 4

<vb:if condition="$post['field25']">
<a href="http://www.facebook.com/home.php/#/profile.php?id=$post[field25]&ref=profile">
<img src="http://www.yoursite.com/forums/images/misc/fb.bmp"></a>
</vb:if>

Quote:

Originally Posted by sdfontanini (Post 2122343)
here's another modification to the vb 4 version, where i have made the ID code appear on hover

<vb:if condition="$post['field25']">
<a href="http://www.facebook.com/home.php/#/profile.php?id=$post[field25]&ref=profile">
<img alt="{vb:raw post.field25}" border="0" src="http://www.coloradoevo.com/forums/images/misc/fb.bmp"></a>
</vb:if>

Quote:

Originally Posted by sdfontanini (Post 2122364)
Last but not least I fixed all the issues with the coding. this was a real pain, here's the new vb 4 version. it directly links to your friends facebook accounts


<vb:if condition="$post['field25']">
<a href="http://www.facebook.com/profile.php?id={vb:raw post.field25}">
<img alt="My Profile" border="1" src="http://www.yourforum.com/forums/images/misc/fb.bmp"></a>
</vb:if>

Quote:

Originally Posted by sdfontanini (Post 2122381)
finally one more, this one opens the links in a new page


<vb:if condition="$post['field25']">
<a href="http://www.facebook.com/profile.php?id={vb:raw post.field25}" target="_blank">
<img alt="Facebook Profile" border="1" src="http://www.yoursite.com/forums/images/misc/fb.bmp"></a>
</vb:if>

Similar here:
https://vborg.vbsupport.ru/showthread.php?t=233432
... it was already done for 4.x ;)

MatiasCandy 11-18-2010 11:14 PM

Quote:

AdminCP and add a custom field > User Profile fields > Add New User Profile Field
Which "Profile Field Type"

I have 3.8.6 is there special install for that?
Sorry new to adding Badges and such

bestmilan 09-22-2011 07:41 PM

Quote:

Originally Posted by blaize (Post 1906644)
I worked around the new vanity url issue by creating two custom fields, one for numerical id and one for users with vanity urls.

This is the code I used for the postbit template edits. Change fields XX & YY to whatever your custom fields are.

Code:

<if condition="is_member_of($bbuserinfo, 2, 5, 6, 7)">
<if condition="$post['fieldXX']">
<a href="http://www.facebook.com/home.php/#/profile.php?id=$post[fieldXX]&ref=profile">
<img alt="My Facebook" border="0" src="http://yourforums.com/forums/images/misc/facebook.png" border="0"/>
</if></if>

<if condition="is_member_of($bbuserinfo, 2, 5, 6, 7)">
<if condition="$post['fieldYY']">
<a href="http://www.facebook.com/$post[fieldYY]?ref=profile">
<img alt="My Facebook" border="0" src="http://yourforums.com/forums/images/misc/facebook.png" border="0"/>
</if></if>

Use at your own risk.

The first is for the numerical id & the second is used if the facebook profile uses a vanity url.


This was very helpful, thank you blaize :)

bestmilan 09-23-2011 05:11 AM

BTW, I cut off "&ref=profile" from the code above to validate the code.

It seems to be working fine in the latest versions of all major browsers.


All times are GMT. The time now is 09:36 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.01125 seconds
  • Memory Usage 1,739KB
  • 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
  • (1)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete