Feature ? PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar obuisard
obuisard
21 Sep 2023

Summary of Changes

It is possible to assign SVG files to banners, however, the module does not reflect it, only allowing image files.

Notes:

An isImage function was created specifically for Banners. However, it should not be necessary to have such a function since the MediaHelper offers it as well. To ensure Banners support the same image file extensions as the rest of the core, I opted for the use of the MediaHelper instead.

SVG files act a bit differently than image files.
When forcing a width and a height on a image, the image will 'follow' those dimensions.
A SVG file will be scaled to fit its defined viewport. So it won't 'obey' a specific height if you set one for the banner.
Depending on your situation, you may have to restrict the SVG's height with max-height.

Use of SVGs in mod_banners is safe, the SVG files are checked in MediaHelper::getMimeType.

Testing Instructions

Create banners in the administration console. Some use standard image files, some use SVG files.

Actual result BEFORE applying this Pull Request

Only banners with standard image files are shown.

Expected result AFTER applying this Pull Request

Banners with standard image files and SVG files are shown.

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: link (about the deprecation)

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 21 Sep 2023
Category Unit Tests Repository Administration com_admin SQL
avatar obuisard obuisard - open - 21 Sep 2023
avatar obuisard obuisard - change - 21 Sep 2023
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Sep 2023
Category Unit Tests Repository Administration com_admin SQL Front End com_banners Modules
avatar obuisard obuisard - change - 21 Sep 2023
The description was changed
avatar obuisard obuisard - edited - 21 Sep 2023
avatar obuisard obuisard - change - 21 Sep 2023
The description was changed
avatar obuisard obuisard - edited - 21 Sep 2023
avatar obuisard obuisard - change - 21 Sep 2023
The description was changed
avatar obuisard obuisard - edited - 21 Sep 2023
avatar obuisard obuisard - change - 21 Sep 2023
The description was changed
avatar obuisard obuisard - edited - 21 Sep 2023
avatar obuisard obuisard - change - 21 Sep 2023
The description was changed
avatar obuisard obuisard - edited - 21 Sep 2023
avatar ceford ceford - test_item - 26 Sep 2023 - Tested successfully
avatar ceford ceford - test_item - 26 Sep 2023 - Tested successfully
avatar ceford
ceford - comment - 26 Sep 2023

I have tested this item ✅ successfully on 611d72e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41854.

avatar chmst chmst - test_item - 26 Sep 2023 - Tested successfully
avatar chmst
chmst - comment - 26 Sep 2023

I have tested this item ✅ successfully on 611d72e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41854.

avatar HLeithner
HLeithner - comment - 30 Sep 2023

This pull request has been automatically rebased to 5.1-dev.

avatar Quy Quy - change - 5 Oct 2023
Status Pending Ready to Commit
Labels Added: PR-5.1-dev
avatar Quy
Quy - comment - 5 Oct 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41854.

avatar Razzo1987 Razzo1987 - change - 2 Nov 2023
Labels Added: Feature ?
avatar Razzo1987 Razzo1987 - change - 2 Nov 2023
Labels Added: ?
Removed: ?
avatar Razzo1987 Razzo1987 - change - 2 Nov 2023
Labels Added: ?
Removed: ?
avatar Razzo1987 Razzo1987 - test_item - 2 Nov 2023 - Tested successfully
avatar Razzo1987
Razzo1987 - comment - 2 Nov 2023

I have tested this item ✅ successfully on 9755714

Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41854.

avatar Razzo1987 Razzo1987 - close - 2 Nov 2023
avatar Razzo1987 Razzo1987 - merge - 2 Nov 2023
avatar Razzo1987 Razzo1987 - change - 2 Nov 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-11-02 21:59:43
Closed_By Razzo1987
Labels Added: ?
Removed: ?
avatar obuisard obuisard - change - 2 Nov 2023
The description was changed
avatar obuisard obuisard - edited - 2 Nov 2023
avatar obuisard obuisard - change - 2 Nov 2023
The description was changed
avatar obuisard obuisard - edited - 2 Nov 2023
avatar obuisard obuisard - change - 2 Nov 2023
The description was changed
avatar obuisard obuisard - edited - 2 Nov 2023
avatar obuisard obuisard - change - 2 Nov 2023
The description was changed
avatar obuisard obuisard - edited - 2 Nov 2023
avatar obuisard obuisard - change - 2 Nov 2023
The description was changed
avatar obuisard obuisard - edited - 2 Nov 2023

Add a Comment

Login with GitHub to post a comment