dedecms(本例為V57_UTF8_SP1)中在互動(dòng)部分有詞語過濾功能,但是文章部分沒有添加此功能,我們自己手動(dòng)添加下發(fā)布文章禁用詞語過濾功能。

在/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(); } } |
同時(shí)修改/dede/article_edit.php中對應(yīng)代碼部分就可以了。



















