vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Integration with vBulletin - Add New Facebook "Like" Button and Social Plugins (and OpenGraph to Headinclude) (https://vborg.vbsupport.ru/showthread.php?t=242525)

Xencored 05-16-2010 07:17 PM

Quote:

Originally Posted by kall (Post 2038075)
That was the plan.. how 'doesnt it work'?

*edit* You do have to put the code in the navbar template at the moment...

Dam i dont want it in the navbar :/

thats why its not working than

kall 05-16-2010 07:33 PM

It doesn't really *look* like it's in the navbar, not in the traditional sense like a button..

http://www.nzboards.com/the-lounge/r...on-sale-90544/ - see it there? That's not cool? :(

Where did you want it exactly? I'm in the beginnings of a nasty head cold, so I'll try to see how to explain it. (Basically, you should be able to get it to display in any template by adding that template to the PreRegister stuff in the plugins.)

Xencored 05-16-2010 07:44 PM

Quote:

Originally Posted by kall (Post 2038087)
It doesn't really *look* like it's in the navbar, not in the traditional sense like a button..

http://www.nzboards.com/the-lounge/r...on-sale-90544/ - see it there? That's not cool? :(

Where did you want it exactly? I'm in the beginnings of a nasty head cold, so I'll try to see how to explain it. (Basically, you should be able to get it to display in any template by adding that template to the PreRegister stuff in the plugins.)

Ah i see
well am trying to add it in
Template: blog_show_entry (id: 1924)
Template: album_pictureview (id: 1926
Template: postbit_legacy (id: 1809)
Template: vbcms_content_article_page (id: 1925)
Template: 8WR_media_details (id: 2407)
Sorry about your head
Tho my head has been killing me all this week trying to get this to work also
So i feel your pain lol

Thanks again
Kall

If you could give me a example of one of those am sure will pick it up ok / or maybe not :D

kall 05-16-2010 07:51 PM

postbit_legacy? *sigh* That other mod has totally corrupted everyone. It's not supposed to be for the post.. unless it's showpost.php, it's supposed to be for the page. (If you wanted it on every post, it can't.. because it would show the same 'page' for every post and the click would give the Like to that page, not the individual post.)

Having said that..

Under this line in the Navbar and Metatag plugins:
PHP Code:

vB_Template::preRegister('blog_entry',array('facebook_liked_url' => $facebook_liked_url)); 

Try adding:
PHP Code:

vB_Template::preRegister('blog_show_entry',array('facebook_liked_url' => $facebook_liked_url)); 

(adding whatever template you want it to show in.)

Xencored 05-16-2010 08:03 PM

Quote:

Originally Posted by kall (Post 2038102)
postbit_legacy? *sigh* That other mod has totally corrupted everyone. It's not supposed to be for the post.. unless it's showpost.php, it's supposed to be for the page. (If you wanted it on every post, it can't.. because it would show the same 'page' for every post and the click would give the Like to that page, not the individual post.)

Having said that..

Under this line in the Navbar and Metatag plugins:
PHP Code:

vB_Template::preRegister('blog_entry',array('facebook_liked_url' => $facebook_liked_url)); 

Try adding:
PHP Code:

vB_Template::preRegister('blog_show_entry',array('facebook_liked_url' => $facebook_liked_url)); 

(adding whatever template you want it to show in.)

Awesome and sorry about the postbit_legacy it worked so didnt think anything was wrong :o
Thanks for the code above, Now i just want to see if i got this right :D
Lets say am doing this one "8WR_media_details"

PHP Code:

vB_Template::preRegister('8WR_media_details',array('facebook_liked_url' => $facebook_liked_url)); 

Just add that same as you just said?
Thanks again Kall <3

kall 05-16-2010 08:05 PM

Quote:

Originally Posted by Animemike (Post 2038112)
Awesome and sorry about the postbit_legacy it worked so didnt think anything was wrong :o
Thanks for the code above, Now i just want to see if i got this right :D
Lets say am doing this one "8WR_media_details"

PHP Code:

vB_Template::preRegister('8WR_media_details',array('facebook_liked_url' => $facebook_liked_url)); 

Just add that same as you just said?
Thanks again Kall <3

That should do it.. I'm not entirely happy with the way I have coded it, it's all probably doubled-up and not needed in both, but hey.. it's Beta, and as long as it works, right? :)

kall 05-16-2010 08:21 PM

Quote:

Originally Posted by hornstar1337 (Post 2037151)
It this not going to be default in vb4.0.4?
thanks for taking the time, but I just feel it will be here in less then a month.

Here's the source - Adrian's blog:
Quote:

Open Graph and Social Plug-ins
Facebook has come up with a protocol that allows external webpages to fit into their social graph model using meta tags. The basic idea behind Open Graph is that web publishers can add certain meta tags to their webpages that will classify the page according to FB's graph schema. Then, the publisher can add a social plug-in, like the "Like Button" to this web page. The web page then becomes a part of Facebook's social graph, and user's can "Like" your webpage, and it will show up in the user's "About Me" section classified by the meta tags from the page. There are many ways we can leverage this functionality with vBulletin, but off the top of my head I believe we can classify threads, blog posts, and articles with dynamic meta data about the content, add a plug-in (configurable from admincp of course), and allow users to share and discuss vB content from within Facebook. While this may seem like we lose traffic to Facebook, it will actually make vBulletin activity more visible, and should increase participation on the vBulletin boards.
http://developers.facebook.com/docs/opengraph
http://developers.facebook.com/docs/...e/plugins/like

Xencored 05-16-2010 08:38 PM

Quote:

Originally Posted by kall (Post 2038113)
That should do it.. I'm not entirely happy with the way I have coded it, it's all probably doubled-up and not needed in both, but hey.. it's Beta, and as long as it works, right? :)

Dont work mate :/ tryed all the templates i listed using
Just dont show the button

Code:

<vb:if condition="THIS_SCRIPT != 'login' AND THIS_SCRIPT != 'private' AND THIS_SCRIPT != 'register' AND THIS_SCRIPT != 'usercp' AND THIS_SCRIPT != 'faq' AND THIS_SCRIPT != 'search' AND THIS_SCRIPT != 'newreply' AND THIS_SCRIPT != 'newthread' AND THIS_SCRIPT != 'sendmessage' AND THIS_SCRIPT != 'payments'">{vb:raw fbog_likebutton}</vb:if>
Too add the button

kall 05-16-2010 08:47 PM

Try just {vb:raw fbog_likebutton} (the conditional is because it's in navbar).

Did you add the new line for the template to both plugins?

Xencored 05-16-2010 08:53 PM

Quote:

Originally Posted by kall (Post 2038130)
Try just {vb:raw fbog_likebutton} (the conditional is because it's in navbar).

Did you add the new line for the template to both plugins?

Yea i added them to both mate and that didnt work also :(


All times are GMT. The time now is 04:21 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.01520 seconds
  • Memory Usage 1,764KB
  • 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_php_printable
  • (8)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