Is there any way to stop guestbook abuse?

Discussion in 'Software' started by wolfdogg, Sep 22, 2004.

Thread Status:
Not open for further replies.
  1. wolfdogg

    wolfdogg Private E-2

    I use a FrontPage guestbook, which works quite well. It captures guest's comments as well as the IP and date and time they entered the comment...exactly what I want, and all from a quick and easy template. I've not had any problems thus far with users leaving foul language in my guestbook, but I thought I would act proactively and see if anyone knew of a way/script to stop cussing, cursing and profanity in general? I was thinking that a script might exist that would substitute asteriks in a log anytime a cuss word was entered, before it was actually published to the page. I did a google search but couldn't find anything. It seems like it would be possible to have a list of cuss words that I could enter and any time the script found a match, it would just sub the asteriks. Any ideas, anyone?
    Much thx!
    jk
     
  2. Kodo

    Kodo SNATCHSQUATCH

    not only that, but it should strip HTML tags as well.

    I'd suggest skipping the frontpage guestbook way of doing things and go straight to the script of coding a guestbook.

    try this
    http://www.haneng.com/lessons_4.asp
     
  3. wolfdogg

    wolfdogg Private E-2

    I found a way. I copied the script from http://codedata.box.sk/js/script11965.txt.html

    I copied the script into a new page (copy to notepad first if you're using FrontPage because it likes to stick @alt tags in the html) to test and it worked great (Put the script between the <head> and </head> tags.

    Then.. I went in and just added the OnBlur line to my text box:
    <textarea name="Comments" rows="5" cols="70" onBlur = "this.value = checkForProfanity(this.value);"></textarea>

    Now.. whenever anyone tries to enter one of the cuss words in the box, and tabs out to submit, they are prompted not to use the curse word. Very cool. Yes.. I know, some people will work at getting around this by doing variations such as D*O*R*K or whatever... but then I always have the power of delete. This will suffice and discourage the majority.
    Thanks all!
     
  4. goldfish

    goldfish Lt. Sushi.DC

    I strongly suggest you put a word filter on the server side. That way you can also filter HTML tags and the like very VERY easily.

    If you're using ASP, i have a swearword filter which I used ages ago if you want it. It uses a regexp algorithm to loop through the charachters and check for the expressions in a list of banned words.

    Come to think of it, I probably have a PHP one too.. if you want it.
     
  5. wolfdogg

    wolfdogg Private E-2

    Thx Goldfish. Actually, I would be interested in playing with them. How can I get them? Let me know! Thx!
     
  6. wolfdogg

    wolfdogg Private E-2

Thread Status:
Not open for further replies.

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds