vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - Add Facebook "Like" button to your threads [vB 3.8.x] (https://vborg.vbsupport.ru/showthread.php?t=241053)

dr1 04-27-2010 03:33 PM

It's relates to using the latest version of Facebook’s JavaScript SDK

http://www.allfacebook.com/2010/04/o...connect-sites/

cdoyle 04-27-2010 06:43 PM

1 Attachment(s)
I've been playing around with this a little more using the XFBML method instead of the IFrame. This allows users to enter a comment that appears on their wall, and it also enters a better description on the wall too, with your forum banner thumbnail. I've attached a screenshot of how it looks on the wall.

You'll need to register your ap, and get an ID to place into the code below.

http://developers.facebook.com/setup/

You can try it out http://www.caraudiocentral.net/forums

The thing I'm still unsure of is, sometimes I'll go back to a post and where I clicked like before, it's now saying 'be the first' when I know I clicked it earlier. So I'm not sure if FB is doing stuff on their end that is messing it up or what.

Code:

<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(40, 39))">


<p><fb:like></fb:like></p>

<div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
        FB.init({appId: 'yourappID', status: true, cookie: true,
                xfbml: true});
      };
      (function() {
        var e = document.createElement('script');
        e.type = 'text/javascript';
        e.src = document.location.protocol +
          '//connect.facebook.net/en_US/all.js';
        e.async = true;
        document.getElementById('fb-root').appendChild(e);
      }());
    </script>


</if>


cdoyle 04-29-2010 02:15 PM

Since I can't seem to create an account at the facebook developers forum, I'm hoping someone here will know.

Is there a way to see who clicked the like button?
Right now if a button says 3 people clicked this, who are the 3 people?

Gamelobby 04-29-2010 07:09 PM

Quote:

Originally Posted by hubie (Post 2026107)
Fix for private messages and first post on every first page issues:

Replace:
Code:

<if condition="!$GLOBALS['FIRSTPOSTID']">
by:
Code:

<if condition="$post[postcount] == 1">

I dont mind it being on every post, but i would like it to not show on PM's.



Quote:

Originally Posted by cdoyle (Post 2029037)
Since I can't seem to create an account at the facebook developers forum, I'm hoping someone here will know.

Is there a way to see who clicked the like button?
Right now if a button says 3 people clicked this, who are the 3 people?

Use the code for this one instead..
https://vborg.vbsupport.ru/

cdoyle 04-29-2010 07:14 PM

Quote:

Originally Posted by Gamelobby (Post 2029168)
Use the code for this one instead..
https://vborg.vbsupport.ru/

The problem with the Iframe version is it doesn't allow the user to add a comment when they click on it. So on their wall it only shows a small recent activity link.

If they add a comment, it show more on their wall. See my screenshot above.

Is there a way to use the xfbml version, and still get a count and friends who clicked with faces etc.

Stubbed 04-29-2010 11:42 PM

Changed mine to "Recommend"

I <3 Facebook.

bplinson 04-30-2010 06:13 AM

Works great.

I like this but, like other have said, it would be much better if the person could comment on the link. The way it is now it only produces a small link on the persons personal wall as "Recent Activity".

It needs to be modified so that the link appears in the "News Feed"

marshal_ramdev 04-30-2010 07:54 PM

thanks for this one mate

hubie 05-01-2010 12:36 AM

Quote:

Originally Posted by cdoyle (Post 2028234)
I've been playing around with this a little more using the XFBML method instead of the IFrame. This allows users to enter a comment that appears on their wall, and it also enters a better description on the wall too, with your forum banner thumbnail. I've attached a screenshot of how it looks on the wall.

You'll need to register your ap, and get an ID to place into the code below.

http://developers.facebook.com/setup/

You can try it out http://www.caraudiocentral.net/forums

The thing I'm still unsure of is, sometimes I'll go back to a post and where I clicked like before, it's now saying 'be the first' when I know I clicked it earlier. So I'm not sure if FB is doing stuff on their end that is messing it up or what.

