2014-08-17, 09:22 AM
Hi,
If we have a profile field that shown in postbit, the MyCode parser don't work.
why:
in functions_post.php in line 70 defined $parser_options but it defined again in line 432 :-|
fix:
in functions_post.php
find:
If we have a profile field that shown in postbit, the MyCode parser don't work.
why:
in functions_post.php in line 70 defined $parser_options but it defined again in line 432 :-|
fix:
in functions_post.php
find:
$parser_options = array(
"allow_html" => $field['allowhtml'],
"allow_mycode" => $field['allowmycode'],
"allow_smilies" => $field['allowsmilies'],
"allow_imgcode" => $field['allowimgcode'],
"allow_videocode" => $field['allowvideocode'],
#"nofollow_on" => 1,
"filter_badwords" => 1
);
if($customfield['type'] == "textarea")
{
$parser_options['me_username'] = $post['username'];
}
else
{
$parser_options['nl2br'] = 0;
}
if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
{
$parser_options['allow_imgcode'] = 0;
}
$post['fieldvalue'] = $parser->parse_message($post[$fieldfid], $parser_options);
}
eval("\$post['profilefield'] .= \"".$templates->get("postbit_profilefield")."\";");
Replace to: $field_parser_options = array(
"allow_html" => $field['allowhtml'],
"allow_mycode" => $field['allowmycode'],
"allow_smilies" => $field['allowsmilies'],
"allow_imgcode" => $field['allowimgcode'],
"allow_videocode" => $field['allowvideocode'],
#"nofollow_on" => 1,
"filter_badwords" => 1
);
if($customfield['type'] == "textarea")
{
$field_parser_options['me_username'] = $post['username'];
}
else
{
$field_parser_options['nl2br'] = 0;
}
if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
{
$field_parser_options['allow_imgcode'] = 0;
}
$post['fieldvalue'] = $parser->parse_message($post[$fieldfid], $field_parser_options);
}
eval("\$post['profilefield'] .= \"".$templates->get("postbit_profilefield")."\";");