Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
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
Version: 1.2.0, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.1.10 Rating:
Released: 11-28-2013 Last Update: 12-10-2013 Installs: 69
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. :up:
Nominate MOTM if you LOVE it!

Download Now

File Type: xml product-ogdescriptitlegfixbop5.xml (1.8 KB, 316 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
5 благодарности(ей) от:
elsa23, fxdigi-cash, ozzy47, RichieBoy67, synseal

Comments
  #22  
Old 12-22-2013, 10:15 PM
RamdonGhai RamdonGhai is offline
 
Join Date: Mar 2009
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can we get this to work with CMS articles. Why would someone overlook something like this?
Reply With Quote
  #23  
Old 12-23-2013, 02:56 AM
RamdonGhai RamdonGhai is offline
 
Join Date: Mar 2009
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #24  
Old 12-23-2013, 11:16 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #25  
Old 01-14-2014, 11:17 AM
ckgb ckgb is offline
 
Join Date: Oct 2007
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any plans on extending this very useful modification to Social Groups?

Thank you
Reply With Quote
  #26  
Old 01-18-2014, 02:51 PM
Gripi Gripi is offline
 
Join Date: Jul 2009
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #27  
Old 01-18-2014, 03:22 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.

Quote:
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.
Reply With Quote
  #28  
Old 01-18-2014, 06:52 PM
Gripi Gripi is offline
 
Join Date: Jul 2009
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #29  
Old 01-18-2014, 08:26 PM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you switched on the Facebook options, in the Options/Facebook Admin page?
Reply With Quote
  #30  
Old 01-18-2014, 09:12 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #31  
Old 01-18-2014, 09:18 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
Reply With Quote
Reply

Thread Tools

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

Forum Jump


All times are GMT. The time now is 05:11 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.08151 seconds
  • Memory Usage 2,337KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (5)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete