Page 1 of 1

Hiding Appaling words in entry body, title and extended body

Posted: Wed Oct 25, 2006 10:02 am
by manoj
hi,

I want to hide any appalling words in the entry before it is saved.
suppose "key" is an appaling word, i want all occurences of "key" in entry(title,body,extended body) to be converted to *** while saving the entry.
right now we have developed a logic but in some cases like when we use html tags its not working.
Is there any off the shelf logic/component that takes care of appaling word logic, where in we can just specify the list of appaling words.And the logic converts all occurences of those words to ****(asterix).

thanks.
manoj.

Re: Hiding Appaling words in entry body, title and extended

Posted: Wed Oct 25, 2006 10:31 am
by garvinhicking
Hi!

The easiest way would be to use the regexpmarkup plugin or the contentrewrite event plugin to rewrite specific values. Or even the glossary plugin, if you just rewrite simple words.

If you want to write your own plugin, you can use any of those two plugins as a foundation.

HTH,
Garvin

Posted: Wed Oct 25, 2006 11:02 am
by manoj
Hi garvin,
thanks for the suggestion.
i could find content rewriter plugin, but in that we can change only one word. but my requiremnt is like there is a big list of appaling words and when ever we find a appaling word it should be replaced by a sequence of asterixs(*) where the sequence lenght is equal to the appalling word length.
like if array, key, search are appaling words
each occurence of array should be replaced by *****, key by ***, search by ******.

Can this be achieved by using the content rewriter plugin.
Thanks.
manoj

Posted: Wed Oct 25, 2006 11:20 am
by garvinhicking
Hi!

You can add multiple words to the content rewrite plugin. After submitting one word, you can enter one more and so on.

What you seem to want should best be achieved if you take the regexpmarkup as a foundation and modify the replacements inside the plugin.

Best regards,
Garvin