Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 5th, 2004, 12:34 PM
Registered User
 
Join Date: Oct 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to filter curse words from discussion board?

There is one discussion board on our web site to let users submit their question freely but we want set up a language fileter to detect/avoid some unnecessary words such as curse words. How to do it? Are there any language filter software on the market?

Reply With Quote
  #2 (permalink)  
Old January 5th, 2004, 07:38 PM
Authorized User
 
Join Date: Jun 2003
Location: , , Belgium.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if the board is in asp:

make an extra table in your db: tblCurseWords with 2 fields:
CurseWord and ReplacingWord

Then, take a look at the scripts of your board, and find the place where the form-inputfield is passed to your database.

In most cases there is already some manipulation there (htmlencode, or replacing eol's with <br>, etc.)

At this place, lets say your formfield is called TextField, and it is put into strTextField (example: strTextField=request.form("TextField") ), if you found this place, after this you do your own manipulation:

dim ObjConn,rsCurseWords,strSQL

set Objconn = Server.CreateObject("ADODB.Connection") 'if connection not already open
Objconn.open "...." 'idem
set rsCursedWords = Server.CreateObject("ADODB.Recordset")
strSQL="select * from TblCurseWords;"
rsCurseWords.open strSQL,Objconn

while not rsCurseWords.EOF
replace(StrTextField,rsCurseWords("CurseWord"),rsC urseWords("ReplacingWord"))
rsCurseWords.MoveNext
wend

rsCurseWords.close
set rsCursWords = nothing
ObjConn.close
set ObjConn = nothing



Something like this
bye,
mndrx
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
c discussion forum giri_nitr C++ Programming 0 April 30th, 2007 05:44 AM
Discussion board customization marclena SharePoint Development 0 September 7th, 2006 10:40 AM
Other forums for DotNetNuke discussion jminatel BOOK: Professional DotNetNuke ASP.NET Portals ISBN: 0-7645-9563-6 1 March 9th, 2006 05:32 PM
discussion forum for local use Ulhas Amrite SQL Server 2000 1 April 15th, 2005 09:16 AM



All times are GMT -4. The time now is 07:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.