dedecms源碼中在互動(dòng)部分有詞語(yǔ)過(guò)濾功能,但是文章部分沒(méi)有添加此功能,我們自己手動(dòng)添加下發(fā)布文章禁用詞語(yǔ)過(guò)濾功能。
打開(kāi)/dede/article_add.php文件
找到
if(!TestPurview('a_Check,a_AccCheck,a_MyCheck'))
   {
       $arcrank = -1;
   }
在它上面加入
//詞匯過(guò)濾檢查
  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();
        }
    }
如果需要在編輯也加入禁用詞語(yǔ)過(guò)濾功能就打開(kāi)/dede/article_edit.php安裝上面的再操作一次即可。