addcomments.php
после
$_POST['question_answer'] = convert_unicode( $_POST['question_answer'], $config['charset'] );
Добавляем нашу регулярку
//смайлы $smilies_arr = explode( ",", $config['smilies'] ); foreach ( $smilies_arr as $smile ) { do { $_POST['comments'] = preg_replace('#(:'.$smile.':[\s]*){3,}#', '$1', $_POST['comments'], 1, $count); } while ($count); } unset($count); //буквы do { $_POST['comments'] = preg_replace('#(.){3,}#ui','$1', $_POST['comments'], 1, $count); } while ($count);