Open Jimmi08 opened 6 years ago
@CaMer0n Any idea on this one?
thumb.php
is for IMAGE thumbnails. So there's a bug there with the generated URL, but also, you shouldn't make a rewrite rule to send videos to thumb.php. Try using a full-path to the video file in TinyMce.
It was just attempt to fix it. Do you mean full path with hash folder? Yes, I did it. And this doesn't solve problem with news images as video.
Work-in-progress committed.
Enable with define('e_DEBUG_VIDEO', true);
in e107_config.php
and then add an image to a 'news' item for example ( using imagepicker, not Tinymce)
The challenge right now is the 'preview' image. The media manager simply changes the 'src' attribute of the 'preview' box (image-picker) in the main form when we select the media item we wish to use. Obviously, it won't work to place a .mp4 or .mp3 URL into the 'src' of an img tag. So, imagepicker() will need to be modified in order to receive html (video tag, audio tag, div etc) from the media-manager modal window, rather than just the 'src' value. And of course, use the appropriate tag when existing data is loaded from the DB.
It may be easier to add a new universal 'mediapicker' method to the form handler for this. ie. It would handle images, file, glyphs, audio and video previews and work with the existing media-manager modal window.
@SimSync fyi
@SimSync You can test on admin > news with define('e_DEBUG_MEDIAPICKER', true)
in e107_config.php
Media Selection isn't working yet with videos and audio.. (TBD) so you'll need to go to Line 1387 of form_handler and manually enter some URLs to local files of different types.
I tried to use Media manager at first -
A. I created category with type video owner gallery
http://localhost/e107/thumb.php?src=e_MEDIA_VIDEO%2F2018-06%2Fcyruugevyt89xjmv.mp4&w=800&h=0
I don't know it this is correct path, but with images it looks different .
So I use in TinyMce this path and I hoped it would be parsed or so, but nothing. this one:
2. I tried news - images fields.
File was uploaded, result it admin area:
Result in Frontend: xx{NEWSVIDEO: item=1} xx
If I add this line to .htaccess
ReWriteRule ^media\/video\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ thumb.php?src=e_MEDIA_VIDEO/$5&$1w=$2&$3h=$4 [NC,L]
I got message that File is not a valid image.
If I want edit media file, I get this:
What is correct path to use in tinymce media button to get video displayed? This one doesn't work:
http://localhost/e107/media/videos/2018-06/UGEvYT89Xjmv.mp4
Only way I found is full path with media folder and hash name in it.