Jump to content

SVG 模板 组件

SVG 模板 组件 2.4.2

   (0 reviews)

1 Screenshot

根据配置,此附加组件需要网络服务器 URL 重写支持!

允许将 SVG(可缩放矢量图形)图像存储为模板。 这将在 XF 根目录中创建一个新的 svg.php 文件。

生成指向 SVG 模板的链接;
 

代码:
{{ getSvgUrl('tempate.svg') }}

 

在 Board 信息下,如果设置了“使用完整的友好 URL”(useFriendlyUrls),则生成的 URL 为:
 

代码:
/data/svg/<style_id>/<langauge_id>/<style_last_modified>/<templateName>.svg

 


否则
 

代码:
svg.php?svg=<templateName>&s=<style_id>&l=<langauge_id>&d=<style_last_modified>

 

Nginx URL 重写配置
 

代码:
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 重写配置

在最终数据/参考之前添加规则;
 

代码:
RewriteRule ^data/svg/([^/]+)/([^/]+)/([^/]+)/([^\.]+).svg$ svg.php?svg=$4&s=$1&l=$2&d=$3 [B,NC,L,QSA]

 

即,应该看起来类似于;
 

代码:
#    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]

 

贡献功能或错误修复
请通过“更多信息”链接创建一个 Github Pull 请求。

链接失效或无资源请在页面下方评论告知,本站会及时更新链接!不建议使用迅雷下载本站文件,如遇应版权方要求不能下载请更换其它下载工具!本站推荐开源BT下载工具(本站搜索):qbittorrent

User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
shape1
shape2
shape3
shape5
shape7
shape8
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy Guidelines We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.