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: Jul 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: 320
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

Comments
  #2  
Old 29 Nov 2013, 13:03
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Reserved.
__________________
-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
  #3  
Old 29 Nov 2013, 13:39
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Using 4.2.0 PL3 - For me the og:description did not change. Although it looked good already (first 150 chars. of the thread). The og:title property was added but the content is blank.
Reply With Quote
  #4  
Old 29 Nov 2013, 13:53
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by bzcomputers View Post
Using 4.2.0 PL3 - For me the og:description did not change. Although it looked good already (first 150 chars. of the thread). The og:title property was added but the content is blank.
I wondered if the description change was a more recent issue... If your og:description is already correct no need for this obviously. Maybe the issue is limited to 4.2.1/4.2.2 - need to do more testing. Thanks for heads up
__________________
-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.

Last edited by BirdOPrey5; 29 Nov 2013 at 15:11.
Reply With Quote
  #5  
Old 29 Nov 2013, 14:50
CharlieDelta CharlieDelta is offline
 
Join Date: Apr 2010
I am using 4.2.0 PL3 and it worked great!

Thank you for this BOP.
Reply With Quote
  #6  
Old 29 Nov 2013, 15:11
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by bzcomputers View Post
Using 4.2.0 PL3 - For me the og:description did not change. Although it looked good already (first 150 chars. of the thread). The og:title property was added but the content is blank.
Weird. I tested this on a 4.2.0 forum with no other add-ons installed the default og:description was the site default. When i installed the mod it worked exactly as expected provided the better description and an og:title tag. Perhaps you already have some mod making the fix?
__________________
-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
  #7  
Old 29 Nov 2013, 15:12
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by CharlieDelta View Post
I am using 4.2.0 PL3 and it worked great!

Thank you for this BOP.
Thanks for letting me know!
__________________
-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
  #8  
Old 29 Nov 2013, 15:30
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Originally Posted by BirdOPrey5 View Post
Weird. I tested this on a 4.2.0 forum with no other add-ons installed the default og:description was the site default. When i installed the mod it worked exactly as expected provided the better description and an og:title tag. Perhaps you already have some mod making the fix?
Figured it out and you are correct. It is the unreleased Dragonbyte SEO I'm beta testing which was already doing this.
Reply With Quote
  #9  
Old 04 Dec 2013, 13:17
sv1cec sv1cec is offline
 
Join Date: May 2004
Real name: John
Installed, and it works as advertised.

If only my FB-Connect button was working too!!!!!!!!
__________________

John
SV1CEC
Reply With Quote
  #10  
Old 07 Dec 2013, 16:35
I.G.O.T.A.'s Avatar
I.G.O.T.A. I.G.O.T.A. is offline
 
Join Date: Mar 2011
Real name: JJ Smith
Installed and voted for MOTM!
Reply With Quote
  #11  
Old 07 Dec 2013, 17:10
sv1cec sv1cec is offline
 
Join Date: May 2004
Real name: John
OK, I solved my Connect button issue and I made a small change to this hack, so that it covers all pages of the site. Here is the code I used.


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

__________________

John
SV1CEC
Reply With Quote
  #12  
Old 07 Dec 2013, 18:40
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by sv1cec View Post
OK, I solved my Connect button issue and I made a small change to this hack, so that it covers all pages of the site. Here is the code I used.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
That may be OK for people with just the vB 4.x forum, but I would not recommend it for people with the VB 4.x Suite as Blog and CMS articles will then lose their custom titles.
__________________
-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
  #13  
Old 10 Dec 2013, 08:12
sv1cec sv1cec is offline
 
Join Date: May 2004
Real name: John
Obviously Joe is right about this (not using my code shown above, if you are using vBSuite.

However, being the stubborn person I am, I keep trying to figure out how to fill the og: array with the proper values.

So far, here is what I have come up with:


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

So far, the og:title parameter is filled by the $bloginfo['title'] variable and that's a good thing. However, the og:description doesn't seem to get updated from $blog['message'].

I am using the blog_show_entry template as a guide line, and in there, it appears that the proper variable to use is indeed $blog['message'], but that is obviously not set, when the script above loads?? I do not understand.

Interestingly enough, the vbcms articles automatically get the proper og:description (the article text itself, but their title comprises of the site title and then the title of the article. I wonder if there is a way to use only the article's title.
__________________

John
SV1CEC
Reply With Quote
  #14  
Old 11 Dec 2013, 18:29
ZUCCO's Avatar
ZUCCO ZUCCO is offline
 
Join Date: Feb 2009
Looks cool, thanks
__________________
Take a look at my rank images

http://www.vbulletin.org/forum/showthread.php?t=305574
Reply With Quote
  #15  
Old 11 Dec 2013, 20:46
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
sv1cec, and everyone-

I went ahead and upgraded this to version 1.2.0- it now adds full support for a blog description (limited to 300 characters if need be) and a better blog title.

The blog title is now formatted "blog title Posted By username"

And the "Posted By" uses the default vBulletin phrase so it will translate to whatever language your forum uses.

I did a lot of research on using it for Articles- it does not appear worth the effort- the way Articles are coded you simply can't get the title or preview text where the facebook open graph text is built. It could be done but would likely need additional plugins- but besides that Articles have a meta description option that you can fill in yourself and if available vBulletin does use the meta description as the open graph description on Article pages.
__________________
-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
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 14:53.

Layout Options | Width: Wide Color: