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)
-   -   Integration with vBulletin - Nexia's OpenGraph Protocol Inserts (https://vborg.vbsupport.ru/showthread.php?t=281290)

vbenhancer 04-08-2012 10:00 PM

Nexia's OpenGraph Protocol Inserts
 
1 Attachment(s)
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

vbenhancer 04-09-2012 01:11 AM

this product is not interfering with the actual Facebook product inside vBulletin, it is adding more precise information if needed.

puertoblack2003 04-09-2012 01:14 AM

nice nexia you always produce good mods... gonna check this out :up:

Hornstar 04-09-2012 07:10 AM

Thanks. Looks like a useful addition.

faisaly.com 04-09-2012 06:10 PM

Can't wait for the next update so the first image will post to facebook.. been having this problem for awhile now...

sweetpotato 04-11-2012 03:58 PM

Installed, It's seem to be so nice mod
Thanks,

Emeralda 04-11-2012 04:14 PM

You only need to fill the OG:IMAGE, right? Everything else is added automatically? Because it's the only option I see. And what's the recommended (default) size of the image?

vbenhancer 04-11-2012 04:34 PM

Quote:

Originally Posted by Emeralda (Post 2319113)
You only need to fill the OG:IMAGE, right? Everything else is added automatically? Because it's the only option I see. And what's the recommended (default) size of the image?

exactly, only that setting... the other features will be added in a different release...

there is no recommanded images anymore... in the past, a max of 250x250 was suggested, but facebook and google now resize these images, so no more trouble... :)

Kraxell 04-11-2012 05:49 PM

Hello,

one question:
If i "like" a topic, then it show the forum-discription on facebook. Is this mod for showing thread-content?

vbenhancer 04-11-2012 07:09 PM

that's what is planned for the update, as right now it is not parsing the first post to show in the description, sorry...

Kraxell 04-11-2012 07:19 PM

ok, i have tagged it :)

tpearl5 04-15-2012 07:46 PM

Thanks for this! Very interested in when you get the image functionality working. I actually posted a request for that here:
https://vborg.vbsupport.ru/showthread.php?t=280721

xertox 05-28-2012 01:48 AM

Can the og:description field be populated by this hook? thread.meta_description?

tpearl5 06-18-2012 12:59 PM

Quote:

Originally Posted by xertox (Post 2333748)
Can the og:description field be populated by this hook? thread.meta_description?

was hoping that could be done as well...

deverill2010 06-30-2012 07:48 AM

When are you planning on adding some of the other features?

Blueracer66 08-23-2012 08:44 PM

I wonder is this would work on 3.8.7. I need something like this... :)

vbenhancer 08-24-2012 12:58 AM

the version i'll update on sunday will be 3.8.x... right now i posted the 4.0 version due to the demand... now it is complete, so i'll add the 3.x support... :)

Blueracer66 08-24-2012 02:47 AM

Quote:

Originally Posted by vbenhancer (Post 2359501)
the version i'll update on sunday will be 3.8.x... right now i posted the 4.0 version due to the demand... now it is complete, so i'll add the 3.x support... :)

Nice, I can't wait to install this! Thank you! :)

Blueracer66 09-04-2012 09:18 PM

Sorry to bump this but I really need this. I gave up doing it myself! :(

Waiter 01-15-2013 02:45 PM

Excuseme, but the tag OG:IMAGE not work correctly. In a post are more image, update by Vbulletin Attach Tool, but whend load the page in the OG:IMAGE that's the Default image...why?

tuRiver 04-24-2013 09:57 PM

Is it possible to overwrite vbulletin's default opengraph?

GHRake 05-16-2016 01:19 AM

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:
https://vborg.vbsupport.ru/external/2016/05/18.png

And here's a nice bonus: Google+ picks up the OG meta tags as well w00t

masterross 12-26-2018 11:33 AM

Perfect mod!
I combined with https://vborg.vbsupport.ru/showthread.php?t=300221
to get the thread's image.


All times are GMT. The time now is 07:42 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.01103 seconds
  • Memory Usage 1,770KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete