1
tripmon
Swear Word Censoring for 3rd party modules
  • 2005/3/28 21:02

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


Could someone give me a proper function and the necessary includes for enabling (extending to 3rd party modules) the swear word filter built into the core.

In /class/module.textsanitizer.php I found the following, but can not get the function to work in MyAds, FriendFinder or Pical. I also saw some depricated functions, but have not tried them yet as I would like to do this in the most efficent manner.

Quote:
function &censorString(&$text);


I can find all of the variables in the modules (both input and display), but can not get the function to work.

Any advice is appreciated.

Tx!

2
tripmon
Re: Swear Word Censoring for 3rd party modules
  • 2005/3/28 23:18

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


In my tradition of posting the answers to my own questions I proudly offer:
Quote:
//core swear word censor
$myts =& MyTextSanitizer::getInstance();
$text =$myts->censorString($text);

where $text is your var (Lifted from Mithy's AMS code)

Hope this helps someone else

Login

Who's Online

278 user(s) are online (202 user(s) are browsing Support Forums)


Members: 0


Guests: 278


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits