ZenphotoCMS Forum
zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: zpBootstrap/Fancybox - play Youtube videos directly - should be able to work (/thread-13250.html)

Pages: 1 2


zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - acrylian - 17-01-2019

I can't answer without understanding what you exactly like to do and why you need a textobject class similar class. Generally if it is theme specific it should be part of the theme which is of course problematic since file types are core domain. Perhaps mail me directly about this.




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - sbillard - 17-01-2019

Vince:

You can create a class in your theme functions.php. Then this class will be present for your theme (and only your theme.) If it is really similar to class-textobject I suggest you make it a descendent of that class. E.G. class my-textobject extends class-textobject. Then you need to define only those methods which need to be different.




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - tplowe56 - 18-01-2019

Vincent,

Thanks so much for your efforts, (and the rest of the ZP crew that are helping).

If you need any help testing just shoot me an email. I have everything running locally on Xampp so I can test easily.

I've been following along, because of my interest. I'm hoping your coding for handling YouTube video?

I have hosted my own mp4's on my shared server in the past and the playback is always terrible. That's why I switched to Youtube which is very robust and it's free.

You can create playlists in your YouTube account, and if you use the proper embed code, your playlist is available in a popup menu on the screen.

Alt text

BTW I really like the zpBootstrap theme. Works so well on all devices.

Seems like Fancybox & Bootstrap are both adaptable for YouTube vids, but I don't understand coding, so I am no help.

http://fancyapps.com/fancybox/3/docs/#video

https://getbootstrap.com/docs/4.1/utilities/embed/




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - vincent3569 - 18-01-2019

@acrylian: I have to get the src content in the txt file content (of course, if that file have an embed code to online video like ``)

@sbillard:
thanks for the tip.
I tried it but in fact it doesn't work as exepected: if I add a class in my function.php file, relevant objects are not seen in admin (ie: for ordering pictures or to edit them)

so, as I don't want to create a sidecar plugin for my theme, I found another solution (really more simple!): create a local function to suit my needs.

@tplowe56: Of course, I know my theme works on all devices (I created it for that!).
I am working to improve it to manage Youtube and Vimeo online video and to see them in Fancybox.
be patient, and of course fell free to "buy me a beer" (donate link: https://www.vincentbourganel.fr/pages/zpbootstrap-2.2/).




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - vincent3569 - 18-01-2019

I need to test little more and package my improvement, but you can the the result here: https://test.vincentbourganel.fr/images/illustrations/.

a click on the thumb enable to see the video with fancybox and a click on the video name (youtube or vimeo) enable to see it in image page with responsive behavior.




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - acrylian - 18-01-2019

@vincent3569: Basically the normal fullimage function gets/prints the content of the textobject so you could just use the "get" version to get the url and then create the output fancybox needs.




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - vincent3569 - 18-01-2019

@acrylian:
I don't need to get the url of the txt file itself, but I have to get the src in the txt file content, following the tip (https://www.zenphoto.org/news/using-external-sources/#--using-videos-from-youtube-or-other-portals).

I created a personnal function for that, and it works fine.

Have a closest look to my previous post.




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - acrylian - 18-01-2019

@vincent3569 I didn't say anything of the url actually. getCustomImage (or the getContent() method) if used with textobject should get the content of the textobject, thus the url of the youtube video.




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - vincent3569 - 18-01-2019

the text file content have to follow the patern:



with getContent(), I get the code above and I have to do text manipulation to only get src value (I only want to get //www.youtube.com/embed/M7lc1UVf-VE?autoplay=1&rel=0).

but nevermind, I got the right code and it works.




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - acrylian - 18-01-2019

Not if you only store the youtube url in the textobject and have a theme function handle the actual html setup required for fancybox.




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - vincent3569 - 18-01-2019

as far I can see, the tip for online video managed by textobject requires to store the full embeded code, not only a link to the video.
and each online reader (youtube, vimeo, dailymotion,...) have their own reader configuration in the iframe parameters.




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - acrylian - 18-01-2019

Ok, didn't know it is that different, then some text processing is needed in any case unless you store it right away.




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - vincent3569 - 23-01-2019

zpBootstrap now supports video online (Youtube and Vimeo):
More info here: https://www.vincentbourganel.fr/news/nouveaute-zpbootstrap-prends-charge-les-video-online-youtube-et-vimeo-/




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - vincent3569 - 24-01-2019

sorry, there was a wrong url.
tyhe right one : https://www.vincentbourganel.fr/news/new-zpbootstrap-supports-video-online/




zpBootstrap/Fancybox - play Youtube videos directly - should be able to work - tplowe56 - 25-01-2019

Thanks for your hard work Vincent! Working on some fine tuning. But looks really good!!!