时尚酷族
标题:
分享Discuz! X2 禁止纯字母纯数字回复修改方法
[打印本页]
作者:
CooL.泪猪
时间:
2012-7-28 15:42
标题:
分享Discuz! X2 禁止纯字母纯数字回复修改方法
修改方法找到:source\include\post\post_newreply.php文件
; C* X! j4 z" P, @! N4 w
搜索:
$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>");
复制代码
修改好之后保存即可!
: z2 j' P7 S: n; P
注:<=5之间的5是内容的字数,文字内容任意修改,喜欢啥改啥,
$ o8 G; \1 e, V4 g$ t
在修改之前建议备份下文件!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* c! G7 w8 f3 m D. e& d! Z
欢迎光临 时尚酷族 (http://www.coqq.net/)
Powered by Discuz! X3.2