本文整理自网络,侵删。
dedecms(本例为V57_UTF8_SP1)中在互动部分有词语过滤功能,但是文章部分没有添加此功能,我们自己手动添加下发布文章禁用词语过滤功能。
在/dede/article_add.php中的代码:
if(!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { $arcrank = -1; }
之前添加代码:
//词汇过滤检查 if( $cfg_notallowstr != '' ) { if(preg_match("#".$cfg_notallowstr."#i", $title)) { ShowMsg("title has not allow words!","-1"); exit(); } if(preg_match("#".$cfg_notallowstr."#i", $shorttitle)) { ShowMsg("shorttitle has not allow words!!","-1"); exit(); } if(preg_match("#".$cfg_notallowstr."#i", $description)) { ShowMsg("description has not allow words!","-1"); exit(); } if(preg_match("#".$cfg_notallowstr."#i", $body)) { ShowMsg("body has not allow words!","-1"); exit(); } }
同时修改/dede/article_edit.php中对应代码部分就可以了。
标签:织梦DedeCMS
相关阅读 >>
织梦DedeCMS调用得到文章所属的副栏目id及副栏目名称的教程
dedecms文章关键字(自动内链)php5.5以上版本urf-8失效的解决方法
dedecms error copy uploadfile error!上传图片失败解决方法
详解织梦手机端搜索时候直接调用search_m.htm手机站页面的办法
更多相关阅读请进入《织梦DedeCMS》频道 >>