- 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.
- 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+
- 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
- Reject attempting to save an SVG template with no elements
- Require Standard Lib by Xon v1.1.0+
- Force usage of global functions so php can optimize them into special bytecode instead of function calls
- Fix disabling generating png links if svg => png is not configured
- Improve installer to report svg => svg conditions which can block usage
- Use "canonical" URL before XF2.2.3 as "full" doesn't work as expected in all contexts
- Add basic validation that an SVG template should render correctly
- Add an optimization pass for SVG's. Prunes pruning whitespace and nodes/attributes known to be safe to remove. Includes minifying any inline css.
- Support LESS/CSS in SVG's
<style>
element.- Add option "Render SVG's as PNG for mobile devices", this supports rewriting calls to
getSvgUrl
from .svg to .png
- Requires NulledTeam - Brower Detection v2.1.0+ add-on
- Requires updating webserver URL rewrite urls to support PNGs
- Caching requires explicitly defining a caching context with the name "sv-svg-img" or "css".
- Supports Imagick or CLI executables as a back-end to render SVGs to PNGs.
Using Imagick is not recommended- Example using resvg, as a CLI-executable back-end;
/usr/local/bin/resvg --quiet {sourceFile} {destFile}
This requires compiling using Rust, or use the pre-compiled linux x86_64 binary here.
Compiling can be done with;
Code:curl https://sh.rustup.rs -sSf | shsource $HOME/.cargo/env cargo install resvg cp ~/.cargo/bin/resvg /usr/local/bin/resvg chmod +x /usr/local/bin/resvg
- Minor code cleanup, avoid connecting to master redis instance to only connect to a replica instance on rendering cached output
- Compatibility fix for Lazy Image loader add-on when Threadmarks Pro is installed
- Fix that svg templates may not be correctly rendered when friendly URLs are disabled