Post in external website page -> How to display custom BBCODE

Ghostaunt

Active member
Hello !

I have a small script for display a post in an external page in my website. It works great but, not for custom bbcode (like spoiler, media, ..)
Here my script :
PHP:
public function getTopic($topic_id)
    {
        $topic = XenForo_Model::create('XenForo_Model_Thread')->getThreadById($topic_id, array('join' => XenForo_Model_Thread::FETCH_FIRSTPOST));
        $formatter = XenForo_BbCode_Formatter_Base::create();
        $parser = new XenForo_BbCode_Parser($formatter);

        $topic['message_html'] = $parser->render($topic['message']);

        return $topic;
    }

How can I make it work with custom bbcode please ?
I tried many things, but nothing seem work.

Thanks !
 
Back
Top Bottom