mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #24947
[Bug 1416890] Re: Use SVG images and provide backward compatibility
Here's the patch for this improvment.
What is covered:
* Appel THEME->get_url() becomes THEME->get_image_url()
* Dans les templates, theme_url becomes theme_image_url
What is not covered :
* Create method call get_image_url in javascript
* Allow to use SVG in thumbnails (thumbs.php Files)
* Create a method to relative links (used $ smarty-> assign ('maharalogofilename', 'images / Site-logo-small .png')).
* Fix for atom.php files and viewlayout.php to get_config size ('wwwroot'). 'Theme / raw / static / images / logo.png Site';
* Manage License images svg (license.php)
* Manage themepaths () function in lib / web.php
Also, I have not implemented cache because it seemed too expensive.
A general cache solution like memcached seems a better solution.
However, this should not add significant load because the use of the svg file is disabled bu default.
Only theme using will check for this format.
To test, make sure all the lines of code have been replaced.
Otherwise, run the following load test:
phpunit ThemeTest htdocs/lib/tests/phpunit/ThemeTest.php
Finnally, the documentation may be updated once this task is accepted.
To be peer-reviewed.
--
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