1
jph000
Liaise Word Censoring
  • 2009/3/9 22:22

  • jph000

  • Just popping in

  • Posts: 60

  • Since: 2004/8/2 2


Since Liaise (1.26) has no built-in word censoring (that is, no use of XOOPS' censorString or another similar function), I did a simple hack to Liaise's include/form_execute.php file for the textarea case. See below. Has anyone already developed a better way?

Liaise remains valuable (and viable with XOOPS 2.3), and one of my clients allows anonymous users to send forms. Lately there's been regular salacious submittals. Banning the offending IPs has limited value. Preventing submittals in the first place might be somewhat useful, although far from foolproof anyway.

case 'textarea':
// check for bad words using XOOPS function
$temp1 = $myts->stripSlashesGPC($ele[$ele_id]);
$temp2 = $myts->stripSlashesGPC($myts->censorString($ele[$ele_id]));
if( $temp1 == $temp2 ){
$msg[$ele_id] .= $myts->stripSlashesGPC($ele[$ele_id]);
}else{
$err[] = "Improper language (censored words).";
}

Login

Who's Online

366 user(s) are online (289 user(s) are browsing Support Forums)


Members: 0


Guests: 366


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