Hiding Appaling words in entry body, title and extended body

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
manoj
Regular
Posts: 49
Joined: Tue Sep 05, 2006 12:20 pm

Hiding Appaling words in entry body, title and extended body

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

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

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
manoj
Regular
Posts: 49
Joined: Tue Sep 05, 2006 12:20 pm

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply