Hello everyone!
I wrote myself a custom img bbcode => [aimg="text"]url[/aimg]
Code:
<img src="{param}" title="{option}" />
Works like a charm in the whole forum except on custom pages/custom userfields.
I tried to fix that with a hook, works fine with default bbcodes but not with custom ones.
//for postbit
PHP Code:
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($GLOBALS['vbulletin'], fetch_tag_list(),true);
}
$post['YOUR_FIELDNAME'] = strip_tags($post['YOUR_FIELDNAME']);
$post['YOUR_FIELDNAME'] = $bbcode_parser->parse($post['YOUR_FIELDNAME'],0,true);
It seems like that the custom bbcodes aren't handled by the bbcode class.
I would appreciate any help for getting rid of this problem, thanks !
~regards skizer
//UPDATE
Its always like that, I'm searching and trying everything out that comes into my mind.
After not getting rid of it - I post for help, actually still try to getting rid of it.... and guess what?
I took a closer look at the bbcode class and saw that it handle actually even custom bbcodes - fixed up the code above (maybe other users can use it), thanks anyways :P