Defining a bad word

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

The Bad words module's user interface is located in Site Manager -> Administration -> Bad words.

 

devguide_clip0098

 

The top part of the page is a filter. Using it, you can display only those bad words that match the specified criteria. You can filter by the Expression and by the Action that has been set for it. After specifying the filtering criteria and clicking the Show button, only those items that match the specified criteria will be displayed in the list.

 

To add a new bad word, click the New bad word link at the top of the page. You will be redirected to the Bad word properties page. The following details can be entered:

 

Bad word - bad word that should not appear in the text
Bad word is a regular expression - if checked, you can also enter regular expressions into the previous field
Action - action that will be taken in case that the bad word is detected; see chapter Possible actions for more details

Use default settings - if checked, global value will be used as set in Site Manager -> Settings -> Bad words -> Bad word action

Replace by - in case the Replace action is selected, the substitute for the bad word is defined here

Use default settings - if checked, global value will be used as set in Site Manager -> Settings -> Bad words ->  Bad word replacement

 

Enter the details as in the following screenshot and click OK.

 

devguide_clip0099

 

Let's try the functionality now. Go to the live Corporate Site, enter the Blog section and open some of the blog posts. Enter a comment as in the following screenshot and click Add.

 

devguide_clip0403

 

As you can see, the last word has been replaced with its polite substitute that has been defined earlier.

 

devguide_clip0404

 

You can also check the Event log in Site Manager -> Administration. An event is always logged automatically when a user tries to post some text containing a bad word. The Event code is BADWORD in such case.

 

devguide_clip0405

 

Cultural versions of bad words

 

You can set for which cultures will a certain bad word be used. If you choose to Edit (Edit) a bad word in the list in Administration -> Bad words and switch to its Cultures tab, you will be offered the following two options:

 

The word is not allowed in all cultures - the bad word will be filtered in all site cultures
The word is not allowed only in following cultures - the bad word will be filtered only in cultures selected by the check-boxes below

 

Click Save for the settings to take effect.

 

devguide_clip0406

 

Page url: http://devnet.kentico.com/docs/devguide/index.html?defining_a_bad_word.htm