New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parser don't work if we have postbit profie fields #1260
Labels
b:1.8
Branch: 1.8.x
s:resolved
Status: Resolved. Solution implemented or scheduled
t:bug
Type: Bug. An issue causing error / flaw / malfunction
Milestone
Comments
ATofighi
added a commit
to ATofighi/mybb_
that referenced
this issue
Aug 18, 2014
Parser don't work if we have postbit profie fields
Fixed in #1262 |
@ATofighi was your PR merged? |
ATofighi
added a commit
to ATofighi/mybb_
that referenced
this issue
Aug 19, 2014
Oh :D :D No (: |
ATofighi
added a commit
to ATofighi/mybb_
that referenced
this issue
Aug 19, 2014
Starpaul20
added a commit
that referenced
this issue
Aug 19, 2014
Fixes #1260 - Parser don't work if we have postbit profie fields
Merged PR. All is good. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
b:1.8
Branch: 1.8.x
s:resolved
Status: Resolved. Solution implemented or scheduled
t:bug
Type: Bug. An issue causing error / flaw / malfunction
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:
PHP Code:
$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:
PHP Code:
$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")."\";");
Original thread: Parser don't work if we have postbit profie fields
The text was updated successfully, but these errors were encountered: