Adrian
asked 8 months ago

I have a small problem with DW Magz v1.0.6 … the (DW) Latest Videos piece on the frontpage is stripping HTTPS from links to youtube video thumbnails and is loading insecure http thumbnails instead.
The thumbnails on the side vertical playlist on the front page (ul class=”latest-playlist”) are generated as insecure http links, and this breaks the overall HTTPS integrity of the site. The videos themselves are referenced via proper https links, but the thumbnails are not.
Any suggestion where should i start poking to fix the http thumbnails?
Thanks

2 Answers
Adrian
answered 8 months ago

update:  i was right, the youtube thumbnails are hard-coded into the theme code.
I changed them to https and the problem went away. I also noticed that Vimeo thumbnails have the same problem… hard-coded insecure thumbnails
in dw-magz\inc\init.php at line 233:

function dw_magz_video_thumbnail( $video_url ) {
    $image_url = parse_url( $video_url );
    if ( 'www.youtube.com' == $image_url['host'] || 'youtube.com' == $image_url['host'] ) {
        $array = explode( '&', $image_url['query'] );
        return 'http://img.youtube.com/vi/' . substr( $array[0], 2 ) . '/hqdefault.jpg';
    } else if ( 'www.vimeo.com' == $image_url['host'] || 'vimeo.com' == $image_url['host'] ) {
        $hash = unserialize( file_get_contents( 'http://vimeo.com/api/v2/video/' . substr( $image_url['path'], 1 ) . '.php' ) );
        return $hash[0]['thumbnail_small'];
    }
}

 

DominicStaff
answered 8 months ago

Yes, I sent and notified into our technical team about this issue, we will check and resolve it in the next version. 

Powered by DW Question & Answer Pro