Quote:
Originally Posted by FW FH-K?ln
We have a problem:
when we modified a form with support from your help-site
Code:
if ($qo[6] <> "")
{
$formoutput = preg_replace('/(\[(.*?)\])/is', '', $formoutput);
vbmail($qo[6], $threadtitle, $formoutput);
}
$qo[6] = Single Line Text Field for the user email
to send the result of the form to the user, it will delete all BBCode in the email and in the new thread.
But why?
|
The php function vbmail does not support bbcode.
The alternative to removing it is to convert it into plain text:
Replace:
Code:
$formoutput = preg_replace('/(\[(.*?)\])/is', '', $formoutput);
vbmail($qo[6], $threadtitle, $formoutput);
With:
PHP Code:
require_once(DIR . '/includes/class_bbcode_alt.php');
$plaintext_parser =& new vB_BbCodeParser_PlainText($vbulletin, fetch_tag_list());
$plainformoutput = $plaintext_parser->parse($formoutput);
vbmail($qo[6], $threadtitle, $plainformoutput);