Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Add New Facebook "Like" Button and Social Plugins (and OpenGraph to Headinclude) Details »
Add New Facebook "Like" Button and Social Plugins (and OpenGraph to Headinclude)
Mod Version: 0.7, by kall (Coder) kall is offline
Developer Last Online: Sep 2016 I like it Show Printable Version Email this Page

vB Version: 4.0.3 Rating: (3 votes - 5.00 average) Installs: 25
Released: 15 May 2010 Last Update: 17 May 2010 Downloads: 201
Not Supported Uses Plugins Template Edits Auto-Template External Content  

This modification will add OpenGraph tags to all pages, adding your Content pages to the Open Graph, along with the Facebook 'Like Button' under the navbar for all 'Content' pages.

What does this mean? If you have a Facebook Profile you may have noticed the new layout, where things that you 'like' are arranged by 'type'. Adding OpenGraph tags ensures you will have your pages properly classified and included.

From The Open Graph Protocol :
The Open Graph protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to enable any web page to have the same functionality as a Facebook Page.
Basic metadata
To turn your web pages into graph objects, you need to add basic metadata to your page. We've based the initial version of the protocol on RDFa which means that you'll place additional <meta> tags in the <head> of your web page. The four required properties for every page are:

og:title - The title of your object as it should appear within the graph, e.g., "The Rock".
og:type - The type of your object, e.g., "movie". Depending on the type you specify, other properties may also be required.
og:image - An image URL which should represent your object within the graph.
og:url - The canonical URL of your object that will be used as its permanent ID in the graph, e.g., "http://www.imdb.com/title/tt0117500/".
Install Instructions:
AdminCP - Plugins & Products - Manage Products - [Add/Import Product] , browse to the location of the .xml file you downloaded from this thread, Import it.
Template Modifications
In whichever Templates you wish to have all Features (OpenGraph), you need to add the xmlns to the head.

ie:, find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

(If there is a way to do this with plugins that wont cause major issues, someone tell me so I can make it happen that way. )

Titles
These should be part of the meta tag template that gets plugged in, but figuring out how to pass these variables is lower priority to getting this modification stable, so you need to add them in the templates.

ie: in SHOWTHREAD, find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Add under:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

in FORUMDISPLAY, find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Add under:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

in MEMBERINFO, find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Add under:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

To add the Like Button, in navbar, find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

add under:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

For sites running any form of Facebook Connect - You must use iFrame

Due to the new SDK not yet having Connect, and the 2 flavours of FB not mixing with each other, if you want to use Connect, you have to forgo the extra features of the SDK version that this modification ships with. 0.7 now has logic to show either or, depending on whether you have vB's native FB Connect turned on.

If you don't want to upload to v0.7+ (or are using YAFB or another Connect), replace the content of fbog_like_showthread with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Configuration Instructions
AdminCP - Settings - Options - Opengraph/Facebook Integration
Global On/Off - Set to Yes to turn the system on.
FB - Page Admins - A comma-separated list of the Facebook IDs of the Admins of your pages on Facebook.
FB - API Key - The API Key of your Facebook Application.
OG - Site Name - A short, human-readable name for your site that will appear in the Like on the User's Facebook Activity Stream.

It is important to fill in these, as they are used by FB to fill in some of the information, and allows your pages to be referenced in the Open Graph.

New in Latest Version
Activity Stream -
The Activity Feed plugin displays the most interesting recent activity taking place on your site. Since the content is hosted by Facebook, the plugin can display personalized content whether or not the user has logged into your site. The activity feed displays stories both when users like content on your site and when users share content from your site back to Facebook. If a user is logged into Facebook, the plugin will be personalized to highlight content from their friends. If the user is logged out, the activity feed will show recommendations from your site, and give the user the option to log in to Facebook.

The plugin is filled with activity from the user's friends. If there isn't enough friend activity to fill the plugin, it is backfilled with recommendations. If you set the recommendations param to true, the plugin is split in half, showing friends activity in the top half, and recommendations in the bottom half. If there is not enough friends activity to fill half of the plugin, it will include more recommendations.
Recommendations Box -
The Recommendations plugin shows personalized recommendations to your users. Since the content is hosted by Facebook, the plugin can display personalized recommendations whether or not the user has logged into your site. To generate the recommendations, the plugin considers all the social interactions with URLs from your site. For a logged in Facebook user, the plugin will give preference to and highlight objects her friends have interacted with.

You specify a site for which to show recommendations for. The domain is matched exactly, so a plugin with site=facebook.com would not include URLs from developers.facebook.com. You cannot currently aggregate across multiple domains.
Both of these options have an on/off toggle in the main FB/OG Options, and are currently manual template placements in postbit or postbit legacy.

Find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Demo of how they will look: http://www.nzboards.com/the-lounge/r...on-sale-90544/

Changelog.
0.7 - 19.05.2010
"Recommendations actually works, and iFrame version for Connect Users" Version.

0.6 - 18.05.2010
"Removing extra, unnecessary code" Version.

0.5 - 16.05.2010
"Activity and Recommendations" Version.

0.4 - 16.05.2010
"Content Pages" Version.
Both plugins moved to parse_templates so as to work on CMS (and to futureproof?)

0.3 - Unreleased
"Content Pages.. but not CMS? It's CALLED content for God's sake! Ahh. global_start isn't called on the CMS." Version.

0.2 - Unreleased
"Why won't it work on the bloody.. oh, I was changing plugins on the vbseo site version. Lets just throw everything into all the plugins and cross our fingers" Version.

0.1 - 15.05.2010
Initial Release.
Works on Showthread only


What's Next?
This is an early beta release to gauge the interest in Open Graph/Facebook type stuff.
I intend to add the tags to other pages, and implement some of the other Facebook Social Plugins. These will all be On/Off configurable. Some can be seen in action at:

View Profile: kall - New Zealand Boards - Like for Member Profiles
http://www.nzboards.com/the-lounge/r...on-sale-90544/ - Activity and Recommendation Streams in first and last post.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	showthread-notliked.jpg
Views:	2054
Size:	19.8 KB
ID:	117110   Click image for larger version

Name:	showthread-liked.jpg
Views:	1868
Size:	44.0 KB
ID:	117111   Click image for larger version

Name:	fb-stream.jpg
Views:	1589
Size:	18.4 KB
ID:	117112   Click image for larger version

Name:	fb-comment.jpg
Views:	1446
Size:	22.2 KB
ID:	117113  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #16  
Old 15 May 2010, 09:22
saadessa's Avatar
saadessa saadessa is offline
 
Join Date: Jan 2008
Real name: saad essa alfallah
thank you
Reply With Quote
  #17  
Old 16 May 2010, 04:01
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Real name: Blue
Hi Kall, sorry havent responded sooner.

Working away at the coast this weekend, and on laptop.

Users report:
1. we are getting stack over flow ( possibly unrelated )
2. yep using stock vb facebook integration.
3. i have disabled all hooks for time being.

4. we are actually having some weird occurences.

All usergroups now see ads lol.
Plus when we click a link, chrome or firefox try to download the page !!
Reported this on vb , i think it is a mysql error on our site

Will try again later, but GREAT hack.
__________________

My Hacks [ click ] | Steve ~ Administrator for British Expats AustraliaBound.org/forum | Test our forum - user; don pass; pass123
Sports Tipping Mod - coming February 2010 ~ Show your Interest !
Reply With Quote
  #18  
Old 16 May 2010, 05:11
daveaite's Avatar
daveaite daveaite is offline
 
Join Date: Jul 2009
Real name: David
creates serious lag issues
__________________

Introducing vBSocial 10
Reply With Quote
  #19  
Old 16 May 2010, 05:35
Xencored Xencored is offline
 
Join Date: Sep 2008
Real name: Mike
Awesome
is there anyway to get this to work on Album images and blogs?
i have a working CMS one

Thanks again
Reply With Quote
  #20  
Old 16 May 2010, 06:23
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Real name: Ace
Originally Posted by Animemike View Post
Awesome
is there anyway to get this to work on Album images and blogs?
i have a working CMS one

Thanks again
There is, I'm working on that.

Early warning: If you are using Standard URLs, you're going to end up pulling your hair out. FB will treat all the different URLs as different pages, so the Like figures wont show right at all.

@TFAu: It will be related to the xmlns stuff in the head, I would guess. YAFB has the same problem.
__________________
vBulletin Styles (All styles compatible with 3.8.4 - Steel Blue 4.0 Available) | vBulletin Hosting
Reply With Quote
  #21  
Old 16 May 2010, 06:31
Xencored Xencored is offline
 
Join Date: Sep 2008
Real name: Mike
Originally Posted by kall View Post
There is, I'm working on that.

Early warning: If you are using Standard URLs, you're going to end up pulling your hair out. FB will treat all the different URLs as different pages, so the Like figures wont show right at all.

@TFAu: It will be related to the xmlns stuff in the head, I would guess. YAFB has the same problem.
Indeed ive been trying to do this for days gettting it work on albums and blogs am sure you can do it

How can i move the Button /box mate. I have i place am after adding it

Thanks again

P.S also Kall on your site when looking at a profile i see "Two" Like buttons thought you should know if you didnt
Reply With Quote
  #22  
Old 16 May 2010, 08:11
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Real name: Ace
Originally Posted by Animemike View Post
How can i move the Button /box mate. I have i place am after adding it

P.S also Kall on your site when looking at a profile i see "Two" Like buttons thought you should know if you didnt
Those 2 things would be related... I'm about to release a version that just goes in the navbar and shows on all 'content' pages. I've restricted it with the standard THIS_SCRIPT conditionals that one should use for Ads. (but not removed the old one from the MEMBERINFO template )

I have the vBSEO version ready to go, but now I have to work on the non-vBSEO'd one.
__________________
vBulletin Styles (All styles compatible with 3.8.4 - Steel Blue 4.0 Available) | vBulletin Hosting
Reply With Quote
  #23  
Old 16 May 2010, 08:12
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Real name: Blue
Cheers Kall.

I have never had the YAFB , but .. I know couple of weeks ago, we did a php rollback, to get ioncube working. We have now re-upgraded to latest php.

I will give this hack another go.

Cheers. Ste
__________________

My Hacks [ click ] | Steve ~ Administrator for British Expats AustraliaBound.org/forum | Test our forum - user; don pass; pass123
Sports Tipping Mod - coming February 2010 ~ Show your Interest !
Reply With Quote
  #24  
Old 16 May 2010, 08:18
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Real name: Blue
Ok done some digging the file that keeps being downloaded, when we are on webpages is receiver.php

Which is the facebook file.
Why on earth.... grrrr ( gonna have to submit support ticket with vb )
__________________

My Hacks [ click ] | Steve ~ Administrator for British Expats AustraliaBound.org/forum | Test our forum - user; don pass; pass123
Sports Tipping Mod - coming February 2010 ~ Show your Interest !
Reply With Quote
  #25  
Old 16 May 2010, 08:18
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Real name: Ace
Originally Posted by TimberFloorAu View Post
Cheers Kall.

I have never had the YAFB , but .. I know couple of weeks ago, we did a php rollback, to get ioncube working. We have now re-upgraded to latest php.

I will give this hack another go.

Cheers. Ste
If it's not working, check the source of a page, look in the very top part. If what I am guessing is true, there'll be a double-up/screwup in there somewhere.

*edit* This modification *does* mess with that stuff in the header.. I have tried to make it non-breaking using conditionals, but yeah.. (it's been a while since I made anything.)
__________________
vBulletin Styles (All styles compatible with 3.8.4 - Steel Blue 4.0 Available) | vBulletin Hosting
Reply With Quote
  #26  
Old 16 May 2010, 09:12
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Real name: Ace
Version 0.4 uploaded - to uninstall, remove the like code from SHOWTHREAD and import the 0.4 product.

This one works on all 'content' pages, comes in the navbar (you need to add the code. )
__________________
vBulletin Styles (All styles compatible with 3.8.4 - Steel Blue 4.0 Available) | vBulletin Hosting
Reply With Quote
  #27  
Old 16 May 2010, 09:15
ellinofatsa's Avatar
ellinofatsa ellinofatsa is offline
 
Join Date: Mar 2010
thanks its working good on my forum vb4,3
Reply With Quote
  #28  
Old 16 May 2010, 13:38
mediax mediax is offline
 
Join Date: Dec 2004
is there a sollution for vbseo users?

I can't see the like button there is a empty container without the like button

Last edited by mediax; 16 May 2010 at 14:22.
Reply With Quote
  #29  
Old 16 May 2010, 15:11
Xencored Xencored is offline
 
Join Date: Sep 2008
Real name: Mike
Awesome Kall!

Is it ok to add the code


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

on the pages i want and it will work fine?
Thanks

dam so close to what i was after added that code to album and blog pages didnt work

Last edited by Xencored; 16 May 2010 at 18:43.
Reply With Quote
  #30  
Old 16 May 2010, 20:10
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Real name: Ace
Originally Posted by Animemike View Post
Awesome Kall!

Is it ok to add the code


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

on the pages i want and it will work fine?
Thanks

dam so close to what i was after added that code to album and blog pages didnt work
That was the plan.. how 'doesnt it work'?

*edit* You do have to put the code in the navbar template at the moment...
__________________
vBulletin Styles (All styles compatible with 3.8.4 - Steel Blue 4.0 Available) | vBulletin Hosting
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 04:08.

Layout Options | Width: Wide Color: