GetSimple Support Forum

Full Version: Youtube Video Loader
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Youtube Video Loader Support Thread
Updated the syntax from:

{http://www.youtube.com/watch?v=zt1uKrUiwpw}

To:

{% http://www.youtube.com/watch?v=zt1uKrUiwpw %}
Problem with the " " added by the page editor solved.

I.E.:
{% https://www.youtube.com/watch?v=XXXXXXX %}
instead of:
{% https://www.youtube.com/watch?v=XXXXXXX %}

Now it works in both cases!
(2016-07-02, 14:37:12)Glaucius Wrote: [ rel="nofollow" -> ]Problem with the " " added by the page editor solved.

I.E.:
{% https://www.youtube.com/watch?v=XXXXXXX %}
instead of:
{% https://www.youtube.com/watch?v=XXXXXXX %}

Now it works in both cases!

I don't understand why the plugin is not working. Confused
I use GS version 3.3.10
I've activated the plugin, and pasted as a test;
{% http://www.youtube.com/watch?v=zt1uKrUiwpw %}


but the video does not show up, only the pasted into a page the text as above:
{% http://www.youtube.com/watch?v=zt1uKrUiwpw %}


Do I need some additional plugin?

Thank you!
Not sure, but it might interfere with DynPages plugin. That plugin also uses {% %}

You can test by disabling DynPages plugin
(2016-11-01, 03:07:14)macoffers Wrote: [ rel="nofollow" -> ]
(2016-07-02, 14:37:12)Glaucius Wrote: [ rel="nofollow" -> ]Problem with the " " added by the page editor solved.

I.E.:
{% https://www.youtube.com/watch?v=XXXXXXX %}
instead of:
{% https://www.youtube.com/watch?v=XXXXXXX %}

Now it works in both cases!

I don't understand why the plugin is not working. Confused
I use GS version 3.3.10
I've activated the plugin, and pasted as a test;
{% http://www.youtube.com/watch?v=zt1uKrUiwpw %}


but the video does not show up, only the pasted into a page the text as above:
{% http://www.youtube.com/watch?v=zt1uKrUiwpw %}


Do I need some additional plugin?

Thank you!

Hi,

Maybe you didn't use a https:// URL...
If you use http:// it will not work...

If you want it to work it with http:// AND https://, change the regex pattern(s) in the file 'youtube_video_loader.php' from:


Code:
'/\{%(.| )https\:\/\/www\.youtube\.com\/watch\?v=......./'

to

Code:
'/\{%(.| )https?\:\/\/www\.youtube\.com\/watch\?v=......./'


The added '?' character is the only change...

Hope then it will work Smile

Have a nice day!
Hi you might want to update the URL in your examples to include the "s" in https:// ({% http://www.youtube.com/watch?v=zt1uKrUiwpw %}) - it wasn't working for me then I finally came here and saw that suggestion.
I had to modify yourtube_video_loader.php to get it to work:


PHP Code:
function youtube_video_embed($id,$w,$h){
 return "<div style='
 position:relative;
 padding-bottom:56.25%;
 padding-top:30px;
 height:0;
 overflow:hidden;'>
<iframe  style='
 position:absolute;
 top:0;
 left:0;
 width:100%;
 height:100%;' 
 src='https://www.youtube.com/embed/
$id
 allow='accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture' 
 frameborder='0' 
 allowfullscreen>
</iframe>
</div>"
;