SVG Template by Xon

XF2 ADD-ON SVG Template by Xon 2.3.4

SVG Template by Xon
Compatible XF Versions: 2.1 , 2.2
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;
}
Apache URL rewrite config

Add the rule before the final data/ reference;

Code:
RewriteRule ^data/svg/([^/]+)/([^/]+)/([^/]+)/([^\.]+).svg$ svg.php?svg=$4&s=$1&l=$2&d=$3 [B,NC,L,QSA]
ie, should look similar to;

Code:
# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^data/svg/([^/]+)/([^/]+)/([^/]+)/([^\.]+).svg$ svg.php?svg=$4&s=$1&l=$2&d=$3 [B,NC,L,QSA]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
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.

Latest updates

  1. 2.3.4

    2.3.4

Similar resources

SVG Smilies BlackSpigot.com
0.00 star(s) 0 ratings
Downloads
96
Updated
- [Minecraft] FREE INTRO TEMPLATE  - for Adobe After Effects + C4D Animation and song included K
An AMAZING minecraft intro template for Adobe After Effects + Song, C4D animation, Textures, more!
0.00 star(s) 0 ratings
Downloads
115
Updated
404 - Animated Page Mega Pack Website Template | 19$ K
0.00 star(s) 0 ratings
Downloads
230
Updated
BlackSpigot General Chat
Rules Help Users
    B @ BeingImpossible: Promote your discord server Fast & Free ⚡ Check out: https://dscspot.lol/ get free members
    Top