Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
  #1  
Old 05-11-2016, 03:38 PM
David Karol David Karol is offline
 
Join Date: Jan 2011
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Images in Articles

On vBulletin 4, after pushing an article link via RSS, or pasting a link into Facebook, images were recognized by the platforms. This is not the case in vBulletin 5.

I'd look for diffs in the content between 5 and 4, does anyone know of a vBulletin 4 site running that utilizes the CMS?
Reply With Quote
  #2  
Old 05-11-2016, 04:22 PM
twistsol's Avatar
twistsol twistsol is offline
 
Join Date: Apr 2015
Location: Cottage Grove, MN
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We have about 200 CMS articles at www.sawdustzone.org and we're on VB 4.2.3 for another two weeks
Reply With Quote
  #3  
Old 05-12-2016, 06:38 PM
David Karol David Karol is offline
 
Join Date: Jan 2011
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could the issue be that vb4 points to a real URL, where vb5 uses 'file data' variable to point to an image?
Attached Images
File Type: png Screen Shot 2016-05-12 at 1.32.19 PM.png (87.9 KB, 0 views)
File Type: png Screen Shot 2016-05-12 at 1.30.26 PM.png (84.5 KB, 0 views)
Reply With Quote
  #4  
Old 05-13-2016, 03:08 AM
David Karol David Karol is offline
 
Join Date: Jan 2011
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks like some meta data is missing. I filed http://tracker.vbulletin.com/browse/VBV-15998
Reply With Quote
  #5  
Old 05-17-2016, 01:08 AM
David Karol David Karol is offline
 
Join Date: Jan 2011
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by David Karol View Post
Looks like some meta data is missing. I filed http://tracker.vbulletin.com/browse/VBV-15998
Is there an easy way to add schema tags inside every image tag?

Code:
itemprop="image"
Reply With Quote
  #6  
Old 05-24-2016, 04:14 AM
David Karol David Karol is offline
 
Join Date: Jan 2011
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could something like below, in head_include possibly cover it?

Code:
$('div.post-content img').attr('itemprop', 'image')
$('div.post-content img').attr('property', 'og:image')
Reply With Quote
  #7  
Old 05-24-2016, 03:45 PM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No. Dynamic front-end changes on the fly via Javascript are not visible outside of the browser executing it. This means external sites like Facebook that scrapes the page will not see those changes. What they will see are basically what you see when you view the page source (View-Source) which is what the server outputs when you make a request.

--------------- Added [DATE]1464112733[/DATE] at [TIME]1464112733[/TIME] ---------------

What you need to do is create a template hook in the header_head hook location. In the template, you need to retrieve the first attached image in the article. Once you get it, you can render appropriate open graph meta tags.

The code for this is not simple. This will require time and effort to do. You could hire me or someone else to do this for you.
Reply With Quote
Reply

Thread Tools
Display Modes

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 01:30 PM.


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.05399 seconds
  • Memory Usage 2,232KB
  • Queries Executed 12 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (2)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete