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)

UKBusinessLive 03-11-2009 10:00 PM

UKBL ~ FaceBook profile link on Postbit
 
1 Attachment(s)
UKBL ~ FaceBook profile link on Postbit ~ Clickable !!


Member on Facebook? Show other members that you have a Facebook presance by adding a facebook Icon to your postbit" ;)

This is a cool hack which will let your members add a facebook Icon to their Postbit template, They need to add their facebook Profile user ID in their user CPfor this to show, If they don't enter one, then the badge don't show :D
How to install.

Its really easy to do, as always, so if your sitting comfortably, lets begin ;)

Now we need to create a User Custome field, so.....

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

Title = Facebook user ID

Description = Enter the Number ID from your Facebook User Profile

Default Value = Leave empty

Max length of allowed user input = 12

Display Size = 10

Display Order = 10 or 15

Field Required = No as default

Field Editable by User = Yes in case member wants to delete, Later

Private Field = No

Field Searchable on Members List = No

Show on Members List = Yes

Regular Expression = leave empty

Save the field ;)

Once you've saved you can see what the field number is, So lets say its Field11 for example, Remember this as will need it for your Postbit Edits :up:

Thats the first bit done, now Part Two :rolleyes:

Go to the template you are using in Styles & Templates/Style Manager, and select Edit templates.

Go to "postbit templates" and select the template you are using, either postbit or postbit_legacy.

Find the following

Code:

<if condition="$post['joindate']"><div class="postbit">$vbphrase[join_date]: $post[joindate]</div></if>
Directly above it add

Code:

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

replace the RED Field attribute for your own

now when members sign up their facebook badge and enter their profile user ID into the "Enter the Number ID from your Facebook User Profile" section in their UserCP, The Badge will automatically appear in their Postbit :eek:

Don't forget to change the usergroup condition with the number of the usergroups that you want to be able to view this

Code:

<if condition="is_member_of($bbuserinfo, 6, 7, 9)">
That means that guests and banned users will not be able to view members facebook profile urls ;)

Members who do not add a user id will not be shown anything.

Next, Upload the facebook icon to your forums/images/misc folder and add the full url to the part in the code which shows the image.

if you are just seeing a red cross on your postbit, then its because your image url is not right ;)

Oh Forgot to say, Badge is fully clickable so members can click directly to facebook ;)


Hope you enjoyed this new hack, and thanks to DobieGillis? for the idea ;)

Please Click Installed and I'll support you 100%

Thanks

UKBusinessLive 03-12-2009 08:38 PM

:D Reserved ;)

DobieGillis? 03-12-2009 08:40 PM

you are the best!

DobieGillis? 03-12-2009 09:14 PM

again, my humbelest thanks!

Jasem 03-12-2009 09:35 PM

Good work, thank you......

Installed

DobieGillis? 03-12-2009 10:16 PM

going to try one with Myspace. lol

macc 03-12-2009 11:46 PM

Nice work - Thanks :rolleyes: :rolleyes:

regards

macc

UKBusinessLive 03-13-2009 12:24 AM

Thanks again everyone :D

You can by all means do one for myspace, bebo and the such, simply by replacing the destination url and adding the fieldX attribute where the member id belongs.

Don't forget to add the image url too ;)

Have fun

:D

trotskid 03-13-2009 01:24 AM

Thanks for this hack ;)

How can I modify the position of the icon?

https://vborg.vbsupport.ru/

scottny 03-13-2009 04:50 AM

I want to install but where is the number on Facebook? Sorry I am really computer challenged when it comes to things like this.

UKBusinessLive 03-13-2009 06:12 AM

Quote:

Originally Posted by trotskid (Post 1766938)
Thanks for this hack ;)

How can I modify the position of the icon?

https://vborg.vbsupport.ru/

by looking at your picture you'll want to move it down a bit more, Just add it down the code a bit further in the postbit template, not sure without looking at your postbit, but just move it down below the Yahoo icon, you'll see the code for it, just make sure its on a new line and not in the middle of a line of code ;)

UKBusinessLive 03-13-2009 06:18 AM

Quote:

Originally Posted by scottny (Post 1766998)
I want to install but where is the number on Facebook? Sorry I am really computer challenged when it comes to things like this.

below is what a normal profile page looks like in facebook, with the user id Colored red, thats the Url of the page when your logged onto your facebook profile.

Code:

http://www.facebook.com/home.php/#/profile.php?id=123456789123&ref=profile
This is what we have in the code, with the user number replaced with the custom profile file number, in red also

Code:

http://www.facebook.com/home.php/#/profile.php?id=$post[field11]&ref=profile
The thing that makes this show up or not in the postbit, is the custom user field in the edit options of the users CP

When they enter there user number from their facebook profile in this profile field the code is complete, without this number the facebook logo is not shown. ;)

K4GAP 03-13-2009 04:03 PM

Which of the profile field selections do I use for this? There are 6 to choose from.

UKBusinessLive 03-13-2009 04:08 PM

Quote:

Originally Posted by GaryT (Post 1767281)
Which of the profile field selections do I use for this? There are 6 to choose from.

Hi Gary

The User profile file which you've created just for this, You can't use an existing one :confused:

Sweeks 03-13-2009 10:21 PM

Wouldnt it better to use
Code:

<if condition="$show['member']"></if>
wrapped around the edit so that all members can see it, but guests cant? Also you have added two
Code:

border="0"
's to the edit ;)
________
Alcohol rehab advice

DobieGillis? 03-14-2009 08:36 PM

all good!

UKBusinessLive 03-16-2009 06:09 PM

Quote:

Originally Posted by trotskid (Post 1766938)
Thanks for this hack ;)

How can I modify the position of the icon?

http://img14.imageshack.us/img14/1885/facebookj.jpg

Did you manage to move your icon Trotskid ?? :)

obmob 03-16-2009 07:01 PM

Oh, i was wondering about this, a good idea ^^

UKBusinessLive 03-16-2009 07:11 PM

Quote:

Originally Posted by obmob (Post 1769893)
Oh, i was wondering about this, a good idea ^^


Thanks :cool:

RedDevil 03-16-2009 11:09 PM

I was going to try this however the line to search for doesnt exist.

Code:

<if condition="$post['joindate']"><div class="postbit">$vbphrase[join_date]: $post[joindate]</div></if>
Is this compatible with (vBulletin 3.8.1 Patch Level 1)

or maybe been changed?

UKBusinessLive 03-16-2009 11:24 PM

Quote:

Originally Posted by Red-Devil (Post 1770046)
I was going to try this however the line to search for doesnt exist.

Code:

<if condition="$post['joindate']"><div class="postbit">$vbphrase[join_date]: $post[joindate]</div></if>
Is this compatible with (vBulletin 3.8.1 Patch Level 1)

or maybe been changed?

Is what compatible with 3.8.1 the hack or the above code??

The Hack Should be, I'm not sure what your trying to do with that condidtional?

RedDevil 03-16-2009 11:29 PM

Quote:

Originally Posted by UKBusinessLive (Post 1770057)
Is what compatible with 3.8.1 the hack or the above code??

The Hack Should be, I'm not sure what your trying to do with that condidtional?


I was trying to find it in the postbit template, its ok found it its broken into 2 lines made it more challenging to find lol.

cant get it to display will have to mess about not over good at codeing :)

RedDevil 03-16-2009 11:46 PM

Nice got it working, after a bit of trial and error works better for me place above $template_hook[postbit_userinfo_right] as where your code said it messed up the side display.


It would be nice to be able to have it inline with the msn aim etc if possible, but its ok now.

https://vborg.vbsupport.ru/

UKBusinessLive 03-17-2009 05:15 PM

Quote:

Originally Posted by Red-Devil (Post 1770075)
Nice got it working, after a bit of trial and error works better for me place above $template_hook[postbit_userinfo_right] as where your code said it messed up the side display.


It would be nice to be able to have it in line with the msn aim etc if possible, but its ok now.

http://www.vrbforums.co.uk/pics/fbook.jpg

Try and move it further down the postbit code or add it after the other icons and see???

Sometimes Postbits are heavily modified and its a bit of a job to keep everyone happy ;)

Glad you enjoy it though

:D

010081 03-18-2009 06:54 PM

nice mod thankx for sharing

trotskid 03-19-2009 01:26 PM

Quote:

Originally Posted by UKBusinessLive (Post 1769838)
Did you manage to move your icon Trotskid ?? :)

Finally! And looks great ;)

https://vborg.vbsupport.ru/

Just followed by the last icon:

....$post[skypeicon]<if condition="is_member_of($bbuserinfo, 6, 5, 10,.......

Greetings

UKBusinessLive 03-19-2009 05:35 PM

Quote:

Originally Posted by trotskid (Post 1771822)
Finally! And looks great ;)

https://vborg.vbsupport.ru/

Just followed by the last icon:

