Сделал так:
find :
Код: Выделить всё
// Output the posts
$first_unread = $post_unread = false;
Код: Выделить всё
if ($forum_id != 141) //хардкод
{
$uniqueForum= true;
}
Код: Выделить всё
// Parse the message and subject
//$message = censor_text($row['post_text']);
Код: Выделить всё
$message = censor_text($row['post_text'], $uniqueForum);
find:
Код: Выделить всё
function censor_text($text)
Код: Выделить всё
function censor_text($text, $uniqueForm = false)
Код: Выделить всё
if (sizeof($censors))
{
return preg_replace($censors['match'], $censors['replace'], $text);
}
Код: Выделить всё
if (sizeof($censors))
{
if ($uniqueForum)
{
return preg_replace($censors['match'], $censors['replace'], $text);
}
else
{
return $text;
}
}
Пробовал передавать $forum_id, но так как ф-ция censor_text в файле viewtopic вызывается в цикле, соответственно оно и передаёт столько раз id, сколько постов в теме
Прошу помощи или пинка в нужную сторону. Спасибо.