vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Facebook / Open Graph (og:description) / (og:title) tag fixes for VB 4.1.10+ by BOP5 (https://vborg.vbsupport.ru/showthread.php?t=305162)

BirdOPrey5 11-28-2013 11:00 PM

Facebook / Open Graph (og:description) / (og:title) tag fixes for VB 4.1.10+ by BOP5
 
1 Attachment(s)
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. :up:
Nominate MOTM if you LOVE it! ;)

BirdOPrey5 11-29-2013 01:03 PM

Reserved.

bzcomputers 11-29-2013 01:39 PM

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.

BirdOPrey5 11-29-2013 01:53 PM

Quote:

Originally Posted by bzcomputers (Post 2464570)
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

CharlieDelta 11-29-2013 02:50 PM

I am using 4.2.0 PL3 and it worked great!

Thank you for this BOP.

BirdOPrey5 11-29-2013 03:11 PM

Quote:

Originally Posted by bzcomputers (Post 2464570)
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?

BirdOPrey5 11-29-2013 03:12 PM

Quote:

Originally Posted by CharlieDelta (Post 2464585)
I am using 4.2.0 PL3 and it worked great!

Thank you for this BOP.

Thanks for letting me know!

bzcomputers 11-29-2013 03:30 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2464594)
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.

sv1cec 12-04-2013 01:17 PM

Installed, and it works as advertised.

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

I.G.O.T.A. 12-07-2013 04:35 PM

Installed and voted for MOTM!


All times are GMT. The time now is 06:15 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
  • Page Generation 0.01924 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete