0

The {video:img_url_hd} tag is no longer working after we updated the plugin to the 3.2 version. It displays this gray image:https://i.ytimg.com/vi/GrdZjkNCp8I/sdhqdefault.jpg on the front end, even though the back end shows the correct thumbnail for the video.

I was able to change it to the {video:img_url} version since that is working, but wanted to make sure the DevDemon folks knew about it and check to see if it's just our site that has this issue.

Thanks

  • I have the same issue too. I just updated to 3.2 because the previous version would not even load Youtube videos. I am on ExpressionEngine v2.7.2. – randyturtle May 26 '15 at 15:36
  • This should be a comment and not an answer. Please read and follow the rules if you wish to participate on this exchange. expressionengine.stackexchange.com/help – jrothafer May 26 '15 at 16:55
  • Please submit this as a bug report to the developer rather than posting it here as a question: devdemon.com/support/form – Derek Hogue May 28 '15 at 12:50
  • @jchrono-battle I don't know who you are talking to, but this was the first time I have ever posted anything and I have looked at the rules several times and don't know what rule I am not following. – Jerad May 29 '15 at 12:41
  • @DerekHogue I didn't report this as a bug report because they specifically state on their site: "We will not provide direct support for Free Addons unless you have purchased a support license for that Addon." and we have not purchased a support license. – Jerad May 29 '15 at 12:42
0

Please note that the following solution requires modifying a part of the plugins core functionality. Any update to channel_videos is going to remove this fix.

We resolved it by modifying line: 235 in system/expressionengine/third_party/channel_videos/mod.channel_videos.php.


Before:

$vars[$prefix.'img_url_hd'] = str_replace('default.jpg', 'hqdefault.jpg', $vid->video_img_url);

After:

if (strpos($vid->video_img_url, 'sddefault.jpg') !== FALSE) { $vars[$prefix.'img_url_hd'] = str_replace('sddefault.jpg', 'hqdefault.jpg', $vid->video_img_url); } else { $vars[$prefix.'img_url_hd'] = str_replace('default.jpg', 'hqdefault.jpg', $vid->video_img_url); }


Whats happening:

channel_videos searches for default.jpg and replaces it with hqdefault.jpg.
The problem is that in some instances the string default.jpg is actually sddefault.jpg.
So when this happens it essentially replaces default.jpg of sddefault.jpg with hqdefault.jpg resulting in the two merging together to become sdhqdefault.jpg.

| improve this answer | |
  • 1
    This doesn't apply with Vimeo. if I use {video:img_url_hd} I get the _100x75.jpg version. Also noticed that {video:service_id} doesn't seem to get the correct ID. – Milksamsa Jan 29 '16 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.