影子江湖 發表於 2024-12-19 22:20:03

给个人资料页面添加个B站那种该账号已封禁提示

<br /><br /><img title="a27c5e8c-9bfd-4bfd-a188-d2e4866ee127.png" id="aimg_33483" aid="33483" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202412/19/215927xgygsl7ltg63ykot.png" src="https://www.dismall.com/data/attachment/forum/202412/19/215927xgygsl7ltg63ykot.png" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br />大家好久不见,我又来给大家带来好东西了<br /><br />我这人就爱分享,不像某些人,给那些拿烂大街的代码卖钱的人说话<br /><br /><br /><br />我是在3.4下操作的,3.5自行研究<br /><br /><br /><br />如果你用的是第三方模板,那就不用区分3.4还是3.5了,应该都可以用<br /><br /><br />找到template/你的模板/home里的space_profile.php文件,默认模板应该是html格式<br /><br />反正前缀是space_profile,因为这个是个人资料页面文件<br /><br />然后在这个文件里找到要插入的地方<br /><br />就拿官方这个模板来说 就是找到&lt;div class=&quot;comiis_uhdd cl&quot;&gt; 在这段代码的上方加入下面的代码【<font color="#ff0000">这个是官方论坛的个人资料页面顶部代码,你网站如果是第三方模板需要自己审查元素找</font>】<br /><font color="#ff0000"><br /></font><br /><font color="#ff0000">每个模板代码不一样,这个需要你自己在你网站的个人资料页面审查元素找到合适的代码<br /></font><br /><br />&lt;div class=&quot;h-forbid&quot; style=&quot;display: block;&quot;&gt;&lt;div class=&quot;f-wrap&quot;&gt;&lt;i class=&quot;f-icon&quot;&gt;&lt;/i&gt;&lt;span class=&quot;f-txt&quot;&gt;该账号封禁中&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;<br />&lt;script src=&quot;template/你模板/js/script.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br /><br />那个JS的代码不一定是放在模板里的JS文件夹里,也可以放在其他地方 反正路径别错了就行<br /><br />JS是判断该账号是否为禁止访问用户组,如果是就显示该账号封禁中,如果不是就不显示<br /><br /><br />我弄的是禁止访问,至于禁止发言就需要你自己研究了,反正在JS代码里进行判断用户组的<br /><br />判断的方式就是用户组的ID<br /><br />然后就是CSS代码了<br /><ol><li>.h-forbid {<br /><li>&nbsp; &nbsp; height: 42px;<br /><li>&nbsp; &nbsp; margin-bottom: 10px;<br /><li>&nbsp; &nbsp; background-color: #e5e9ef;<br /><li>&nbsp; &nbsp; border-radius: 4px;<br /><li>}<br /><li>.f-wrap {<br /><li>&nbsp; &nbsp; width: 203px;<br /><li>&nbsp; &nbsp; margin: 0 auto;<br /><li>}<br /><li>i.f-icon {<br /><li>&nbsp; &nbsp; background-image: url(你的图片路径/161149ly0gn7mzgnbsnby2.png);<br /><li>&nbsp; &nbsp; /* background-position: -664px -458px; */<br /><li>&nbsp; &nbsp; display: inline-block;<br /><li>&nbsp; &nbsp; width: 80px;<br /><li>&nbsp; &nbsp; height: 42px;<br /><li>&nbsp; &nbsp; margin-right: 20px;<br /><li>}<br /><li>span.f-txt {<br /><li>&nbsp; &nbsp; font-size: 14px;<br /><li>&nbsp; &nbsp; color: #222;<br /><li>&nbsp; &nbsp; line-height: 42px;<br /><li>&nbsp; &nbsp; display: inline-block;<br /><li>&nbsp; &nbsp; vertical-align: top;<br /><li>}</ol><br /><br />把CSS放进你模板里的extend_common.css最底下,如果没生效那就是extend_module.css<br /><br />反正哪个能生效就放进哪个,也可以都放<br /><br />这样就完成了,下面是JS文件和那个骷髅头图片素材<br /><img title="161149ly0gn7mzgnbsnby2.png" id="aimg_33484" aid="33484" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202412/19/221552cqmzayyr96yjj6yy.png" src="https://www.dismall.com/data/attachment/forum/202412/19/221552cqmzayyr96yjj6yy.png" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="83" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><ignore_js_op><span style="white-space: nowrap" id="attach_33485" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})">script.zip<em class="xg1">(477 Bytes, 下载次数: 424)</em></span>2024-12-19 22:16 上传点击文件名下载附件</ignore_js_op><br /><br />本帖<em>, </em>最后<em>, </em>影子<em>, </em>江湖<em>, </em>2024-12-19

鸿茂传媒 發表於 2024-12-20 07:55:57

路过,感谢分享

三姐 發表於 2024-12-20 09:39:32

帅气的美化~

碉堡了 發表於 2024-12-20 11:24:17

可以可以

ysx24 發表於 2024-12-20 18:03:25

感谢分享,赞一个

NKLI 發表於 2025-3-31 15:09:31

感谢大佬
頁: [1]
查看完整版本: 给个人资料页面添加个B站那种该账号已封禁提示