Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Facebook / Open Graph (og:description) / (og:title) tag fixes for VB 4.1.10+ by BOP5 Details »
Facebook / Open Graph (og:description) / (og:title) tag fixes for VB 4.1.10+ by BOP5
Mod Version: 1.2.0, by BirdOPrey5 (IB Staff) BirdOPrey5 is offline
Developer Last Online: Jun 2019 I like it Show Printable Version Email this Page

vB Version: 4.1.10 Rating: (10 votes - 5.00 average) Installs: 67
Released: 29 Nov 2013 Last Update: 11 Dec 2013 Downloads: 318
Supported Uses Plugins  

Brought to you by BirdOPrey5 / Qapla.com.

For some reason vBulletin 4.x does not use the thread's meta description when populating the open graph "description" tag that is read by Facebook and other social networking sites. Instead by default vBulletin uses your site default meta description that is set in Admin CP -> Settings -> Options -> Site Name / URL / Contact Details.

This default description is usually very generic whereas the thread description is the first few sentences of the thread and therefore usually far more useful to describe the page actually being shared than your generic site description.

Also even with the Facebook Platform enabled vBulletin doesn't provide an open graph title tag at all- while in practice this isn't a big deal as Facebook will default to the page title, as a matter of good practice it should be explicitly provided.

This mod fixes both issues. It will override the generic description with the thread's meta description which is based on the text of the first post. It also adds an explicit og:title tag.

New In Version 1.2.0 - The mod now also greatly improves the open graph tag description tag for blog entries. By default the description tag is the blog title followed by the username of the blog poster. With this mod the description becomes up to a 300 character preview of the actual blog entry instead. And the open graph title tag provided takes the form of blog title Posted By username.

Blog Demo: http://www.totallycommercials.com/en...ckbuster-Video
Thread Demo: http://www.totallycommercials.com/sh...how-Commercial
(View page source or better yet, share on Facebook to see the differences. )

This mod is only for people with VB 4.1.10 or higher and only if you have the Facebook Platform enabled in your settings. It will do nothing if both of those do not apply to you.

There are no settings- just install the product and the mod is active.

To see the difference use the Facebook Debugger to look at the content scraped off a thread page before and after instillation-
Facebook Debugger is here: https://developers.facebook.com/tools/debug

------------------------------------------------------

Please "Mark as Installed" if you use this.
Donations always appreciated.
Nominate MOTM if you LOVE it!

Download Now

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

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.
Similar Mod
Mod Developer Type Replies Last Post
Integration with vBulletin More Open Graph Images (Free) by BOP5 BirdOPrey5 vBulletin 4.x Add-ons 76 22 Mar 2019 19:29

  #16  
Old 14 Dec 2013, 12:01
Spangle Spangle is offline
 
Join Date: Jun 2011
I've got a 4.2.2 forum, and have just installed this, but it doesn't seem to be working, I've gone from the Thread title to the URL and from the generic meta description to nothing !

https://www.facebook.com/groups/footballounge/
Reply With Quote
  #17  
Old 14 Dec 2013, 14:12
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Spangle View Post
I've got a 4.2.2 forum, and have just installed this, but it doesn't seem to be working, I've gone from the Thread title to the URL and from the generic meta description to nothing !

https://www.facebook.com/groups/footballounge/
The Facebook Debugger says the problem is your Facebook Image-

https://developers.facebook.com/tool...Carroll-regret

The image must be a full absolute URL, with the http at the front, not the relative path you have.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #18  
Old 14 Dec 2013, 14:39
Spangle Spangle is offline
 
Join Date: Jun 2011
Originally Posted by BirdOPrey5 View Post
The Facebook Debugger says the problem is your Facebook Image-

https://developers.facebook.com/tool...Carroll-regret

The image must be a full absolute URL, with the http at the front, not the relative path you have.
Thats fixed it thanks !
Reply With Quote
  #19  
Old 14 Dec 2013, 14:39
Dilldogs Dilldogs is offline
 
Join Date: May 2006
Real name: Don
I am using vb 4.1.7 is there anyway you could get this to work for 4.0 and higher?
__________________
[]
Reply With Quote
  #20  
Old 14 Dec 2013, 16:59
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Dilldogs View Post
I am using vb 4.1.7 is there anyway you could get this to work for 4.0 and higher?
The problem is the hook this runs on does not exist in the code until 4.1.1.0.

If You want I suppose you can add the hook manually.

You'll need to edit 2 things.

First, edit your includes/functions_facebook.php file

Find the line:

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

And directly ABOVE that add the line:

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

Then save and re-upload the file. I suggest you rename the original on your server so you have a backup before you upload the changed file. Rename if to something like functions_facebook_old.php (make sure you keep the .php extension)

