跳转到帖子
创建新的...

SVG 模板 组件 2.4.2

   (0篇评论)

1张截图

根据配置,此附加组件需要网络服务器 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

用户反馈

参与讨论

你可立刻发布并稍后注册。 如果你有帐户,立刻登录发布帖子。

游客

如果您喜欢此站内容并希望激励网站进一步内容创建和维护,请考虑捐赠。

×
×
  • 创建新的...

重要信息

条款 隐私政策 指南 已在你的设备放置Cookie来帮助论坛更好。你可以调整Cookie设置,否则认为你可以接受并继续。