Ver Mensaje Individual
  #5 (permalink)  
Antiguo 17/05/2003, 01:03
OXIGENO
 
Fecha de Ingreso: febrero-2002
Mensajes: 442
Antigüedad: 23 años, 4 meses
Puntos: 2
Si es chequear palabras que esten bien escritas es muy engorroso cargar una base de datos con todas palabras y frases gramaticales... etc etc.... pero si lo que quieres... es hacer algo mas sencillo puedes utilizar un filtro de palabras no deseadas... como por ejemplo el que esta en scriptmaster....

ahi va el codigo... (yo no lo probe...)
<%
'|Author: Joaquim Ferreira
'|Description: To use this function you must pass it a STRING, to add more words go to the ARRAY
'| OF DIRTY WORDS and add all the necessary word you want please do NOT forget to change the
'| value of [ Dim arrBadLanguageWords(2) ] to the value of the total of bad words.
'|
'| This function will replace bad WORDS with * , avoiding those nasty words in your site.
'|
'| Response.Write Generic_BadLanguage_Filter("this is a badwords1 problem badwords2, and you are badwords3 etc...")

Function Generic_BadLanguage_Filter(ByVal strYourString)
Dim arrBadLanguageWords(2)
Dim I

'-------------[ Array of dirty words ]-----------------------
arrBadLanguageWords(0) = "badwords1"
arrBadLanguageWords(1) = "badwords2"
arrBadLanguageWords(2) = "badwords3"
'-------------[ /Array of dirty words ]-----------------------

For Each I in arrBadLanguageWords

strYourString = Replace(strYourString,I," " & String(Len(I) ,"*") & " ")

Next

Generic_BadLanguage_Filter = strYourString
End Function

%>
__________________
tech-nico.com