I have problem with my new bbcode
I add up new bbcode [TESTT] with one conditions:
in
includes/class_bbcode.php
before:
Quote:
function handle_bbcode_img_match($link)
|
add:
PHP Code:
function handle_bbcode_testt($code)
{
global $vbulletin, $vbphrase, $stylevar, $show;
if ($vbulletin->userinfo['userid'] == '0')
{
return 'code 1';
}
else
{
return 'code 2';
}
}
and before:
Quote:
($hook = vBulletinHook::fetch_hook('bbcode_fetch_tags')) ? eval($hook) : false;
|
ADD
PHP Code:
if ($vbulletin->options['allowedbbcodes'])
{
//[TESTT]
$tag_list['no_option']['testt'] = array(
'callback' => 'handle_bbcode_testt',
'strip_empty' => true,
'disable_smilies' => true,
'disable_wordwrap' => true,
'strip_space_after' => 2
);
}
Problem is when my users write
[testt]something[/testt]
and after that they try to look up by switching in WYSIGW mode (

)
the tagss disapper ! and they get just code 2 !
how to solve that issue
i need it couse when users click preview posts they get a code 2 in their messages and the conditionals dont work for guests