mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #24976
[Bug 1416890] Re: Use SVG images and provide backward compatibility
Hi Kristina,
By default, There is no SVG used at all.
I have added a config, disabled by default, that allow the use of SVG in a theme.
This config must be enabled in the themeconfig.php like this to allow the use of SVG images :
$theme->usesvg = true;
The site-logo.svg was only added as an example and to be used in the
phpunit tests.
I coded this functionality in this way in order not to degrade
performance when calling the images and to avoid unnecessary search for
SVG files if the theme simply do not use and to allow a iterative
development that will allow you to make the conversion or the addition
of SVG icons.
In short, if you want to manually test the use of SVG files, simply add
"$theme->usesvg = true;" in the themeconfig.php file of the raw theme or
in any theme of your choice. One enabled, you should see site-logo.svg
in the header of the page.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1416890
Title:
Use SVG images and provide backward compatibility
Status in Mahara ePortfolio:
In Progress
Bug description:
Suggestion by Gilles-Philippe Leblanc:
In the Moodle software, the images are all managed by a cascade system.
The function initially looking if a svg file exists, then a png, then gif, jpg and ico.
This lets you use a svg file and maintain backward compatibility.
The system also detects if the browser supports SVG. Generally, all
browsers support this format except Internet Explorer 8 and below.
Everything is cached to avoid unnecessary calculation.
So I was wondering if it was planned to add the following components to do this:
* A library for browser detection on the server side
* A function to find the right file extension
* A library for caching php
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1416890/+subscriptions
References