Then edit this product's .xml file before you import it to product manager.

Find:

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

and change it to


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

and save the file and import it.

It *should* work.

Also note- you'll never be able to edit the plugin in plugin manager because your vBulletin version doesn't know the hook exists and won't let you re-save the plugin in the correct hook. Not that you should have any reason to edit the plugin, just keep it in mind.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #21  
Old 22 Dec 2013, 22:15
RamdonGhai RamdonGhai is offline
 
Join Date: Mar 2009
How can we get this to work with CMS articles. Why would someone overlook something like this?
Reply With Quote
  #22  
Old 23 Dec 2013, 02:56
RamdonGhai RamdonGhai is offline
 
Join Date: Mar 2009
edit* I tried to do it came to a fail, and then saw your post on why it's harder to get the article title value in the head.

Has anyone written a script that gets the value of thread title for the requested cms article and inserts that into the og array?

I'm sure it's a dirty solution, but I have no idea why vbulletin thought this wouldn't be a useful patch.
Reply With Quote
  #23  
Old 23 Dec 2013, 11:16
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
The og title tag isn't that important, if not present the page title is used instead- I only threw it in since it was only 1 line of code for the blogs/threads... It isn't worth the effort to add it for CMS articles in my opinion.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #24  
Old 14 Jan 2014, 11:17
ckgb ckgb is offline
 
Join Date: Oct 2007
Any plans on extending this very useful modification to Social Groups?

Thank you
Reply With Quote
  #25  
Old 18 Jan 2014, 14:51
Gripi Gripi is offline
 
Join Date: Jul 2009
Hello..

I saw this two is blank when i open a thread and view source:

<meta property="og:description" content="" />

<meta property="og:title" content="" />

Is it normal? i'm using 4.2.1

Last edited by Gripi; 18 Jan 2014 at 14:57.
Reply With Quote
  #26  
Old 18 Jan 2014, 15:22
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by ckgb View Post
Any plans on extending this very useful modification to Social Groups?

Thank you
Not really because usually social groups aren't publicly accessible in my experience so never really thought much about Facebook sharing. I suppose I can look into it for those who have guest visible socialgroups.

Originally Posted by Gripi View Post
Hello..

I saw this two is blank when i open a thread and view source:

<meta property="og:description" content="" />

<meta property="og:title" content="" />

Is it normal? i'm using 4.2.1
No it's not normal- it may be the result of another modification. Do you by chance have installed VSa - Forums Online CountUp installed?- I found out recently that mod causes such problems with the Facebook Open Graph array.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #27  
Old 18 Jan 2014, 18:52
Gripi Gripi is offline
 
Join Date: Jul 2009
Hello..

No.. i didnt install the VSa - Forums Online CountUp mods, i'm using this mods:

GlowHost - Spam-O-Matic
Spam Hammer 1-Series
[OzzModz] First Post On All Pages Per Thread/Forum
SevenSkins Image Resizer
Rotating Banner System
Separate Sticky and Normal Threads
Reply With Quote
  #28  
Old 18 Jan 2014, 20:26
sv1cec sv1cec is offline
 
Join Date: May 2004
Real name: John
Have you switched on the Facebook options, in the Options/Facebook Admin page?
__________________

John
SV1CEC
Reply With Quote
  #29  
Old 18 Jan 2014, 21:12
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Gripi View Post
Hello..

No.. i didnt install the VSa - Forums Online CountUp mods, i'm using this mods:

GlowHost - Spam-O-Matic
Spam Hammer 1-Series
[OzzModz] First Post On All Pages Per Thread/Forum
SevenSkins Image Resizer
Rotating Banner System
Separate Sticky and Normal Threads
Please post or PM a link to a thread on your site.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #30  
Old 18 Jan 2014, 21:18
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Real name: Chris
Originally Posted by Gripi View Post
Hello..

No.. i didnt install the VSa - Forums Online CountUp mods, i'm using this mods:

GlowHost - Spam-O-Matic
Spam Hammer 1-Series
[OzzModz] First Post On All Pages Per Thread/Forum
SevenSkins Image Resizer
Rotating Banner System
Separate Sticky and Normal Threads
Joe if it is [OzzModz] First Post On All Pages Per Thread/Forum let me know.

Gripi, are you using the Atakan one, or mine? Separate Sticky and Normal Threads
__________________
You can get access to my 180 mods for vB 3.6 - 4.x at The Admin Zone as well as the professional support you are used to. New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders! ​ OzzModz down. Site has had a data breach, checking how the intrusion happened. Change your PW if you use the same one on my site and others.
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 20:54.

Layout Options | Width: Wide Color: