Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
UKBL ~ FaceBook profile link in Postbit ~ Clickable !! Details »»
UKBL ~ FaceBook profile link in Postbit ~ Clickable !!
Version: 1.00, by TheLastSuperman (Senior Member) TheLastSuperman is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.0.x Rating:
Released: 01-17-2010 Last Update: Never Installs: 60
Supported Template Edits
Re-useable Code Additional Files Translations  

This is a super simple template edit that will allow your members to share their Facebook Profile with others .

You simply create a new user profile field and make one template edit and then your members do the rest and your all set!

Full Credit for this mod goes to UKBL, requested by taffy056 for use with vBulletin 4.0 Series here:

https://vborg.vbsupport.ru/showthread.php?p=1929367

And via PM to me

I did not realize UKBL had stated "Re-Usable" Code or I would have released this sooner However again I must make it clear that full credit goes to UKBL and per his thread the idea was presented to him by DobieGillis.

You can add your own links to postbit by following this same method just redoing the code snippets a bit so in essence you can have Facebook, Twitter, Myspace, LinkedIn and many more just by playing with the code a bit .

Screenshots are in UKBL's original thread and I just tested and verified this to be working on a 4.0.1 forum however it should be perfectly usable on any 4.0.x series. Please refer to the Install.txt file in the .zip for instructions on how to add this to your forum and Enjoy!

Sincerely,

TheLastSuperman

Download Now

