I've tried looking through posting.php to try and find what I'm missing but I'm completely lost :p I've come across $message_parser which seems to do something similar to generate_text_for_storage, but I'm not sure what the difference is or why some parts of phpbb use one and other parts use the second.
My code, which works other than for utf8 support, looks like this:
Code: Select all
$uid = $bitfield = $options = ''; $allow_bbcode = $config['talk_enable_bbcode']; $allow_urls = $config['talk_enable_magic_urls']; $allow_smilies = $config['talk_enable_smilies']; $notice_text = utf8_normalize_nfc($notice_text); generate_text_for_storage($notice_text, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);
I've just tried using message_parser and it seems to do exactly the same as generate_text_for_storage? it made no differene to the problem with utf8. This page seems to confirm what I'm currently doing, just don't get it!
solved the problem. I needed to wrap utf8_normalize_nfc around request_var instead of doing it later, e.g. $notice_text = utf8_normalize_nfc(request_var('notice_text','',true));
have a different db problem now though lol