时尚酷族
标题:
分享Discuz! X2 禁止纯字母纯数字回复修改方法
[打印本页]
作者:
CooL.泪猪
时间:
2012-7-28 15:42
标题:
分享Discuz! X2 禁止纯字母纯数字回复修改方法
修改方法找到:source\include\post\post_newreply.php文件
3 J( D" d; V4 y' c% Z. t1 x
搜索:
$message = preg_replace('/\[attachimg\](\d+)\[\/attachimg\]/is', '[attach]\1[/attach]', $message);
复制代码
在以上代码下一行添加:
if(preg_match_all("/[\xB0-\xF7][\xA1-\xFE]/",$message,$regs)<=5) showmessage(" <b><font color=red>请珍惜你的ID,恶意灌水者会被禁ID封IP,为了尊重楼主的贡献,请输入5个中文以上!</font></b>");
复制代码
修改好之后保存即可!
# t5 s* t5 H8 `) k0 W& @
注:<=5之间的5是内容的字数,文字内容任意修改,喜欢啥改啥,
) m3 u9 o8 a- G& O: ~1 F
在修改之前建议备份下文件!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: a: J$ L" }8 U0 @; I) p) |
欢迎光临 时尚酷族 (http://www.coqq.net/)
Powered by Discuz! X3.2