Pages (2):    1 2
Administrator
Administrator
acrylian   17-01-2019, 19:13
#21

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.

Member
Member
sbillard   17-01-2019, 21:53
#22

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.

Member
Member
tplowe56   18-01-2019, 01:28
#23

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/

Member
Member
vincent3569   18-01-2019, 13:11
#24

@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/).

Member
Member
vincent3569   18-01-2019, 13:36
#25

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.

Administrator
Administrator
acrylian   18-01-2019, 14:10
#26

@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.

Member
Member
vincent3569   18-01-2019, 14:33
#27

@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.

Administrator
Administrator
acrylian   18-01-2019, 14:37
#28

@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.

Member
Member
vincent3569   18-01-2019, 19:03
#29

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.

Administrator
Administrator
acrylian   18-01-2019, 19:47
#30

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

Member
Member
vincent3569   18-01-2019, 20:38
#31

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.

Administrator
Administrator
acrylian   18-01-2019, 20:59
#32

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

Member
Member
vincent3569   23-01-2019, 16:10
#33

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-/

Member
Member
vincent3569   24-01-2019, 09:59
#34

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

Member
Member
tplowe56   25-01-2019, 02:20
#35

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

Pages (2):    1 2
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.