|
|
|
Spam and Faoul language filter for shockwave
Added on 5/12/2001
|
Wanna make sure nobody is writing anything out of the ordinary faoul language on your site? use the script to filter the text. Useful if you have a CGI entry form for messages to put in your shockwave movie. Words removed for this example. Substitute the list for your list of words to block.
-- this script is retrieving a text file from your server
-- looks for faoul language, filter it and puts the text into a
-- text sprite
-- usefull for entries made by people on the web, which you use
-- in your shockwave movie
-- made by mouze
property spriteNum
property theNetID
on prepareframe me
theNetID = getNetText ("http://www.yoursite.com/results.txt")
end
on exitFrame me
if netDone(theNetID) then
sprite(43).member.text = netTextResult(theNetID)
end if
-- the spritenumber of the text-sprite, important!
global snrb
snrb=43
global a
global pp
global ppr
ppr = list ("insert", "words", "that", "you", "want", "to", "block")
repeat with i = 1 to the number of words in sprite(snrb).member.text
put word i of sprite(snrb).member.text
-- repeat with number of words in list, find faoul language
repeat with pp= 1 to 15
if word i of sprite(snrb).member.text= getat(ppr,pp) then
sprite(snrb).member.word[i] = "xxxx"
end if
end repeat
-- if message is too long cut if off, leave standard entry
end repeat
if sprite(snrb).member.text.char.count > 100 then
put "to much"
sprite(snrb).member.text="I like it!! keep it up"
end if
end
|
|