Author |
Topic  |
|
racerslounge
Starting Member
23 Posts |
Posted - 03 June 2001 : 23:07:08
|
Now I am no programmer, but I have figured out the easiest solution for the bad word filter problem. The problem of the filter filtering out parts of other words, like class, mass, pass, etc... where the a-ss would not show.
The solution is simple. In your bad word filter list, place a space in front and after the word you listed to filter. This will cause the filter to only pick the word up by itself.
http://www.racerslounge.com |
|
e3stone
Average Member
  
USA
885 Posts |
Posted - 03 June 2001 : 23:14:18
|
that would probably work..looking at the old chkBadWords function, there isn't a trim() in it....or just replace the ChkBadWords function in inc_functions.asp with this: 
Function ChkBadWords(fString) Dim regEx, str1 ' Create variables. str1 = fString bwords = split(strBadWords, "|") for i = 0 to ubound(bwords) Set regEx = New RegExp ' Create regular expression. regEx.Pattern = "\b" & bwords(i) & "\b" ' Set pattern. regEx.IgnoreCase = FALSE ' Make case insensitive. str1 = regEx.Replace(fstring, string(len(bwords(i)),"*")) do until str1 = fstring fstring = str1 str1 = regEx.Replace(fstring, string(len(bwords(i)),"*")) loop next ChkBadWords = str1 End Function
<-- Eric --> 
http://insidewaco.com/forum/home.asp |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 04 June 2001 : 08:07:11
|
quote:
that would probably work..looking at the old chkBadWords function, there isn't a trim() in it....or just replace the ChkBadWords function in inc_functions.asp with this: 
Function ChkBadWords(fString) Dim regEx, str1 ' Create variables. str1 = fString bwords = split(strBadWords, "|") for i = 0 to ubound(bwords) Set regEx = New RegExp ' Create regular expression. regEx.Pattern = "\b" & bwords(i) & "\b" ' Set pattern. regEx.IgnoreCase = FALSE ' Make case insensitive. str1 = regEx.Replace(fstring, string(len(bwords(i)),"*")) do until str1 = fstring fstring = str1 str1 = regEx.Replace(fstring, string(len(bwords(i)),"*")) loop next ChkBadWords = str1 End Function
<-- Eric --> 
http://insidewaco.com/forum/home.asp
This solution only works for certain versions of the scripting engine, and may not be supported by your host
|
 |
|
e3stone
Average Member
  
USA
885 Posts |
Posted - 04 June 2001 : 08:19:10
|
This is the one that lets you spell your last name, right? Just making sure I posted the right one
<-- Eric --> 
http://insidewaco.com/forum/home.asp |
 |
|
mrWize
deleted
 
119 Posts |
Posted - 04 June 2001 : 08:34:44
|
If the host don´t have the latest scripting engine I wouldn´t choose that host.
Upgrading to newer engines take out some bugs too from older versions.
cya, //mrWize
|
 |
|
mrWize
deleted
 
119 Posts |
Posted - 04 June 2001 : 08:36:15
|
and one thin more ...
could script to ceck for the engine version and if its Not a 5.x version ... use another function.
in strConnString uses newer versions of MDAC for example .. so, shouldn+t the forum also use a newer engine too?
cya again, //mrWize
|
 |
|
racerslounge
Starting Member
23 Posts |
Posted - 05 June 2001 : 01:19:03
|
It works. I am using it now. Just put a space in front and after the word in your badword list in the administrator section. It will only pick up the word itself.
http://www.racerslounge.com
Edited by - racerslounge on 05 June 2001 01:19:44 |
 |
|
|
Topic  |
|