User tests: Successful: Unsuccessful:
Pull Request for Issues #10871 , #17475 , #19954
Added template files for documents and videos to the com_media view (imageslist) used by media field
Added template overrides to backend isis template
Added template overrides to frontend protostar template
(At Media Manager options)
Add pdf,mp4,PDF,MP4
to Legal Extensions
Add application/pdf,video/mp4
to Legal MIME types
Open an article and go to TAB image and links
, click to select an image
Upload a PDF file and an MP4 file, click on each of them so that they get selected and click "Insert"
The files are uploaded and shown and insertable
The files are uploaded but not shown / not insertable
YES
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_media Templates (admin) Front End Templates (site) |
For image fields, PDFs should not be displayed/selectable.
With the PR, the PDF is selectable, but won't display on the frontend to be clickable.
Yes non-images should not be selectable in the image fields
Using the image fields (of images and links TAB)
is just an easy example that this PR works
The selection for non-images for specific cases should be disallowed
but before i would add anything more i would like to see if there is interest in this PR and suggestions on how to limit the view
In my own views i am using ACL + a configuration id that corresponds to the configuration data in the DB to decide what is shown / not shown, and also do other customization on the view
Labels |
Added:
?
|
Can you do this feature against the Joomla 4 branch? Don't want to introduce a new feature in J3 which doesn't exist in 4, better to do it the other way around. Thanks!
Hi, improvement this is really useful! I was diverted here after raising a change request #20057 but I'm not sure if the functionality is the same. Would you mind comparing the text of that issue?
In particular, can I just check if this change provides access to all types of media? I recently developed a website with media which included .gpx files (XML format files of GPS tracks), so would those be visible for example?
Also, I suggested being able to filter on the types of media shown – eg by MIME type or file extension.
Many thanks!
Can you do this feature against the Joomla 4 branch? Don't want to introduce a new feature in J3 which doesn't exist in 4, better to do it the other way around. Thanks!
this PR so far only adds the listing of doc / video files without any configuration
(the above is done as long as legal extensions / MIME are added to com_media configuration)
and this is already possible in J4
so you mean
implement configuration of which files should be allowed per instance of media field as a PR to 4.0-dev branch and close this one ? (this has not been added to this PR --yet--)
you do not need wait for this PR to do it in any J3 installation
you can do it today, just add 2 lines
$docs = $this->get('documents');
$videos = $this->get('videos');
to your Joomla template override of
administrator/components/com_media/views/imageslist/tmpl/default.php
as
templates/JTEMPLATENAME/html/com_media/imageslist/default.php
administrator/templates/JTEMPLATENAME/html/com_media/imageslist/default.php
**and then add 2 loops in it **
1 loop to list documents and 1 loop to list videos
copy code for the 2 loops from here and correct the variable name of each loop
https://github.com/joomla/joomla-cms/pull/19967/files#diff-fac76ead6ee179d0a6802a886ffd84b2
https://github.com/joomla/joomla-cms/pull/19967/files#diff-64721eb2e5a153801fced8b9bae84016
if you need more help to do the above then please ask in Joomla forums or in PHP programming forums
[EDIT]
of course add the
add additional legal extensions/mime types into com_media configuration
Do you think this PR will merge soon ?
yes, but still this PR does not solve (yet) the configuration issue
You see there is the topic of how the MVC will decide that browsing docs and videos is allowed
Always showing all files
Using (-only-) a parameter in url
and someone by just by adding a parameter to the URL will be able to browse docs and videos in the media folder, before someone would need to know the filename for accessing a file
i suggest that the XTD button proposed in #20969
should have configuration in it
then you would add to the mediaelements URL
&conf_ext=editor_xtd&ext_id=NN
then you would read configuration from the plugin
and display will happen according to the configuration in the plugin and according to the access level (or user-groups) of current user
@ggppdk we can test this PR, or you need still work in something more? I ask because of this:
but still this PR does not solve (yet) the configuration issue
So far, this PR only add the necessary layout for add that type of files, and if is all this PR will do, then we can test it, for see if we can have merged it. After that, we can use part of this code, in the xtd
button feature
Thanks anyone spending time on this PR
No interest in spending more on it by me
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-16 05:37:08 |
Closed_By | ⇒ | ggppdk |
@ggppdk Thank you so much for your code. I was able to use it completely as an override, without having to modify core-files.
That solved my problem with the media-manager in a modal-overlay (when using it as a field-type "media") and still my joomla can be updated :-)
@Robdebert your Comment on #19954 is resolve by your above?
@Robdebert would you mind sharing your override? Maybe as a gist? That would be great!
@level420 and @ghost: Sorry for the late reply.
I created a new issue, becuase i still think, that the media-fieldtype should use the same extensions as com_media allows, when editing the component-parameters. See #30548
Would be great, if you could support this new ticket, because the issue with the media-field is very old (i found a forum post from 2016 also).. and still Joomla-Core does not provide a modal-window fieldtype with the possibility to upload other files then images.
For image fields, PDFs should not be displayed/selectable.
With the PR, the PDF is selectable, but won't display on the frontend to be clickable.