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

Reply
 
Thread Tools
RedInk Design - Smart OG Image Tag Details »»
RedInk Design - Smart OG Image Tag
Version: 1.00, by redinkdesign redinkdesign is offline
Developer Last Online: Aug 2015 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.2.x Rating:
Released: 12-09-2012 Last Update: 12-03-2013 Installs: 42
Uses Plugins
 
No support by the author.

Currently vBulletin's facebook open graph image tag uses what's entered in Options -> Facebook Options -> Image URL. If you leave this field blank, the <og:image> meta tag is omitted and Facebook's crawler will try to use any image found on the page.

This mod looks for the first [img] or [attach] tags in a post and uses that image for the <og:image> meta tag. This will tell facebook's crawler to use that image for the post.

This mod requires the Facebook Platform to be enabled on vBulletin (Options -> Facebook Options -> Enable Facebook Platform).

It will first look for an [img] tag is the post, if none is found, it will look for an [attach] tag. If neither is found, it will use the Image you entered in the facebook options (Options -> Facebook Options -> Image URL). If that field was left empty, it will omit the <og:image> tag which is default vBulletin behavior.

This was only tested on 4.2.0 (PL3).

Installation:
Admin -> Plugin & Products -> Manage Products -> Add/Import Product

Update 12/4/2013
Changed image priorities - avatar and site logo are not priority

Update 11/19/2013
Plugin updated to support multiple images

Download Now

File Type: xml product-redink_smart_og_image_tag.xml (2.7 KB, 168 views)

Show Your Support

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

Comments
  #22  
Old 01-21-2013, 04:51 PM
redinkdesign redinkdesign is offline
 
Join Date: Nov 2007
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good catch, I will fix this in the next release.

Quote:
Originally Posted by LifesGreatestGift View Post
your mod doesn't account for if the site is http or https properly

had to change this line

Code:
$og_array['og:image'] = 'http://' . $img_str;
to

Code:
$og_array['og:image'] = 'https://' . $img_str;
Reply With Quote
  #23  
Old 01-26-2013, 09:10 PM
Bob_R Bob_R is offline
 
Join Date: Jun 2009
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So this only works for posts?

What about threads, showdisplay and forumhome?

Thanks!
Reply With Quote
  #24  
Old 01-29-2013, 05:26 PM
Bob_R Bob_R is offline
 
Join Date: Jun 2009
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doesn't work.
Reply With Quote
  #25  
Old 01-29-2013, 05:40 PM
redinkdesign redinkdesign is offline
 
Join Date: Nov 2007
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bob_R View Post
So this only works for posts?

What about threads, showdisplay and forumhome?

Thanks!
This is just an extension of the default vBulletin behavior.


Quote:
Originally Posted by Bob_R View Post
Doesn't work.
What doesn't?
Reply With Quote
  #26  
Old 02-01-2013, 06:21 PM
Bob_R Bob_R is offline
 
Join Date: Jun 2009
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by redinkdesign View Post
This is just an extension of the default vBulletin behavior.
What doesn't?
Doesn't post image. it's just a blurry green arrow.
Reply With Quote
  #27  
Old 02-04-2013, 10:07 PM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why does this require the facebook platform to be enabled?
Reply With Quote
  #28  
Old 02-05-2013, 12:39 AM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sticky View Post
Why does this require the facebook platform to be enabled?
Because og tags are not inserted on vbulletin without the fb platform enabled.
Reply With Quote
Благодарность от:
redinkdesign
  #29  
Old 02-13-2013, 07:42 PM
Bob_R Bob_R is offline
 
Join Date: Jun 2009
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why is everyone asking if the Facebook Platform has to be enabled? If you have Facebook Connect wouldn't you need it enabled anyway?
Reply With Quote
Благодарность от:
redinkdesign
  #30  
Old 02-14-2013, 06:54 AM
sweetpotato sweetpotato is offline
 
Join Date: Oct 2010
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a problem when using this Mod. When share a thread to Facebook, It does not show the thread tittle but the site name.
Reply With Quote
  #31  
Old 02-14-2013, 02:43 PM
redinkdesign redinkdesign is offline
 
Join Date: Nov 2007
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This mod does not alter existing OG tags, only the <og:image> tag. The issue you're having is with the default vBulletin tags.

Quote:
Originally Posted by sweetpotato View Post
I have a problem when using this Mod. When share a thread to Facebook, It does not show the thread tittle but the site name.
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:24 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.05749 seconds
  • Memory Usage 2,332KB
  • Queries Executed 28 (?)
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
  • (6)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
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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