Steffen
Well-known member
- Affected version
- 2.0.2
XenForo does not support the BBCode tags [thread] and [post]. Both should be rewritten to the URL BBCode.
Something like this in the
Something like this in the
getPostMessage
method should work:
PHP:
$message = preg_replace_callback('#\[(thread|post)\](\d+)\[/\1\]#i', function($m)
{
$url = $this->app->options()->boardUrl . "/$m[1]s/$m[2]/";
return '[URL]' . $url . '[/URL]';
}, $message);
$message = preg_replace_callback('#\[(thread|post)=(\d+)\](.*?)\[/\1\]#i', function($m)
{
$url = $this->app->options()->boardUrl . "/$m[1]s/$m[2]/";
return "[URL='" . $url . "']{$m[3]}[/URL]";
}, $message);