dedecms源碼中在互動部分有詞語過濾功能,但是文章部分沒有添加此功能,我們自己手動添加下發(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();
        }
    }
如果需要在編輯也加入禁用詞語過濾功能就打開/dede/article_edit.php安裝上面的再操作一次即可。