Depending on configuration, this add-on requires webserver URL rewrite support!
Allows SVG (Scalable Vector Graphics) images to be stored as templates. This creates a new svg.php file in the XF root directory.
To generate a link to an SVG template;
Code:
{{ getSvgUrl('tempate.svg') }}
Under Board information, if "Use Full Friendly URLs" (useFriendlyUrls) is set the URL generated is:
Code:
/data/svg/<style_id>/<langauge_id>/<style_last_modified>/<templateName>.svg
Otherwise
Code...
- Support getSvgUrlAs('tenplate.svg', 'png') in style properties
- Support getSvgUrlAs('tenplate.svg', 'png') in style properties
- Work-around for non-desirable caching behaviour when CloudFlare (or similar) is forced to cache svg.php output
- Prevent polluting of caches if the time-stamp is in the future
- Require XenForo 2.2+
- Require StandardLib v1.11.0+
- Improve support for rendering templates in the mail & api contexts by correctly injecting template filters/functions into multiple rendering contexts
- Compat fix when zlib output compression is enabled for PHP8.0.17+/PHP8.1.4+
- Fix "XFCP_TemplaterHelper not found" error when upgrading the StandardLib add-on via the GUI
- If this has happened, upload the files for this add-on. Then rebuild StandardLib add-on, then run the updater this add-on.
- Fix issue using getSvgUrl/getSvgUrlAs in style properties with a template without an extension would cause CSS to fail to render
- Fix for race condition when creating temp files when encoding svg => png using resvg.
- Update README.md to link to updated precompiled binary for resvg (v0.14.1 => v0.23.0)
- Improve error messages when saving invalid SVGs as templates
- Compatibility update with SV/StandardLib v1.14+, still compatible with SV/StandardLib v1.11+
- Fix template validation ran on the master style instead of the current selected style
- Fix for upcoming XF2.3 compatibility, as Doctrine Cache been documented as being removed.
- Fix error running "xf:rebuild-master-data" when the exact template directory structure is missing and the SVG template is the first template compiled for that style.
- Fix possible compatibility issues with other add-ons extending SV/StandardLib's template helper code
- Fix SVG template validation was broken which could result in preventing adding a language or style from working correctly (or rebuilding master data)
- Require php 7.2+
- Require StandardLib v1.18.0+
- If using resvg support, recommend updating to v0.35.0.
Pre-compiled linux x86_64 binary has been made available here.
Compiled on CentOS 7, works on Ubuntu 18.04/20.04/22.04- Document using resvg v0.35.0+ with "CLI - Pipe" mode, which avoid temporary files when converting SVGs to PNGs
Example using...
- Fix internal server error being generated instead of a 404 when requesting an invalid svg
- Fix "[E_DEPRECATED] strlen(): Passing null to parameter #1 ($string) of type string is deprecated" when attempting to save a new template with an invalid name
Requires StandardLib v1.19.0+
If installed, requires Redis Cache 2.17.0+
XF2.3 compatibility update
php 8.4 compatibility fix