![]() |
Add New Facebook "Like" Button and Social Plugins (and OpenGraph to Headinclude)
1 Attachment(s)
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 : Quote:
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: PHP Code:
PHP Code:
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: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
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: Code:
<div style="padding: 5px; border: 1px solid #3F6F81; background: #ffffff; font-size: 10px; width: 300px;"> 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 - Quote:
Quote:
Find: PHP Code:
PHP Code:
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. [s]I intend to add the tags to other pages,[/s] 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. |
vBSEO Owners - there's a small issue with the standard version of this Modification. I will release a vBSEO compatible version over at vBSEO.com later. :)
|
Wow this is a mod you must have. Thanks.
|
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. |
Quote:
|
Quote:
|
Downloaded and Installed.
Working apart from ( dont really understand how it appears ) the Activity and Recommendation Streams in first and last post |
I like the comment part, otherwise I don't see much difference in the other version. (example here)
It's good to see new releases Kall :) |
In fact we had Facebook connect disabled.
Soon as I re-enabled it, this modification stopped working |
Quote:
@comments about the activity streams - They're under the 'What's Next' for a reason.. ;) |
Quote:
(That, and the fact that this is an Options-controlled automatic template insertion..and at last look, the other one was the iframe version. :P ) |
Quote:
|
I suppose I could make one, for you.
|
This is awesome! I am with Loco.M on a request for a 3.8 version please!
|
Well. Not quite 'popular' demand, but 2 is enough for me.
https://vborg.vbsupport.ru/showthread.php?t=242536 :) 3.8.4 version. I really just whipped it up quickly, so please advise of any issues. |
thank you
|
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. |
creates serious lag issues
|
Awesome
is there anyway to get this to work on Album images and blogs? i have a working CMS one Thanks again |
Quote:
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. |
Quote:
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 :D thought you should know if you didnt :) |
Quote:
I have the vBSEO version ready to go, but now I have to work on the non-vBSEO'd one. |
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 |
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 ) |
Quote:
*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.) |
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. :) ) |
thanks its working good on my forum vb4,3
|
is there a sollution for vbseo users?
I can't see the like button there is a empty container without the like button |
Awesome Kall!
Is it ok to add the code PHP Code:
Thanks dam so close to what i was after added that code to album and blog pages didnt work :( |
Quote:
*edit* You do have to put the code in the navbar template at the moment... |
Quote:
thats why its not working than |
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.) |
Quote:
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 |
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:
PHP Code:
|
Quote:
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:
Thanks again Kall <3 |
Quote:
|
Quote:
Quote:
|
Quote:
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> |
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? |
Quote:
|
All times are GMT. The time now is 06:27 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|