位置:- 正文

为dedecms织梦模板发布文章添加禁用词语过滤功能(织梦使用教程)

编辑:rootadmin

推荐整理分享为dedecms织梦模板发布文章添加禁用词语过滤功能(织梦使用教程),希望有所帮助,仅作参考,欢迎阅读内容。

为dedecms织梦模板发布文章添加禁用词语过滤功能(织梦使用教程)

文章相关热门搜索词:织梦怎么用模板建站,如何用织梦搭建网站,织梦cms官网,如何用织梦搭建网站,织梦cms怎么样,织梦cms怎么样,织梦怎么用模板建站,织梦使用教程,内容如对您有帮助,希望把文章链接给更多的朋友!

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中对应代码部分就可以了。

免责

本文链接地址:https://www.jiuchutong.com/zhishi/310432.html 转载请保留说明!
下一篇链接:https://www.jiuchutong.com/zhishi/310433.html
免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络