时尚酷族

标题: 分享Discuz! X2 禁止纯字母纯数字回复修改方法 [打印本页]

作者: CooL.泪猪    时间: 2012-7-28 15:42
标题: 分享Discuz! X2 禁止纯字母纯数字回复修改方法
修改方法找到:source\include\post\post_newreply.php文件- Y) z; N7 M1 @9 u" b
搜索:
  1. $message = preg_replace('/\[attachimg\](\d+)\[\/attachimg\]/is', '[attach]\1[/attach]', $message);
复制代码
在以上代码下一行添加:
  1. if(preg_match_all("/[\xB0-\xF7][\xA1-\xFE]/",$message,$regs)<=5) showmessage(" <b><font color=red>请珍惜你的ID,恶意灌水者会被禁ID封IP,为了尊重楼主的贡献,请输入5个中文以上!</font></b>");
复制代码
修改好之后保存即可!
; S- ]2 m' l" i注:<=5之间的5是内容的字数,文字内容任意修改,喜欢啥改啥,
! `/ I8 Z, `8 C( R  F4 _! t7 M在修改之前建议备份下文件!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
& b  u6 N$ A0 \9 \




欢迎光临 时尚酷族 (http://www.coqq.net/) Powered by Discuz! X3.2