Lets make some debugging:
Apply this code instead of the other (to a test board!):
PHP Code:
if ($post[usergroupid]==6 OR $post[usergroupid]==5) {
echo "usergroupid is 6 or 5<br>";
if (preg_match("/(\[)(html)(])(\r\n)*([^\"]*)(\[\/html\])/siU", $post[pagetext], $matches1))
{
echo "HTML tag matched!<br>";
$temp_value='-@log?c?an@-';
$parsed_html=bbcodeparse2($matches1[5],1,1,1,1);
echo "this is parsed_html=".$parsed_html."<br>";
$post[pagetext]=preg_replace("/(\[)(html)(])(\r\n)*([^\"]*)(\[\/html\])/siU", "$temp_value", $post[pagetext]);
}
}
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);
echo "bbcodeparse runs..<br>";
if (($post[usergroupid]==6 OR $post[usergroupid]==5) and isset($parsed_html))
{
echo "rewriting parsed HTML";
$post[message]=str_replace($temp_value, $parsed_html, $post[message]); }
Now after you applied the code, create a new thread in any forum with Site Admin account and post a test message with html tag. After it's posted, showthread.php will run and it will display the message you posted. Check the begining of this page. You should see some debugging text there. Tell me what they are..