PDA

View Full Version : Using external call back for custom bbcode


Moya
02-28-2006, 08:42 AM
Hello All

After I read the BBcode tutorial, I tried to create a custom bbcode with a little progress.

For the hook bbcode_fetch_tags I use


$tag_list['no_option']['hide'] = array(
'callback' => 'handle_external',
'external_callback' => 'handle_test_bbcode',
'strip_empty' => true,
'stop_parse' => true,
'disable_smilies' => true,
'disable_wordwrap' => true,
'strip_space_after' => 1
);


I have a fille called test.php under includes directory. This file has this function


function handle_test_bbcode(&$parser, $text, $options='' )
{
$parser->options['cachable'] = false;
return $text;

}



When I create a thread which contains the following

inside http://www.vbulletin.org next


I always get the result like this

inside [ur ]http://www.vbulletin.org [/url] next


I want my bbcode to be able to recognize the link and other vb buillt in bbcode. However I failed to achieve this.

Would you please help me to solve this problem

Thanks.

Anyone????

Moya
03-10-2006, 04:40 AM
Anyone?????

Moya
03-12-2006, 04:02 AM
Nevermind!! I got it to work

Thanks