Message Profanity Sniffer

I've got an internal bulletin board and a guestbok for my CF site.  I established a table in my Access database called smut, which also contains other choice words.  The list is growing, however, I wish to filter out messages containing anything in the database smut table.  I also wish to create another listing (template) displaying the messages with the unwanted terms.  Though, this is more an SQL thing, what can CF do?
Now, using the CFIF, it would be quite laborious to have a CFIF instance for each unwanted term.  CFLOOP would require the listing be delimited in the LIST attribute for CFLOOP, which negates the use of the database smut table, right.  How would you suggest referencing the smut table to use for filtering in CF?
Doug

Close, but I can spot a couple things wrong with the logic there right off the bat:
1) Your code is missing the INSERT statement in order to add the data to your database (on success) - without it your user's post will never make it into your system
2) You need to make the message that appears after the validation runs conditional on the results of the validation.  As you've coded it now, your "success" message is hard coded so that it appears regardless of whether the validation has passed or not.
Try the following blueprint:
<!--- Set Default Values --->
<cfset bValidationPassed = true>
<cfset sMessage= "">
<!--- Retrieve Words --->
<CFQUERY NAME="q_profanity" DATASOURCE="9130.ww">
SELECT term
FROM profanity;
</CFQUERY>
<!--- Detect the use of stored words --->
<cfloop query="q_profanity">
     <cfif FindNoCase(term, form.gb_entry_m)>
           <cfset bValidationPassed  = false>
          <cfbreak>
     </cfif>
</cfloop>
<!--- Conditional logic depending on whether profanity term was detected --->
<cfif bValidationPassed eq true>
     <!--- No profanity: add post --->
     <CFQUERY NAME="q_AddRecord" DATASOURCE="9130.ww">
       [INSERT SQL HERE]
     </CFQUERY>
     <!--- Set message  text --->
     <cfsavecontent variable="sMessage ">
     <p>Your guestbook message has been saved.</p>
     <!--- you will need to determine the new entry ID in the Add Record SQL above --->
     <p><A HREF="gb_entry_rvw.cfm?call_number=#gb_entryID#">Review Your Entry Now!</A></p>
     </cfsavecontent>
<cfelse>
     <!--- If profanity detected, show error text --->
     <cfset sMessage = "You have included a term or phrase which is unacceptable to our records in your guestbook message. ">
</cfif>
<!--- Generate output HTML --->
<HTML>
<HEAD>
<TITLE>New Guestbook Entry</TITLE>
</HEAD>
<BODY>
<!--- display message --->
<cfoutput>#sMessage#</cfoutput>
</BODY>
</HTML>

