Resource icon

Svg Template by Xon 1.6.1

No permission to download
  • 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)
  • 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
  • Like
Reactions: Nirjonadda
  • Support getSvgUrlAs('tenplate.svg', 'png') in style properties
  • Like
Reactions: Nirjonadda
  • 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
  • Like
Reactions: maximeguinard
  • 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 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 | sh
      source $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
  • Fix "Support SVG url's in XF routing layer" option
  • Like
Reactions: maximeguinard
Back
Top Bottom