-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Add file types for media custom field plugin. #45013
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
base: 6.0-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. |
This was an unrelated issue and solved elswhere |
If {filename} shortcode is found - it will be replaced
added a `{filename}` short code processing
added wasted basename()
|
@rdeutz can I do anything else for this PR? |
Fix typo in variable name
@QuyTon can I do anything for this PR? I forgot make a separate branch for PR and then I can't do another one till this PR will be merged (( |
@QuyTon @rdeutz @brianteeman @laoneo Joomla 6.0.0 beta1 is coming in 2 days. It means a feature freeze for J6. This PR was succesfully tested and marked as |
the people to tag are the release leads @softforge @Bodge-IT |
Thank you! |
Hi @sergeytolkachyov, this only hit our radar on Sunday and we were locked by then. We had opinion this still needed resolutions. |
Can I do anything for this pr or it will wait for j6.1? |
|
If you have any questions, feel free to ask me. I myself see several potential ways to improve consistency, but this will generally require discussion with other developers before implementation. |
Dear @sergeytolkachyov, first, thank you for all your work and patience so far. |
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