Code:

<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(40, 39))">


<p><fb:like></fb:like></p>

<div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
        FB.init({appId: 'yourappID', status: true, cookie: true,
                xfbml: true});
      };
      (function() {
        var e = document.createElement('script');
        e.type = 'text/javascript';
        e.src = document.location.protocol +
          '//connect.facebook.net/en_US/all.js';
        e.async = true;
        document.getElementById('fb-root').appendChild(e);
      }());
    </script>


</if>


Thanks mate!, i put it in the first post :up:

efil 05-01-2010 04:40 AM

Hello,
Is the Add-on working with a vb 3.6?

ZapFlash 05-03-2010 12:41 AM

i installed the XFBML Method and i see the button in firefox but not in explorer, could you check that to fix it?

besides
how can i make it be in the very same line than the rest of the buttons (edit, quote, etc) because there is a jump there (looks like 2 lines and it's not even aligned to the right).

Thanks

cdoyle 05-03-2010 11:31 AM

Quote:

Originally Posted by ZapFlash (Post 2030856)
i installed the XFBML Method and i see the button in firefox but not in explorer, could you check that to fix it?

besides
how can i make it be in the very same line than the rest of the buttons (edit, quote, etc) because there is a jump there (looks like 2 lines and it's not even aligned to the right).

Thanks

Ugh, you're right. It was working in IE before, but now it's not. I swear this button has almost been more trouble than it's worth.

I'll try and take a look at it tonight, and see if I can get it working again in IE.

ZapFlash 05-04-2010 01:06 AM

i'd appreciate it, thanks :)

cdoyle 05-04-2010 02:37 AM

I got home late so couldn't mess with it much, but what I tried didn't work.
I don't get why it's not working

I've tried to register on the facebook forums, but it errors any time I try.
Does anyone else already have an account there? If you do, post the code we are using and ask why it doesn't work in IE. There has to be a reason, that we are just not seeing.

RonJH 05-04-2010 10:58 AM

It is not working in IE due to the IF condition. Try removing the IF condition and you'll notice it works fine.

Does anyone have an IF condition for post number that works in IE?

cdoyle 05-05-2010 01:02 AM

darn, if that's the case then I don't know the solution.
Anyone know why the IF doesn't work in IE?

Brandon Sheley 05-06-2010 05:58 PM

Quote:

Originally Posted by hubie (Post 2026650)
Great! but testing whit your demo i've noted that when i like the post and then go to my fb page the wall title shows the root of your forums and no the single post in particular. Maybe a miss of code there.

I've noticed that too, but it's not like that for everyone.
Some users have a link back to that thread, some don't :(
I've also noticed that on other threads it's about 50/50 if it links to that thread, or the forumhome.

:(

FiMeTi 05-07-2010 10:27 AM

Hmm... and there is no if condition to make this not show in personal messages yet? Noone fixed that? The button should not display in private messages at all. :)

kall 05-07-2010 11:51 AM

Quote:

Originally Posted by Loco.M (Post 2032713)
I've noticed that too, but it's not like that for everyone.
Some users have a link back to that thread, some don't :(
I've also noticed that on other threads it's about 50/50 if it links to that thread, or the forumhome.

:(

I've not installed this mod, but.. have you defined the og: stuff?

Try: http://www.nzboards.com/new-zealand-...t-3-5-a-90512/ (it's under the Reply to Thread/Thread Title), then check my FB profile.

;)

Quote:

Manapouri to MIlford Sound in about 3.5 hours??
www.nzboards.com
Discuss Manapouri to MIlford Sound in about 3.5 hours?? on New Zealand Boards.
a few seconds ago ? Comment ? Like ? Share

hubie 05-07-2010 01:41 PM

Quote:

Originally Posted by FiMeTi (Post 2033053)
Hmm... and there is no if condition to make this not show in personal messages yet? Noone fixed that? The button should not display in private messages at all. :)

That is already fixed, you must add the cond if like as shown in 1rst post.

cdoyle 05-08-2010 02:21 AM

has anyone came up with a way to fix the button not showing in IE?

ckelley 05-08-2010 05:06 AM

IDK, but I tried to install this exactly as the instructed, and absolutely nothing happened. I added it directly after <controls> and nothing happened, I tried the first two codes presented, and then tried the facebook generated code that cdoyle found and nothing happened. I then went to </controls> and entered them there just above that thinking maybe I misunderstood the instructions and still nothing at all happened.

I AM running 3.8.5. Here www.syntheticmotorsports.org, although that won;t due much good as it still has not effected the appearance of the site in any way after installation attempts.

t.uzuner 05-08-2010 10:44 PM

thanks thats work

ARSamo 05-09-2010 12:22 PM

Quote:

Originally Posted by kall (Post 2033077)
I've not installed this mod, but.. have you defined the og: stuff?

Try: http://www.nzboards.com/new-zealand-...t-3-5-a-90512/ (it's under the Reply to Thread/Thread Title), then check my FB profile.

;)

i want to add button like u say....
what do i do...
further more i want to add book mark, recent activity and members helpful post to every post in my forum .... define plz....
thnx in advance.......

cdoyle 05-10-2010 12:40 AM

So is this working in IE for everyone else?

ckelley 05-10-2010 01:27 PM

I can't get it to work at all, according to everything I see, it is fully installed but nothing happens. This is in FF, IMHO, no need to test IE until I get it in FF.

Brandon Sheley 05-10-2010 03:00 PM

Quote:

Originally Posted by kall (Post 2033077)
I've not installed this mod, but.. have you defined the og: stuff?

Try: http://www.nzboards.com/new-zealand-...t-3-5-a-90512/ (it's under the Reply to Thread/Thread Title), then check my FB profile.

;)

That's pretty slick, how did you do that? :)

UnganWeb 05-12-2010 11:01 PM

Quote:

Originally Posted by Loco.M (Post 2034574)
That's pretty slick, how did you do that? :)

+1.

cdoyle 05-13-2010 01:38 AM

Quote:

Originally Posted by ckelley (Post 2034545)
I can't get it to work at all, according to everything I see, it is fully installed but nothing happens. This is in FF, IMHO, no need to test IE until I get it in FF.

Not sure why FF wouldn't work, could you post the code you're currently using?

hubie 05-14-2010 12:28 AM

Here's a fix of IE issue changing some code. With this code the button is now displayed in IE browser.

Please let me know if it's working properly.

Code:

<div id="fb-root"></div> <script>
  window.fbAsyncInit = function() {
    FB.init({
      appId  : '100673979977717',
      status : true, // check login status
      cookie : true, // enable cookies to allow the server to access the session
      xfbml  : true  // parse XFBML
    });
  };
 
  (function() {
    var e = document.createElement('script');
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
  }());
</script> <fb:like layout="standard" show_faces="true" width="300" action="like" colorscheme="light" />

*Note: If you use the appId that appears in the code above, you'll get an interesting effect 'onmouseover' with the title of thread.

cdoyle 05-14-2010 02:13 AM

I thought the problem with the IE code was the if statement for displaying only on the first thread? At least I thought that's what someone said earlier. Does the code above solve that too?

hubie 05-14-2010 05:05 AM

Quote:

Originally Posted by cdoyle (Post 2036702)
I thought the problem with the IE code was the if statement for displaying only on the first thread? At least I thought that's what someone said earlier. Does the code above solve that too?

I don't think the problem was the variable "if", since I'm currently using it with IE and the problem is solved by changing the code such as above.

imedic 05-14-2010 09:35 AM

It seems I have same problem of not showing the button. Is probably a conflict with other mods installed. I put it on a forum without Chief First post mod and still not working.
I am thinking of Topic of the month, or quote post on PM mods but is just a guess.
I am looking for having this mod on my forums...
Nice mod.

@ Hubie - Your modification does not work in FF but work in IE. It mislead me the mod is not working.
I am using last version of FF and forum is 3.8.4 with lots of mods.

edit: Am I dumm or what: Remember to tell No script in Firefox to let facebook.net or you won't see the button.
@ Hubie - Your modification works both in IE and FF! Great, thanks.

Deimos 05-15-2010 12:00 PM

Quote:

Originally Posted by hubie (Post 2036675)
Here's a fix of IE issue changing some code. With this code the button is now displayed in IE browser.

Please let me know if it's working properly.

Code:

<div id="fb-root"></div> <script>
  window.fbAsyncInit = function() {
    FB.init({
      appId  : '100673979977717',
      status : true, // check login status
      cookie : true, // enable cookies to allow the server to access the session
      xfbml  : true  // parse XFBML
    });
  };
 
  (function() {
    var e = document.createElement('script');
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
  }());
</script> <fb:like layout="standard" show_faces="true" width="300" action="like" colorscheme="light" />

*Note: If you use the appId that appears in the code above, you'll get an interesting effect 'onmouseover' with the title of thread.


I'm using the second bit of code from the original post, which works AOK in firefox, where do I go about putting the IE code pasted above?

Also, I notice some threads properly relay their title to Facebook, but some do not
I'm using VBSeo, so thought it might be that, but it seems odd that two threads in the same forum, have different results.

Xencored 05-15-2010 12:43 PM

Quote:

Originally Posted by kall (Post 2033077)
I've not installed this mod, but.. have you defined the og: stuff?

Try: http://www.nzboards.com/new-zealand-...t-3-5-a-90512/ (it's under the Reply to Thread/Thread Title), then check my FB profile.

;)

What code did you use mate to get it to work like that
It show awesome on my facebook page after i click "like"
Thanks

cdoyle 05-15-2010 01:06 PM

hmm, I still can't get this to work in IE.

I am now using this

Code:

<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(40, 39))">


<div id="fb-root"></div> <script>
  window.fbAsyncInit = function() {
    FB.init({
      appId  : 'xxxxxxxxxxxxxx',
      status : true, // check login status
      cookie : true, // enable cookies to allow the server to access the session
      xfbml  : true  // parse XFBML
    });
  };
 
  (function() {
    var e = document.createElement('script');
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
  }());
</script> <fb:like layout="standard" show_faces="true" width="300" action="like" colorscheme="light" />


</if>

seems to work fine in FF, but IE nothing appears at all? Any ideas?

Devanand 05-16-2010 06:36 AM

Quote:

Originally Posted by cdoyle (Post 2037360)
hmm, I still can't get this to work in IE.

I am now using this

Code:

<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(40, 39))">


<div id="fb-root"></div> <script>
  window.fbAsyncInit = function() {
    FB.init({
      appId  : 'xxxxxxxxxxxxxx',
      status : true, // check login status
      cookie : true, // enable cookies to allow the server to access the session
      xfbml  : true  // parse XFBML
    });
  };
 
  (function() {
    var e = document.createElement('script');
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
  }());
</script> <fb:like layout="standard" show_faces="true" width="300" action="like" colorscheme="light" />


</if>

seems to work fine in FF, but IE nothing appears at all? Any ideas?

I did same thing and have same problem....still nothing to show in IE.

cdoyle 05-16-2010 01:58 PM

I tried the demo out again, and it's not showing in IE either.

Monkeylord 05-17-2010 04:23 PM

IE fix seems to be working fine for me, although the "Like" button seems to be showing up twice when I checked in Chrome. Not tried any other browsers yet though.

Monkeylord 05-19-2010 09:11 AM

Spoke to soon, seems the IE fix isn't working properly for me. Everything comes up fine, but between navigating away from the page and returning the FB button seems to have forgotten that I "Like" the thread, and goes back to asking me to be the first of my friends to like it again.

Frustrating!

Also, when it posts a comment to my wall it grabs the first image it can find on the page... which is always a box-corner!


All times are GMT. The time now is 10:40 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.01668 seconds
  • Memory Usage 1,857KB
  • 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
  • (8)bbcode_code_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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