File Type: zip UKBLFaceBook.zip (4.2 KB, 371 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-18-2010, 03:05 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quick tips!

1. How 2 Guide - Template Conditionals

A Conditional If Statement simply put will show something to a user based on IF this or IF that SHOW them THIS. Very simple to follow once you initially grasp it so don't let it trick or fool you

Here's an Example:

Code:
<vb:if condition="$show['member']">

This conditional seen above starting with vb:if will only show the code in between the beginning and the end vb:if it is ended by the slash seen below /

</vb:if>
Now if you test this in 4.0 you will only see this code when logged in as a member . How do I put this code somewhere and utilize it like UKBL first mentioned? Well you can edit your forums templates... vBulletin uses a .php file with code in it, a template with the code in it that corresponds to the php file and css in your style vars area to show you every single page in your vBulletin so basically all three (and some other minor things no need to confuse you early on eh?) make the page display and you the forums owner can make it do your bidding!!

You can edit your styles templates by going to AdminCP > Style & Templates > Style Manager

Now I would create a Child Style to test with so you don't mess up your Live sites style...

AdminCP > Style & Templates > Style Manager > Select the style and to the right click the drop down and select "Add Child Style" and leave it all alone except change "Allow User Selection" to NO this way you can tinker with it behind the scenes .

Then You'll see the new style and click the drop down on the right and choose "Edit Templates" now go down and double click "Header" then at the very top type in TESTING 123 hit save & reload then select the style since you can as an admin and in that style at the very top you'll now see TESTING123 in plain old text .

You just edited your first template... now yes your right... you can do that but with all sorts of codes just be careful as some can make the style go on you so it will require a slight learning curve... and conditionals?

Code:
<vb:if condition="$show['guest']">
TESTING 123
</vb:if>
Put that in the Header Template instead...

Now refresh your page (your still logged in as an admin) and now it's gone, it is only showing to visitors or Guests of the forum i.e. non-logged in users .

Edit: Look what I just found https://vborg.vbsupport.ru/showthread.php?t=231525 and special Thanks to BBR-APBT for taking the time to post it up



2. How 2 Guide - Use Facebook ID# OR Name

Revised Code by Steve to show using Facebook ID number and "Vanity" profile name i.e. if you have already selected your custom Facebook URL i.e. mine is no longer a number it is thelastsuperman .

Quote:
Originally Posted by abqtj

I got it to work using your code, and also tweaked it using code in the link you gave to the 3.8 version.

If you want an update, here's what I'm using:

PHP Code:
<vb:if condition="is_member_of($bbuserinfo, 1,2,3,4,5,6,7,9,11,12)">
<
vb:if condition="$post['field6']">
<
a href="http://www.facebook.com/home.php/#/profile.php?id={vb:raw post.field6}&ref=profile">
<
img src="images/misc/facebook.png" alt="My Facebook" style="border-style: none" target="_blank"/></a>
</
vb:if>
</
vb:if>

<
vb:if condition="is_member_of($bbuserinfo, 1,2,3,4,5,6,7,9,11,12)">
<
vb:if condition="$post['field7']">
<
a href="http://www.facebook.com/?ref=home#/{vb:raw post.field7}?ref=profile">
<
img src="images/misc/facebook.png" alt="My Facebook" style="border-style: none" target="_blank"/></a>
</
vb:if>
</
vb:if> 

The second set, with field 7 in it, uses the vanity name instead of the user id.

Thanks again for this mod!!

-Steve
*Full Credit to UKBL so from here on out I need to see THANKS UKBL in your posts if you enjoy it
Reply With Quote
  #3  
Old 01-18-2010, 05:02 PM
abqtj abqtj is offline
 
Join Date: Nov 2008
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and still tweaking it to get it to work...should be good, though!
Reply With Quote
  #4  
Old 01-18-2010, 05:31 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by abqtj View Post
Installed and still tweaking it to get it to work...should be good, though!
I tested just before I put up the mod on here so it should work fine "Out of the box" otherwise post and we'll get you sorted .

Mike
Reply With Quote
  #5  
Old 01-18-2010, 05:47 PM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cheers Mike.

How is Gerry havent seen him in ages?
Reply With Quote
  #6  
Old 01-18-2010, 05:49 PM
Fusion2 Fusion2 is offline
 
Join Date: Oct 2006
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like the idea, but could you be a little more explainable in your text file for us beginners!

It says add template conditional. Umm where do i add this?

Also How do I add the box around the section, as seen in the original posts on the profile page. Mine just shows all the text scrunched together with no enclosed box.
Reply With Quote
  #7  
Old 01-18-2010, 06:02 PM
abqtj abqtj is offline
 
Join Date: Nov 2008
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheLastSuperman View Post
I tested just before I put up the mod on here so it should work fine "Out of the box" otherwise post and we'll get you sorted .

Mike
THanks,

I think I got it.

I edited the postbit_legacy, not postbit. Went back and edited postbit and it shows up fine.

I do not know what the difference is in those two spots, I suppose.
Reply With Quote
  #8  
Old 01-18-2010, 06:11 PM
kersti kersti is offline
 
Join Date: Dec 2005
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm also asking how do I add the conditional??? Could someone please explain it to us noobs?
Reply With Quote
  #9  
Old 01-18-2010, 06:56 PM
kersti kersti is offline
 
Join Date: Dec 2005
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I went back to the 3.8 version to work out how to do this.
Reply With Quote
  #10  
Old 01-18-2010, 07:17 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TimberFloorAu View Post
Cheers Mike.

How is Gerry havent seen him in ages?
I hope he is doing very well I have not heard from him but do know something came up in real life and I would like to wait for him to come back and let everyone know. I only released this because a few requested and UKBL makred it as re-usable code but I don't care about installs only helping when I have spare time to however when he returns I get to bug Paul M to change the threads owner to UKBL lol

Quote:
Originally Posted by Fusion2 View Post
I like the idea, but could you be a little more explainable in your text file for us beginners!

It says add template conditional. Umm where do i add this?

Also How do I add the box around the section, as seen in the original posts on the profile page. Mine just shows all the text scrunched together with no enclosed box.
See Post #2 and post again if anymore questions

Quote:
Originally Posted by abqtj View Post
THanks,

I think I got it.

I edited the postbit_legacy, not postbit. Went back and edited postbit and it shows up fine.

I do not know what the difference is in those two spots, I suppose.
You can specify in your AdminCP > Settings > Options > Style & Language Options > Now scroll down and look for:

PHP Code:
Use Legacy (VerticalPostbit Template

If you prefer the old-style postbitusing two vertical columns rather than the new horizontal layoutyou can switch back to using that template with this switch.

Please note that if you enable this option and wish to customize the templateyou should edit the 'postbit_legacy' template rather than the 'postbit'
Quote:
Originally Posted by kersti View Post
I'm also asking how do I add the conditional??? Could someone please explain it to us noobs?
Please see post #2

Anything else feel free to post

Sincerely,

Mike
Reply With Quote
Reply


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 01:16 PM.


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.04404 seconds
  • Memory Usage 2,353KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (2)bbcode_php
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete