Back to vBulletin 3.8 Add-ons

Add New Facebook "Like" Button to Threads and OpenGraph to Headinclude Automatically
Mod Version: 0.2.1, by kall

vB Version: 3.8.4 Rating: (1 vote - 4.00 average) Installs: 27
Released: 15 May 2010 Last Update: 16 May 2010 Downloads: 216
Not Supported Uses Plugins Template Edits External Content Is in Beta Stage  

From http://opengraphprotocol.org/ :
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/".
This modification will add these tags to all pages, and the <og:title> attribute to your SHOWTHREAD pages (for the moment.. additional Pages to be added soon), along with the Facebook 'https://developers.facebook.com/docs/reference/plugins/like' under the Thread Title (as we are supposed to put the Like button next to the thing the person is Liking).

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 SHOWTHREAD, find:
PHP Code:
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]
Replace with:
PHP Code:
<html xmlns="http://www.w3.org/1999/xhtml" <if condition="$vboptions['ogfb_onoff']">xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" </if>dir="$stylevar[textdirection]
Find:
PHP Code:
$headinclude 
Add under:
PHP Code:
$ogfb_metadata 
Wherever you want to add the Like Button, add
PHP Code:
$ogfb_like_showthread 
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 - App ID - The application ID of your https://www.facebook.com/developers/apps.php.
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 (Showthread at the moment) to be referenced in the Open Graph.

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:

http://www.nzboards.com/members/kall/ - Like for Member Profiles
http://www.nzboards.com/the-lounge/rwc-tickets-are-on-sale-90544/ - Activity and Recommendation Streams in first and last post.

(4.0.3 Version here: Add New Facebook "Like" Button and Social Plugins (and OpenGraph to Headinclude))

Download

File Type: %1$s product-nzb_fbopengraph-3.8-v0.2.1.xml (4.7 KB, 209 downloads)

Similar Mods

Integration with vBulletin Add New Facebook "Like" Button and Social Plugins (and OpenGraph to Headinclude) vBulletin 4.x Add-ons

vblts.ru supports vBulletin®, 2022-2024