网站服务商排名,wordpress 注册码,电子元器件网站怎么做,wordpress 页面 背景图后台先在扩展——敏感词管理中添加敏感词#xff0c;然后修改phpcms\modules\content\content.php文件来实现添加或者编辑内容时敏感词的替换。#xff08;如果涉及会员投稿和留言等#xff0c;也需要在对应模块中做类似处理#xff09;
在ad…后台先在扩展——敏感词管理中添加敏感词然后修改phpcms\modules\content\content.php文件来实现添加或者编辑内容时敏感词的替换。如果涉及会员投稿和留言等也需要在对应模块中做类似处理
在add方法和edit方法中if(trim($_POST[info][title])) showmessage(L(title_is_empty));下方添加如下代码
//敏感词替换操作开始
$this-badword_model pc_base::load_model(badword_model);
$badword_array$this-badword_model-select();
if(!empty($badword_array)){foreach($badword_array as $key_index$badword_one){$_POST[info][title]str_replace($badword_one[badword],$badword_one[replaceword],$_POST[info][title]);$_POST[info][content]str_replace($badword_one[badword],$badword_one[replaceword],$_POST[info][content]);}
}
//敏感词替换结束