PDA

View Full Version : I'm using a custom template, how do I parse smilies and bbcode?


BirdOPrey5
07-20-2010, 12:38 AM
So for a mod I'm writing I am calling a custom template off a hook in the postbit, only problem is smilies and bbcode aren't rendering, I'm just seeing the text like :mysmilie: and the actual bb code tags. Is there a way to make what is displayed render like it normally would? I don't understand because the text coming in is the signature which would usually render.

--------------- Added 1279592037 at 1279592037 ---------------

OK, I got it working by adding this to the start of the plugin- my question is- is this the right way of doing it just because it works?

require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($GLOBALS['vbulletin'], fetch_tag_list(),true);
$post['signature'] = $bbcode_parser->parse($post['signature'],0,true);