LeadWit CMS利用脏话过滤设置实现预设关键字功能!

来自站长百科
跳转至: 导航、​ 搜索

导航:返回上一页

LeadWit CMS利用脏话过滤设置实现预设关键字功能!


在后台脏话过滤设置中,预先设置关键字替换链接,文章中出现预先设置的关键字,则会自动加上链接


步骤: 1.打开inc/Lz8_Class.asp文件,找到以下内容: <per> '脏话过滤 Public Function ChkBadWords(Str)

 If IsNull(Str) Then Exit Function
 Dim i,rBadWord,tempBadWord
 tempBadWord = Split(LZ8.BadWords,"|||")(0)
 tempBadWord = Split(tempBadWord,"|")
 For i = 0 To Ubound(tempBadWord)
  rBadWord = Split(tempBadWord(i),"=")
  Str = Replace(Str,rBadWord(0),rBadWord(1))
 Next
 ChkBadWords = Str

End Function

改成:

'脏话过滤 Public Function ChkBadWords(Str)

 If IsNull(Str) Then Exit Function
 Dim i,rBadWord,tempBadWord
 tempBadWord = Split(LZ8.BadWords,"|||")(0)
 tempBadWord = Split(tempBadWord,"|")
 For i = 0 To Ubound(tempBadWord)
  rBadWord = Split(tempBadWord(i),"@")
  Str = Replace(Str,rBadWord(0),rBadWord(1))
 Next
 ChkBadWords = Str

End Function

即将"="改成"@" </per>

2.在后台脏话过滤设置,设置你的关键字,如 论坛@<a href=http://www.12124.com/bbs target=_blank>论坛</a>

其它的脏话过滤只需要将原来的=改成@就行了!


参考来源[ ]