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

Reply
 
Thread Tools
Nexia's OpenGraph Protocol Inserts Details »»
Nexia's OpenGraph Protocol Inserts
Version: 1.0.0, by vbenhancer vbenhancer is offline
Developer Last Online: Nov 2012 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 4.x.x Rating:
Released: 04-08-2012 Last Update: Never Installs: 32
Uses Plugins
 
No support by the author.

Add OpenGraph Metadata Details for each pages you browse on your site, so search engines and social networks like facebook are able to parse your pages more efficiently.

##############################################
# what is opengraph protocol:

The Open Graph protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook.


##############################################
# exemple of result on version 1.0.0. this piece of code is auto-inserted in the meta data of all your vBulletin pages to help facebook and other engines to recognise your content.

HTML Code:
<meta property="og:site_name" content="Les Forums Smalah" />
<meta property="og:description" content="smalah, le r?seau social unique des grandes familles du Qu?bec" />
<meta property="og:title" content="La Smalah, une d?finition" />
<meta property="og:url" content="http://smalah.com/showthread.php?9-La-Smalah-une-définition" />
<meta property="og:image" content="http://smalah.com/_style_smalah/logosquare.jpg" />
<meta property="og:type" content="article" />
you can see the result on the screenshot... facebook is able to grab the proper information, even if you did not activate any facebook plugin... because opengraph is not only about facebook, it is also about Google and other search engines that now use this protocol... and many social networks!

http://ogp.me/

##############################################
# how to install the product?

Import the Product file included in the /IMPORT_PRODUCT/ folder.

go to the AdminCP >> vBulletin Options >> Nexia's OpenGraph Protocol

and fill the infos... it is recommanded to add a OG:IMAGE to identify your site in a thumbnail.

##############################################
# To-do-list:

- add thumbnail of first attached image in thread to replace OG:IMAGE by default
- add a choice of site type, in the options
- filter attachments for display videos, images and audio in social networks

Download Now

File Type: zip nex_opengraph.zip (3.5 KB, 214 views)

Screenshots

File Type: jpg nex_opengraph_on_fb.jpg (25.6 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
puertoblack2003, Sunka

Comments
  #22  
Old 04-24-2013, 09:57 PM
tuRiver's Avatar
tuRiver tuRiver is offline
 
Join Date: Mar 2009
Location: BA
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to overwrite vbulletin's default opengraph?
Reply With Quote
  #23  
Old 05-16-2016, 01:19 AM
GHRake GHRake is offline
 
Join Date: Sep 2015
Location: USA
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This still works well, I've just incorporated it on my forum. It does not pull images from the thread, but it will use a default image. Facebook says the image should be 1200x630 but it was getting cut off so 1170x630 seems to work better for me...

I'm using this in conjuction with this mod:
Easiest way to add Social Bookmarks on Thread

You can read the Open Graphics Protocol documentation


You can also go to https://www.facebook.com/insights and get insights for your domain and connect those insights to your facebook page along with connecting to a facebook app. You can incorporate this into this plugin, editting the .xml file before importing and find:

Code:
	$og_array = array(
		'og:site_name'	=>	$vbulletin->options['bbtitle'],
		'og:description'=>	$vbulletin->options['description'],
		'og:title'		=>	$vbulletin->options['bbtitle'],
		'og:url'		=>	$vbulletin->options['bburl'],
		'og:image'		=>	$vbulletin->options['nex_opengraph_image'],
		'og:type'		=>	'website'
	);
Include 2 more elements to this array:
Code:
	$og_array = array(
		'og:site_name'	=>	$vbulletin->options['bbtitle'],
		'og:description'=>	$vbulletin->options['description'],
		'og:title'		=>	$vbulletin->options['bbtitle'],
		'og:url'		=>	$vbulletin->options['bburl'],
		'og:image'		=>	$vbulletin->options['nex_opengraph_image'],
		'og:type'		=>	'website',
               
		'fb:app_id'		=>  'YOUR_APP_ID',
		'fb:admins'	=>  'YOUR_ADMIN_ID'
	);
Replace YOUR_APP_ID and YOUR_ADMIN_ID with whatever you get from FaceBook.

Then test your markup here:
https://developers.facebook.com/tools/debug/sharing/

Maybe someone knows how to parse the thread text and pull the first hotlinked image or embedded youtube video?

This is what my final product looks like:


And here's a nice bonus: Google+ picks up the OG meta tags as well w00t
Reply With Quote
  #24  
Old 12-26-2018, 11:33 AM
masterross's Avatar
masterross masterross is offline
 
Join Date: Nov 2005
Location: Bulgaria
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Perfect mod!
I combined with https://vborg.vbsupport.ru/showthread.php?t=300221
to get the thread's image.
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 12:09 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04034 seconds
  • Memory Usage 2,262KB
  • Queries Executed 19 (?)
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
  • (2)bbcode_code
  • (1)bbcode_html
  • (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
  • (2)pagenav_pagelink
  • (4)post_thanks_box
  • (2)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (2)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)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