WordPress.org

Ready to get started?Download WordPress

Forums

MaxGalleria: WordPress Gallery Platform
[resolved] blocked youtube (3 posts)

  1. ab22375
    Member
    Posted 1 month ago #

    Hello,

    My website is on ssl. i have created a gallery of youtube videos using the protocol https://www.youtube.com ...
    but when they are imported, the links to youtube videos are recorded with http instead of https.

    The result is that no videos can be viewed in the popup, (in chrome, safari, firefox), while with opera they can be viewed.

    The error reported (firefox firebug):

    Blocked loading mixed active content "http://www.youtube.com/embed/.....?feature=oembed&fs=1&enablejsapi=1&wmode=transparent"

    If with firebug i change the link from http://www.youtube.com/embed/.... to https://www.youtube.com/embed/..... then everything works fine.

    How can I make maxgalleria register https instead of http?

    https://wordpress.org/plugins/maxgalleria/

  2. ab22375
    Member
    Posted 1 month ago #

    I have been working a little further on it.
    I have solved in this way:

    Replaced http with https in this line :

    $embed_code = '<iframe src="http://www.youtube.com/embed/' . $video_id . '?feature=oembed" width="' . $width . '" height="' . $height . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';

    of file
    [wordpress]/wp-content/plugins/maxgalleria/addons/media-sources/youtube/youtube.php

    it becomes therefore

    $embed_code = '<iframe src="https://www.youtube.com/embed/' . $video_id . '?feature=oembed" width="' . $width . '" height="' . $height . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';

    Then when I add links to youtube videos from maxgalleria I choose this format:

    https://www.youtube.com/v/video_id

    where video_id is the id of my video in youtube.

    In this way, maxgalleria saves the links correctly with https.

  3. arcware
    Member
    Plugin Author

    Posted 1 month ago #

    Thanks for the info, we'll look to see if we can make this more seamless so that you don't have to edit one of the plugin files.

Reply

You must log in to post.

About this Plugin

About this Topic