Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2360

phpBB Custom Coding • Re: Usage of submit_post, with tags = wrong recording in database

$
0
0

Code:

generate_text_for_storage($my_text, $uid, $bitfield, $options, false, false, false);
If you want to enable BBCode then don't give FALSE on its parameter. Why haven't you looked at the function's definition at all?

Code:

/*** For parsing custom parsed text to be stored within the database.* This function additionally returns the uid and bitfield that needs to be stored.* Expects $text to be the value directly from $request->variable() and in it's non-parsed form** @param string $text The text to be replaced with the parsed one* @param string $uid The BBCode uid for this parse* @param string $bitfield The BBCode bitfield for this parse* @param int $flags The allow_bbcode, allow_urls and allow_smilies compiled into a single integer.* @param bool $allow_bbcode If BBCode is allowed (i.e. if BBCode is parsed)* @param bool $allow_urls If urls is allowed* @param bool $allow_smilies If smilies are allowed* @param bool $allow_img_bbcode* @param bool $allow_flash_bbcode* @param bool $allow_quote_bbcode* @param bool $allow_url_bbcode* @param string $mode Mode to parse text as, e.g. post or sig** @return arrayAn array of string with the errors that occurred while parsing*/function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $mode = 'post')

If I edit the message (on the forum, not in database), I see well The pocpoc of Couin, and when I submit, the message is well displayed as wanted
That's because in the editor the checkbox "Disable BBCode" is not ticked by default. Tick it and re-submitting that post will remain with unparsed BBCode.

Statistics: Posted by AmigoJack — Fri Oct 25, 2024 5:35 pm



Viewing all articles
Browse latest Browse all 2360

Trending Articles