Smiley parsing

Aayush

Well-known member
I am outputting some text in a custom page. I am not sure how to parse the text to show smilies, maybe a helper or something else to parse the text would do it, but I am not able to find it out. Somebody knowing about it can help!

Thanks
 
You would need to use a PHP callback. That's the only way to access the BB code parser. You can actually then pass it to the page as a param and then use the BB code helper on the string you want to parse, e.g.

Code:
{xen:helper bbCode, $bbCodeParser, $yourStringToParse}
 
You would need to use a PHP callback. That's the only way to access the BB code parser. You can actually then pass it to the page as a param and then use the BB code helper on the string you want to parse, e.g.

Code:
{xen:helper bbCode, $bbCodeParser, $yourStringToParse}

You I nest {xen:helper} ? Cause I am already using a helper on the text already

Thanks for help @Chris Deeming
 
Code:
 $bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('XenForo_BbCode_Formatter_BbCode_AutoLink', false));

I am passing this as a viewParam, but it still doesn't parse
 
I think they are nestable. Would probably be better to parse the bbcode in the PHP callback though.
 
Back
Top Bottom