Similar Messages

  • Please Help After Effects Error:Crash in progrss.Last logged message was: 8020 GPU manager Sniffer Result Code:3

    Tell us about your computer hardware.
    A:Here is my specs:
    i-7 4770 motherboard
    8 gb of Ram
    What operating system?
    A:Windows 7 64 bit OS
    If you are getting error message(s), what is the full text of the error message(s)?
    A:After Effects Error:Crash in progrss.Last logged message was:<8020><GPU manager>Sniffer Result Code:3
    What were you doing when the problem occurred? What is the exact sequence of steps that you are taking?
    A: Opened it and the error started

    @Todd_Kopriva
    thank you very much it works now

  • Today I stupidly tried to install CUDA accelerator forgetting I have Intel/AMD combo graphics card and not NVidia. Now when I try to launch AE or PremierePro I get this Last log message was: 140735120521568 GPUManager 2 Sniffer Result Code: 3 Help

    Today I stupidly tried to install CUDA accelerator forgetting I have Intel/AMD combo graphics card and not NVidia. Now when I try to launch AE or PremierePro I get this Last log message was: <140735120521568> <GPUManager> <2> Sniffer Result Code: 3.  I have trashed the CUDA program and reinstalled Premiere and AE but no joy.  Same message followed by another error box with options to Retry, Send to Apple or ignore.  I have tried all 3 options but nothing works!  Every time I launch either program same message appears.

    Hi? today i too have this problem.
    I found a solution here: https://discussions.apple.com/message/25137524#25137524
    Now all good.
    Good luck!

  • After Effets error: Crash in progress. Last logged message was: 5640 GPUManager 2 Sniffer rResult Code:3

    Hi' i Update recently the new After Effects cc 2014 and i got this message : when i try to launch the program
    After Effects error: Crash in progress. Last logged message was: <5640 GPUManager <2< Sniffer rResult Code:3
    i update all graphics update and CUDA also.
    i connect into my graphic card setting and its show the program open with the graphic card.
    nothing change.
    i also try to install adobe media encoder but the system shot down without any reason.
    my computer is new (never install after effects before
    PC-
    WINDOWS 7 ULTIMATE 64Bit
    I7 4790
    DDR3 16GB
    GTX760 2GB
    SSD 240GB
    I DON'T KNOW WHAT ELSE TO DO - PLEASE HELP ME!!
    I BUY THE NEW COMPUTER FOR THIS PRODUCE.
    PICTURE FOR DEMONSTRATE:

    It's the same as always: Update your graphics driver.
    Mylenium

  • Updated OS 10.9.4  and AE Version 11.0.4 and this is what the message reads on launch. Last log message was: 140735170798352 GPUManager 2 Sniffer Result Code: 3

    Updated OS 10.9.4 and AE Version 11.0.4 and this is what the message reads on launch. Last log message was: <140735170798352> <GPUManager> <2> Sniffer Result Code: 3
    What do I need to do to get this working again?
    After Effects@

    fixing permissions problem that impedes start of Adobe applications
    Also, Avoid installing NVIDIA CUDA drivers on computers with AMD GPUs

  • After effects error:crash in progress.Last logged message was: 4344 GPUManager 2 Sniffer Result Code:3 What is this?

    after effects error:crash in progress.Last logged message was:<4344><GPUManager><2>Sniffer Result Code:3 What is this?

    It's the same as always: Update your graphics driver.
    Mylenium

  • AE CS6 WONT OPEN!!!! Last log message was: 140735275870560 GPUManager 2 Sniffer Result Code: 3

    I'm having this problem in after effects.
    AE CS6 WONT OPEN!! Last log message was: <140735275870560> <GPUManager> <2> Result Code Sniffer: 3

    FAQ: What information should I provide when asking a question on this forum?

  • Your message contains profanity - actually no it doesn't

    I've had problems with this forum software before over claims of profanity but after trying to help a fellow toshiba user out with her laptop problems it's claiming my post contains swear words which is untrue. What I would really like to see from this fourm software is instead of telling me: "Your message contains profanity or inappropriate language. In the interests of your fellow forum users, we would ask you to amend your message." actually inform me of what words I'm not suppose to use.
    cheers,
    Richard S.

    I have posted also a lot of topics here in the forum and sometimes the message appears that my message contains profanity or inappropriate language.
    I know that the filter is running in the background and monitors the inputs. But sometimes (I dont know why) it will not accept my clean posting. Possibly a program bug?
    Anyway I assume we have live with it.

  • After Effects error : Crash in progress.Last logged message was:  4444 GPUManger 2 Sniffer Result Code:3

    Hi
    I have one question.
    I was Install after effect, but I saw the this message in my PC.
    please let know solution.
    After Effects error : Crash in progress.Last logged message was:
    <4444><GPUManger><2>Sniffer Result Code:3
    My system info
    cpu :i7
    graphic card : gtx 750 Ti
    ram:16G

    Standard answer: Update your graphics driver and configure it suitably.
    Mylenium

  • When I'm trying to post something, profanity message is shown

    I'm trying to post a message about my laptop but I keep getting a message about profanity ?
    Any ideas.

    I agree with Mores.
    I had the same several times but if I edited my message the post comes through somehow.
    I dont know why but I dont have a problem with this because it happens not often.

  • Help! After Effects Error: Crash in progress. Last logged message was: 6968 GPUManager 2 Sniffer Code: 3

    I just installed After Effects though Creative Cloud, and I am getting the above error message. The Logo/Start Up screen for AE comes up, then the error displays. Any tips for getting this to work properly? It will be greatly appreciated!

    What operating system?

  • How to capture/sniff Can-messages?

    Hello,
    i´m using a can-interface that is programmed by a windows-program.
    The usb can-interface goes to the DUT.
    Now i need to capture the messages that are send and read between the two.
    Does someone know a program that can do this? (Something like wireshark for ethernet.)
    Thanks for all help

    NI's CAN monitor works pretty well for this (you will need a NI CAN device of course), but it will not tell you who sent the message (usually done via the CAN protocol that is used, such as J1939 where the source and sometimes the destination address is encoded into the ArbID).  The monitor display shows ArbID, # data bytes, data bytes, and msg rate (which obviously does not work for non-periodic for multi-frame messages).

  • Profane SMS messages from an unknown sender

    I am receiving horrible messages from 75973 (Skype) and have no idea who is sending them. How do I find out who the sender is?

    Go to this link and make sure you sign in to my verizon. Under preferences you have the ability to block names, numbers, or even whole domains. You can also make it that only text messages to your alias you choose can text you. And block texts from web pages.     https://web.vma.vzw.com/vtext/guest/Dashboard.do 
    You could also block the number under the 5 free (90 day) blocks from Verizon Wireless web portal. http://www.verizonwireless.com
        Good luck
    Message was edited by: Elector

  • Could not complete your request because of a program error" message when opening program

    Hello,
    Same here with the message and I'm on a brand new system:
    new macpro, new mavericks, new photoshop CC and havent done a thing yet.
    Tried all found solutions:
    -generator on/off
    -sniffer on/off
    -GPU on/off
    -300x exit prefs etc
    -re-install PS
    -list-view
    -pushing my belly button
    But nothing helps.
    I tried a little work in PS (render/save etc) and that all seems to work
    BUT....sniffer states:
    2014-02-07 16:23:50.885 sniffer[522:303] invalid display
    ContextOffscreen exception caught and ignored.
    2014-02-07 16:23:50.886 sniffer[522:303] invalid display
    ContextOffscreen exception caught and ignored.
    And dont know what to do about it and/or if that causes it. Thank you. & regards

    I was able to follow your directions and delete almost everything. I couldn't find a PSE 4 path folder. I deleted the com.adobe.Photoshop.Elements.plist and opera preferences. Repaired permissions and restarted computer.
    Still had the same error message when trying to "Save As" a PSD to a jpg. I can save for the Web which is a jpg (but not good enough for printing.)
    Maybe I'll reinstall.
    I'm not having trouble with any other programs. Can't recall having added anything to PSE recently, though if this is the culprit, it might be something I did months ago (though I don't know what) because I haven't tried saving as a jpg in a long time.
    I've been saving my documents as a tiff file. Could that be a cause? I've converted some of these tiff files to PSD and still get the error message.

  • Message post probelm

    I have been trying to post a message abpout a problem I'm having with a memory upgrade on a Satellite L300 laptop. On every attempt my message is rejected because of "profanity or inappropriate language". My message contains no such content, yet I cannot post it. I've re-read it carefully and can't find anything thats even the slightest bit objectionable, but I can't post it and I need help. Any suggestions anyone?
    Thanks...........Kev.

    Thanks folks,
    I did just what you suggested, turns out the offending word was "beeps" (as in the noise). Wonder of it will let me post this?........Kev.

Maybe you are looking for

  • External monitor for Macbook Pro MC723

    Hi, I'd like to get a cheap (<£200) external monitor for my Macbook Pro MC723 ... 1. Can I get any make of monitor or does it have to be an Apple? 2. Which port Macbook Pro port would it connect to? 3. Will I be able to use the monitor as a dual disp

  • Controlling zoom size on pdf opened in browser from webserver

    I want my PDF to open at a certain zoom size when someone clicks a link to it in their browser (the link is on my site, as is the PDF). I have tried the Properties > Initial View > Magnification, and also tagging #view=fit onto the end of the pdf URL

  • To Hi-Fi or not to?

    Hello, I need some advice from those you have or know about the hi-fi speakers. I am having a bbq/pool party in the back yard of my house. I'd like to play music outside, but my portable ilogic's or the bose computer speakers will not suffice (obviou

  • Issue with Setting Up Test Server for PHP/MySQL to work

    I've got a few newbie issues which I hope someone can help with! I'm trying to get Security Assist to work, so I've put MYSQL and workbench on my computer to get it going. I haven't created a test server in PHP, because I'm wondering if it will affec

  • PR/PO Release Strategy

    Hi All, Actually there is a requirement where i need for options in PR/PO release strategy. The four options that i need are >Approve >Cancel >Recommend to approve >Recommend to reject The SAP provided standard options are approve and cancel. How can