One slight problem with this. some of the html characters get through - to remove that use:
Quote:
// HACK : START : AUTO TAG
// if ($type == 'thread' AND $post['taglist'])
// {
if ($type == 'thread')
{
if (!$post['taglist']) {
$temptags = split(' ',$post['title']);
$newtags = array();
require(DIR . '/includes/searchwords.php');
foreach ($temptags as $tagtext) {
if (strlen($tagtext) <= 3 || in_array(strtolower($tagtext), $badwords)) {
// Do nothing
} else {
$tagtext = html_entity_decode($tagtext);
$tagtext = ereg_replace("[^A-Za-z0-9 _]", "", $tagtext);
array_push($newtags,$tagtext);
}
}
$post['taglist'] = join(',',$newtags);
}
// HACK : END : AUTO TAG
|