<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

为dedecms发布文章添加禁用词语过滤功能

时间:2020-12-21

dedecms(本例为V57_UTF8_SP1)中在互动部分有词语过滤功能,但是文章部分没有添加此功能,我们自己手动添加下发布文章禁用词语过滤功能。

dedecms发布文章添加禁用词语过滤功能(图示)

在/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中对应代码部分就可以了。
0
首页
案例
关于
联系