....$post[skypeicon]<if condition="is_member_of($bbuserinfo, 6, 5, 10,.......

Greetings

Nice :D

RedDevil 03-21-2009 04:40 PM

Quote:

Originally Posted by trotskid (Post 1771822)
Finally! And looks great ;)

http://img14.imageshack.us/img14/8951/33533817.jpg

Just followed by the last icon:

....$post[skypeicon]<if condition="is_member_of($bbuserinfo, 6, 5, 10,.......

Greetings

cheers :)

down.low 03-25-2009 12:33 PM

I'm a 3.8.1 user
|
This code doesn't work:
Code:

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

|
It's missing a </a>

Has an extra border="0"

Why URL for href?
|
|
|
If you'd like to get you're facebook icon here:
|

https://vborg.vbsupport.ru/

|
|

First, upload https://vborg.vbsupport.ru/ to your server in this directory: images/misc/

Then edit postbit_legacy and look for this string:

Code:

<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
|
|

Below it add this string after changing both ?? to your field number:
Code:

<if condition="$show['member']">
<if condition="$post['field??']">
<a href="http://www.facebook.com/home.php/#/profile.php?id=$post[field??]&ref=profile">
<img alt="Facebook" src="images/misc/facebook.png" border="0"/></a>
</if></if>

|
Save the template and you're done.
|

RedHacker 03-25-2009 05:39 PM

<if condition="is_member_of($bbuserinfo, 6, 7, 9)">

In there what put...?

My team members or my team members who dont show facebook ID....?

UKBusinessLive 03-25-2009 05:58 PM

Quote:

Originally Posted by down.low (Post 1776615)
I'm a 3.8.1 user
|
This code doesn't work:
Code:

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

|
It's missing a </a>

Has an extra border="0"

Why URL for href?
|
|
|
If you'd like to get you're facebook icon here:
|

http://i472.photobucket.com/albums/r...tion/face2.jpg

|
|

First, upload http://i472.photobucket.com/albums/r...n/facebook.png to your server in this directory: images/misc/

Then edit postbit_legacy and look for this string:

Code:

<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
|
|

Below it add this string after changing both ?? to your field number:
Code:

<if condition="$show['member']">
<if condition="$post['field??']">
<a href="http://www.facebook.com/home.php/#/profile.php?id=$post[field??]&ref=profile">
<img alt="Facebook" src="images/misc/facebook.png" border="0"/></a>
</if></if>

|
Save the template and you're done.
|

wow thanks for the update :D

i'll update my first post in a moment :up:

UKBusinessLive 03-25-2009 06:01 PM

Quote:

Originally Posted by RedHacker (Post 1776828)
<if condition="is_member_of($bbuserinfo, 6, 7, 9)">

In there what put...?

My team members or my team members who dont show facebook ID....?

Thats for the user groups that you want to be able to use this hack, Just add your registered members usergroup ID, plus your mods and admins, if you don't add the usergroup id for unregistered, or banned members then they will not be able to see the facebook icon ;)

RedHacker 03-25-2009 06:06 PM

If put said down.low the image put down but saw little up from others images

UKBusinessLive 03-25-2009 06:37 PM

Quote:

Originally Posted by RedHacker (Post 1776844)
If put said down.low the image put down but saw little up from others images

What you've said don't make sense?? :confused:

can you be a bit clearer??

RedHacker 03-25-2009 07:24 PM

Finally i fixed..!!!The facebook ID where is...?

UKBusinessLive 03-25-2009 07:25 PM

Quote:

Originally Posted by RedHacker (Post 1776914)
Finally i fixed..!!!The facebook ID where is...?

Well done Buddy :D:D

RedHacker 03-25-2009 07:40 PM

I haven't ID Facebook and saw as put 12 numbers..!!!!!Can find this my members....?

UKBusinessLive 03-25-2009 08:38 PM

Quote:

Originally Posted by RedHacker (Post 1776934)
I haven't ID Facebook and saw as put 12 numbers..!!!!!Can find this my members....?

Not sure what you mean??

RedHacker 03-25-2009 11:02 PM

Who find the ID...?

UKBusinessLive 03-26-2009 12:53 AM

Quote:

Originally Posted by RedHacker (Post 1777094)
Who find the ID...?

the member get the id from their facebook profile url, and enters this into their Custom profile field, once they do that, the icon shows in their post bit ;)


All times are GMT. The time now is 06:26 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.01549 seconds
  • Memory Usage 1,848KB
  • 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
  • (15)bbcode_code_printable
  • (17)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
  • (40)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