Viewing 9 posts - 1 through 9 (of 9 total)
  • #48847
    Mike Craycraft
    Member
    Post count: 31

    I did not notice that this has been discussed but I kept getting errors when adding a youtube video for a secure site despite linking to the https url in the short code. It kept telling me that despite connecting to the https that I was also connecting to the http

    I located in the sf-media.php file that the play and embed codes were changing back to http and not https. Once I changed this file the alerts were gone.

    I am not a coder so please excuse my ignorance in trying to explain the possible area for improvement.

    Thanks,
    Mike

    #49615
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit your sf-media.php .Find all http: with https: and update file .

    Note: Make a backup of file before any update

    With Best Regards
    Swiftideas Themes

    #49801
    Mike Craycraft
    Member
    Post count: 31

    Thanks Mohammad. I did change to https in the child theme and everything works well.

    I just thought I would suggest that perhaps the php can be changed for the next version and save a lot of work for others using ssl.

    Like I said, I am not a coder but just had a suggestion.

    Thanks for Your Quick Response,
    Mike

    #49810
    ktheory
    Member
    Post count: 23

    +1 on adding this support. I think its a pretty important piece of functionality.

    #49998
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    HI,
    Thank you for your suggestion , We will embed in next theme upgrade .

    With Best Regards
    Swiftideas Themes

    #127739
    ktheory
    Member
    Post count: 23

    Has this been addressed? Still doesn’t seem to work without modification.

    #127746
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Can you tell what is the theme you are using?

    -Rui

    #127748
    ktheory
    Member
    Post count: 23

    Sorry. This is for Dante Version: 2.69

    #127935
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please insert given below php code at functions.php of child. This code will prevent from update and modification everytime.

    function sf_video_youtube($url, $width = 640, $height = 480) {
    			preg_match('/[\\?\\&]v=([^\\?\\&]+)/', $url, $video_id);
    			return '<div class="sf-video-wrap"><iframe itemprop="video" src="//www.youtube.com/embed/'. $video_id[1] .'?wmode=transparent" width="'. $width .'" height="'. $height .'" ></iframe></div>';
    		}	
    
    function sf_video_vimeo($url, $width = 640, $height = 480) {
    			preg_match('/http:\/\/vimeo.com\/(\d+)$/', $url, $video_id);		
    			return '<div class="sf-video-wrap"><iframe itemprop="video" src="//player.vimeo.com/video/'. $video_id[1] .'?title=0&byline=0&portrait=0?wmode=transparent" width="'. $width .'" height="'. $height .'"></iframe></div>';
    		}
    
    function sf_get_embed_src($url) {
    			if (strpos($url,'youtube')){
    				preg_match('/[\\?\\&]v=([^\\?\\&]+)/', $url, $video_id);
    				if (isset($video_id[1])) {
    					return '//www.youtube.com/embed/'. $video_id[1] .'?autoplay=1&wmode=transparent';
    				}
    			} else {
    				preg_match('/https:\/\/vimeo.com\/(\d+)$/', $url, $video_id);
    				if (isset($video_id[1])) {
    					return '//player.vimeo.com/video/'. $video_id[1] .'?title=0&byline=0&portrait=0&autoplay=1&wmode=transparent';
    				}
    			}
    		}

    Thanks
    Mohammad

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register