-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add file types for media custom field plugin. #45013
base: 5.3-dev
Are you sure you want to change the base?
Conversation
Co-authored-by: Quy Ton <[email protected]>
I have tested this item ✅ successfully on 9a36d9b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
1 similar comment
I have tested this item ✅ successfully on 9a36d9b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
I have tested this item ✅ successfully on 9a36d9b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
Co-authored-by: Brian Teeman <[email protected]>
I have tested this item ✅ successfully on dff217a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
1 similar comment
I have tested this item ✅ successfully on dff217a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
@hans2103 can you test again, please? |
I have tested this item ✅ successfully on dff217a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
1 similar comment
I have tested this item ✅ successfully on dff217a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
Co-authored-by: Quy Ton <[email protected]>
I have tested this item ✅ successfully on 8a2e00b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
1 similar comment
I have tested this item ✅ successfully on 8a2e00b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
I have tested this item ✅ successfully on 8a2e00b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
I have tested this item 🔴 unsuccessfully on 8a2e00b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
php warnings Create a field for documents and in an article select a pdf and save Same for video |
From an accessibility perspective the default text for every link is "download" An option might be to do it the way we do a read more link. eg Download < Filename > Tagging @chmst for their a11y input |
@viocassel how are you testing this? |
I can't repeat the problem. Perhaps this is a MediaHelper and location issue on Windows.
|
for video and audio I would expect the output to be a player not a download. see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video |
To do this, I will need to add new layouts. However, even for pdf, you will want to show them as an |
If a user selects an image and it displays an image then when they select a video they would expect it to display a video etc overrides are for customising the output with a layout is fine but it should work out of the box without an override. |
So we need a Alternatively, I can realize this check in the |
… removed due to its will render their own layouts
I added this. Check it please. |
Testing instructions updated |
When creating a custom field, do you want to be able to select not only images, but also documents, videos, and audio? This PR adds the ability to specify one or more file types for a custom media type field.
Summary of Changes
file types
parameter was added to the field parameters during creation.images
,audios
,videos
,documents
. This list decides which of the allowed file extensions from Media Manager configuration are used.images
file type is selected by default and for empty parameter valuevideos
anddocuments
for exampletypes
. Similar to Media field.Testing Instructions
File types
images
type is selected)See also a modal window title is
Change image
See also that the image has been rendered successfully in the frontend
images
and select adocuments
orvideos
or both of them. Save field params,Change file
See that there is no
alt text
andempty alt
fields, but new fieldlink text
is presentdocuments
file types. The link text isdownload
by default. You can specify your own text.<video>
tag for selected file has been rendered successfully in the frontend forvideo
file types.<audio>
tag for selected file has been rendered successfully in the frontend foraudio
file types.images
. So you have both images and non-images file types selected. Save field params.alt text
andempty alt
fields are present with thelink text
field. So if you'll select an image file - you can use additional field for image. If you'll select a non-image file - you can use alink text
fieldChange file
. Check that you can choose both images and non-images file types.document
file and check that link to download selected file has been rendered successfully in the frontend. Make sure that the link text matches the one specified in the fieldlink text
.Actual result BEFORE applying this Pull Request
You cannot select anything except images in custom fields,
Expected result AFTER applying this Pull Request
Now you can configure file types for custom field type media (wich is a bundle of
media
+text
for alt +checkbox
for empty alt). You can select a mp4 or pdf in your media custom field.alt text
andempty alt
fields. Image will render in frontend.audio
orvideo
file has been selected -<audio>
or<video>
tag will render in frontend.document
file has been selected - you can uselink text
field for download link. Download link will render in frontend.Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed