MyBB Community Forums

Full Version: bbcode in subject?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It is possible to BBCode in subject of a message?

Es posible poner los bbcodes en el asunto de un mensaje?
afaik, bbcodes dont parse subjects but it can be possible with some php modification...
I wouldn't allow all the MyCode to be available for the subject - they can mess up the layout (such as including large images).
He is right, but I would like to include [b] [i] [s] Wink

-

Tiene razón, pero me gustaría incluir [b] [i] [s] Wink
any ideas?

??
is what I can think of

forumdisplay.php
//Mauricio
$thread['subject'] = str_replace("[s]", "<s>", $thread['subject']);
$thread['subject'] = str_replace("[/s]", "</s>", $thread['subject']);
//Mauricio
^ That probably works, but you may want to use regex instead, since the above means that users don't have to close their tags.

Example:
$thread['subject'] = preg_replace('#\[([bis])\](.*?)\[/\\1\]#si', '<$1>$2</$1>', $thread['subject']);
Thanks !!!!! Wink