Well, and has it got anything to do with nobbc not being handled in preparsecode...?
Also, could be simpler to just do something like this at the beginning of parse_bbc:
while (($pos = stripos($message, '[ nobbc]')) !== false)
$end = stripos($message, '[/ nobbc]', $pos);
if ($end == false)
$end = strlen($message);
$message = substr($message, 0, $pos) . str_replace('[', '&something;', substr($message, $pos + 7, $end - $pos - 7)) . substr($message, $end + 8);
I don't remember the name for the text variable so I used $message.
It's a prototype, typed directly in here... What do you think..?
Woohoo, bug... A code tag gets added at the beginning, and it even hid the beginning of the post in the process. Fixed by adding spaces in nobbc tags. Poetic irony...