miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Bugs miniBB Support Forums / Bugs /  
 

bad word filter problem

 
Author Guest
~
#1 | Posted: 22 Sep 2009 13:02 
hi,

i'm trying to install this bad-word filter plugin to my site i'm creating but it doesnt even work with the demo file. I have gone thru the forum but still straggling to find the answer.
Basically whats happening is its not filtering at all i see a message like below on the top of the topic and Yes i'm using the "addon_badwords.txt" and haven't done any changes to the file @ all...

Could someone please point me in the right direction to solve this problem...

This is what i'm getting...

<@;}{~!--'; /* special symbols (surrounding bad words) - regular expression pattern */ function striReplace($find,$replace,$string){ $i=0; $exploded=explode(strtolower($find),strtolower($string)); foreach($exploded as $k=>$v){ $exploded[$k]=substr($string,$i,strlen($v)); $i+=strlen($find)+strlen($v); } return implode($replace,$exploded); } function badWords(&$fText){ $badAr=explode("\n",str_replace("\r",'',implode('',file($GLOBALS['pathToFiles'].'addon_badwords.txt')))); $text=explode(' ',str_replace("\n",' ',str_replace("\r",'',strtolower($fText)))); foreach($badAr as $bV){ foreach($text as $tk=>$tV){ if($bV==$tV or(strlen($bV)>=$GLOBALS['tolerance'][0]&&stristr($tV,$bV)) or(eregi('(['.$GLOBALS['badReg'].']|^)'.$bV.'(['.$GLOBALS['badReg'].']|$)',$tV)) or(strlen($bV)>=$GLOBALS['tolerance'][1]&&eregi('(['.$GLOBALS['badReg'].']|^)'.$bV.'(.*)',$tV))){ $rep='*'; $ln=strlen(ereg_replace('['.$GLOBALS['badReg'].']','',$tV)); for($i=1;$i<$ln;$i++) $rep.='*'; $repSave=$text[$tk]; $text[$tk]=ereg_replace('[^'.$GLOBALS['badReg'].'].*[^'.$GLOBALS['badReg'].']',$rep,$tV); $fText=striReplace($repSave,$text[$tk],$fText); } } } } if(isset($action) and $action=='ptopic'){ badWords($_POST['topicTitle']); badWords($_POST['postText']
); } elseif(isset($action) and $action=='pthread') badWords($_POST['postText']
); elseif(isset($action) and $action=='editmsg2'){ badWords($_POST['postText']
); if(isset($_POST['postTopic'])) badWords($_POST['postTopic']); } elseif(isset($_POST['prevForm']) and trim($_POST['postText'])!=''){ if(isset($_POST['topicTitle'])) badWords($_POST['topicTitle']); badWords($_POST['postText']
); } ?>

Author Paul
Lead Developer 
#2 | Posted: 23 Sep 2009 03:55 
Thanks for this report - it appears that from the older times in addon_badwords2.php there was a simple tag present, <? instead of <?php. Now we updated this file and the add-on, and you may try to re-upload or update it again.

Author Guest
~
#3 | Posted: 23 Sep 2009 11:44 
thanks!! working nicely !!

Bugs miniBB Support Forums / Bugs /
 bad word filter problem
 Share Topic's Link

This topic is closed. New replies are not allowed.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