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)
-   -   Miscellaneous Hacks - Add New Facebook "Like" Button to Threads and OpenGraph to Headinclude Automatically (https://vborg.vbsupport.ru/showthread.php?t=242536)

kall 05-17-2010 05:39 PM

Quote:

Originally Posted by Loco.M (Post 2038629)
could you check out my question about adding this in the postbit template


and how do we get our ID's
FB - Page Admins - A comma-separated list of the Facebook IDs of the Admins of your pages on Facebook.
my account is facebook.com/username/

Sorry dude, that super important request to cache two templates took precedence. :(

When you say postbit, do you mean every post, or are you going to conditional it to only appear in the first one (the reason it is in navbar is because the entire purpose of the Like button under current functionality is to Like the *page* that one is visiting. Putting it in a single post will result in multiple Like URLs for the resource (as that post can be visited via showpost.php or showthread.php among others), and putting it in every post won't work at all on showthread.php)?

kall 05-17-2010 05:40 PM

The ID is (as it should mention in the AdminCP bit) found by mousingover your avatar (usually, works for me anyway), or going into your Albums and looking for the common string of numbers that appears on each.

Brandon Sheley 05-17-2010 05:42 PM

I understand, no rush on my part :)
I have the first post conditioned out in the postibit template (see example)
This version seems to take a while to load, I may just revert back and use the small "like" button/count.

thx, found my ID

kall 05-17-2010 05:57 PM

Re it being slow: Conversation here seems to indicate using the FBML makes it faster than the iframe version: http://wiki.developers.facebook.com/...Talk:Fb:iframe

It should be possible to change the button to use the iframe though, keeping all the opengraph stuff.

In ogfb_like_showthread, delete everything and replace with this:

Code:

<div style="padding: 5px; border: 1px solid #3F6F81; background: #ffffff; font-size: 10px; width: 300px;">
<iframe src="http://www.facebook.com/plugins/like.php?href=$vboptions[bburl]/showthread.php?t=$thread[threadid]&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
</div>

Obviously though, by doing this we lose the app_id detail. Let me know how it works for you.

kall 05-17-2010 06:33 PM

To make the button display on other templates

Change the hook that the OpenGraph/Facebook Integration - SHOWTHREAD variables plugin executes on to an applicable hook.

(postbit - postbit_display_complete. or chuck it in global_start or something that's called on every page.)

Brandon Sheley 05-17-2010 06:58 PM

Thanks, checking it out now

still not working, I'll play around with this tonight

thx for the help Kall

kall 05-17-2010 07:07 PM

How's it not working man? Gimme a URL.

There is the issue of 'vBSEO needs to use slightly different code' and 'Brandon made me change my plugins while I had the flu' clouding the waters somewhat. :)

Brandon Sheley 05-18-2010 02:18 AM

Quote:

Originally Posted by kall (Post 2038685)
and 'Brandon made me change my plugins while I had the flu' clouding the waters somewhat. :)

aww, sorry man :o
hope you get feeling better
I posted a link a few post up

I'll play with it again, but I had tried placing the $ogfb_like_showthread in my postbit template along with the digg, twitter and stumble one
and tried changing the hook location to the 2 you suggested and nothing showed.
I moved $ogfb_like_showthread back in the showthread template, and it shows.

I just about have it how I want it, thanks for the help :)

staticrebelle 05-18-2010 03:14 PM

Quote:

Originally Posted by kall (Post 2038614)
That's weird.. this mod was developed on a 3.8 forum running vBSEO.

Could you maybe provide a link to a page where it's like that, or the source code of the area?

Hope this helps :)

http://www.avrilbandaids.com/forums/...ound-site.html

You can see the white box above the reply button.

kall 05-18-2010 05:29 PM

Ahh. One question - are you currently running YAFB or the default 4.0.3 Facebook Connect?

They're not compatible :( You would need to use the iframe code rather than the FBML version.


All times are GMT. The time now is 02:50 PM.

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.01240 seconds
  • Memory Usage 1,740KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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