点标签看更多好帖

[模板主题] AllsitePasswd 全站密码访问插件 支持自定义主题模板

[复制链接]

3431

主题

0

回帖

1万

积分

管理员

积分
10407
分享到:
发表于 2026-8-20 20:09:42 | 显示全部楼层 |阅读模式
AllsitePasswd 是一款启用全站密码访问插件,支持自定义主题模板呆滞
欢迎 fork,start
说明:插件默认自带一套模板
用户可以自定义模板,把你的HTML模板文件放进theme文件夹,html起名叫index.html
但注意引用图片,css,js等文件时需要使用绝对路径。
比如:
-AllsitePasswd
|- theme
|- css/a.css
|- js/b.js
|- index.html
这个时候 index.html 里面引入a.css的路径为
<blockquote style="white-space: normal; box-sizing: inherit; margin: 15px 0px 20px; padding: 10px 45px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; border-radius: 3px; background-color: rgb(248, 248, 250); color: rgb(85, 85, 85); font-family: &quot;Helvetica Neue&quot;, Helvetica, &quotingFang SC&quot;, Tahoma, Arial, sans-serif; font-size: 14.08px;">/usr/plugins/AllsitePasswd/theme/css/a.css
</blockquote>同样引入 js 路径为
<blockquote style="white-space: normal; box-sizing: inherit; margin: 15px 0px 20px; padding: 10px 45px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; border-radius: 3px; background-color: rgb(248, 248, 250); color: rgb(85, 85, 85); font-family: &quot;Helvetica Neue&quot;, Helvetica, &quotingFang SC&quot;, Tahoma, Arial, sans-serif; font-size: 14.08px;">/usr/plugins/AllsitePasswd/theme/js/b.js
</blockquote>在 html 文件中可以用的替代变量,只需要把html对应位置换成以下变量即可。只针对 index.html 有效鼓掌。
<blockquote style="white-space: normal; box-sizing: inherit; margin: 15px 0px 20px; padding: 10px 45px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; border-radius: 3px; background-color: rgb(248, 248, 250); color: rgb(85, 85, 85); font-family: &quot;Helvetica Neue&quot;, Helvetica, &quotingFang SC&quot;, Tahoma, Arial, sans-serif; font-size: 14.08px;">&#39;{theme_base_path}&#39;,// 绝对路径,指向 /usr/plugins/AllsitePasswd/theme/
&#39;{str_word}&#39;, // 后台配置的提示文字
&#39;{url_pic}&#39;, // 后台配置的提示图片
&#39;{err_msg}&#39;,// 密码错误输出消息
&#39;{form_action}&#39;,// form表单提交的 url ,也就是 action=&#39;{form_action}&#39;
&#39;{input_placeholder}&#39;,// 后台配置的输入框提示
&#39;{submit_text}&#39;,// 后台配置的提交按钮
&#39;{commic_pic}&#39; // 插件自带的动漫图 api,比如:&lt;img src=&quot;{commic_pic}&quot;&gt;
</blockquote>还有就是输入密码那个 input 的name属性:
<blockquote style="white-space: normal; box-sizing: inherit; margin: 15px 0px 20px; padding: 10px 45px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; border-radius: 3px; background-color: rgb(248, 248, 250); color: rgb(85, 85, 85); font-family: &quot;Helvetica Neue&quot;, Helvetica, &quotingFang SC&quot;, Tahoma, Arial, sans-serif; font-size: 14.08px;">name=&quot;index_passwd&quot;
</blockquote>举个栗子:&amp;蛆音疑惑蛆音疑惑:
<blockquote style="white-space: normal; box-sizing: inherit; margin: 15px 0px 20px; padding: 10px 45px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative; border-radius: 3px; background-color: rgb(248, 248, 250); color: rgb(85, 85, 85); font-family: &quot;Helvetica Neue&quot;, Helvetica, &quotingFang SC&quot;, Tahoma, Arial, sans-serif; font-size: 14.08px;">&lt;form action=&quot;{form_action}&quot;&gt;
&lt;input name=&quot;index_passwd&quot; type=&quot;password&quot; placeholder=&quot;{input_placeholder}&quot; /&gt;
&lt;input type=&quot;submit&quot; value=&quot;{submit_text}&quot;&gt;
&lt;/form&gt;
</blockquote>
效果图:


下载地址:AllsitePasswd 全站密码访问插件 支持自定义主题模板.zip
回复

使用道具 举报

使用高级回帖 (可批量传图、插入视频等)快速回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则   Ctrl + Enter 快速发布  

发帖时请遵守我国法律,网站会将有关你发帖内容、时间以及发帖IP地址等记录保留,只要接到合法请求,即会将信息提供给有关政府机构。
快速回复 返回顶部 返回列表