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
  #2  
Old 12-11-2012, 02:39 PM
sweetpotato sweetpotato is offline
 
Join Date: Oct 2010
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and work fine for me
Thanks,
Reply With Quote
Благодарность от:
redinkdesign
  #3  
Old 01-10-2013, 06:08 PM
Waiter Waiter is offline
 
Join Date: Mar 2008
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excuseme, I installed this product but when do you config the og:image tag??
Reply With Quote
  #4  
Old 01-10-2013, 06:11 PM
redinkdesign redinkdesign is offline
 
Join Date: Nov 2007
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

You don't explicitly set the og:image tag.
Reply With Quote
  #5  
Old 01-10-2013, 06:22 PM
Waiter Waiter is offline
 
Join Date: Mar 2008
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made the importation and left blank the FB Image URL, but When you create the page, the tag og: image is omitted, but there are images in the the page (article of CMS Content)
Reply With Quote
  #6  
Old 01-11-2013, 08:24 AM
sweetpotato sweetpotato is offline
 
Join Date: Oct 2010
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This mod works fine for forum thread but not work for cms article
Reply With Quote
  #7  
Old 01-11-2013, 08:36 AM
Waiter Waiter is offline
 
Join Date: Mar 2008
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want it to work with the CMS articles, what should I change in the XML? There I took a look and the only thing I've noticed is that these variables: $GLOBALS['threadinfo']['description']. There is a variable that identifies those items of CMS?
Reply With Quote
  #8  
Old 01-12-2013, 06:27 PM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OMG, thank you I have been looking for this forever!
Reply With Quote
  #9  
Old 01-12-2013, 06:44 PM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

crap fb_opengraph_array isn't a hook in my version of vbulletin
Reply With Quote
  #10  
Old 01-12-2013, 07:34 PM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, I just inserted the plugin manually into functions_facebook.php since there isn't a comparable hook.

@Waiter - $vbulletin->options['description'] is the variable, but I don't believe it includes img and attach tags for the cms.
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:14 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.07196 seconds
  • Memory Usage 2,310KB
  • 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
  • (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
  • (10)post_thanks_box
  • (4)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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