-
-
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: 6.0-dev
Are you sure you want to change the base?
Conversation
…ring) of type string is deprecated (joomla#44876)
Co-authored-by: Brian Teeman <brian@teeman.net>
Co-authored-by: Quy Ton <quy@nomonkeybiz.com>
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 <brian@teeman.net>
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 <quy@nomonkeybiz.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
… channel or stability options (joomla#44954)
@gug2 @web-eau-net @hans2103 @viocassel can you test again? |
I have tested this item ✅ successfully on 887919c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45013. |
still get php warning on non-image media example
|
Can you reproduce this issue on other Joomla installation? |
@QuyTon is there a ready-made preset of the Joomla code style for Php Storm? I use PSR-12 for formatting code, but at the same time, the alignment of the code does not occur as (as far as I understand) it is required in the Joomla core. This results in a lot of unnecessary commits. |
All new feature have to go into 6.0, rebased the PR, sorry |
https://joomlacommunity.cloud.mattermost.com/main/pl/ja16arwf7jrrxkqfmxs8dqo6dw Is there any generally accepted approach in this regard? In the semver yes, this PR should get into 6.0. However, I was informed in the chat that there was a chance to get into 5.3 (see screenshot). I decided to abandon a third-party plugin on my projects that implements this functionality and add it to the core. And I tried to make it just because I was informed that it was possible to add it to 5.3, which will be released soon (April). I'm not sorry for the work done, and I'm glad that after successful testing, I hope it will be included in the core. But now I have to wait until the fall and use a third-party extension... And also make sure that maybe some other PR can do about the same thing or make changes that may affect the already tested code. |
not sure what you are asking me for. I tested this and reported a bug and there have been no changes by you since then so nothing will have changed |
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