Resource icon

SVG Template by Xon 2.0.3

No permission to download
Compatible XF 2.x versions
2.0, 2.1
Additional requirements
php 5.6+
License
MIT License
Visible branding
No
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:
svg.php?svg=<templateName>&s=<style_id>&l=<langauge_id>&d=<style_last_modified>
Nginx URL rewrite config

Code:
location ^~ /data/svg/ {
  access_log off;
  rewrite ^/data/svg/([^/]+)/([^/]+)/([^/]+)/([^\.]+).svg$ /svg.php?svg=$4&s=$1&l=$2&d=$3$args last;
  return 403;
}

Contributing features or bug fixes
Please create a Github Pull request via the "More Information" link.

Contributions

If you appreciate this addon, please consider a contribution via PayPal. Details will be provide via private conversation.

Please contact me if you wish for different licencing arrangements.
Reactions: Matt C.
Author
Xon
Downloads
21
Views
28
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Xon

Latest updates

  1. 2.0.3 - Maintenance update

    Disable individual CSS template caching integration. SVG's are long lived and if served via...
  2. 2.0.2 - Maintenance/bugfix update

    Update suggested nginx to capture 'k' argument Support XF1 version arguments (style/language vs...
  3. 2.0.1 - Maintenance update

    Improve handling of svg template from when friendly urls is enabled/disabled
Top