I recently upgraded my forum from 3.0.14 to 3.2.1 version and everything seems fine apart from that one thing : when I post using the submit_post function there is now these <t> and </t> tags around my titles.
For example :
<link deleted>
The code I'm using is the one from the wiki :
Code: Select all
function post_phpbb($message,$sujet,$forum_id,$topic_id = 0,$mode = 'post') {
global $phpbb_root_path, $phpEx, $user, $db, $config, $cache, $template, $domaine;
require_once($phpbb_root_path . "includes/functions_posting." . $phpEx);
//$topic_type : One of the phpBB3 topic type constants. POST_NORMAL, POST_STICKY, POST_ANNOUNCE, POST_GLOBAL
$topic_type = POST_NORMAL;
//$username : Username of the poster. Only valid for guest posters.
$username = '';
// note that multibyte support is enabled here
$sujet = utf8_normalize_nfc(utf8_recode($sujet, 'utf-8'));
$message = utf8_normalize_nfc(utf8_recode($message, 'utf-8'));
// variables to hold the parameters for submit_post
$poll = $uid = $bitfield = $options = '';
generate_text_for_storage($sujet, $uid, $bitfield, $options, false, false, false);
generate_text_for_storage($message, $uid, $bitfield, $options, true, true, true);
$data = array(
// General Posting Settings
'forum_id' => $forum_id, // The forum ID in which the post will be placed. (int)
'topic_id' => $topic_id, // Post a new topic or in an existing one? Set to 0 to create a new one, if not, specify your topic ID here instead.
'icon_id' => false, // The Icon ID in which the post will be displayed with on the viewforum, set to false for icon_id. (int)
// Defining Post Options
'enable_bbcode' => true, // Enable BBcode in this post. (bool)
'enable_smilies' => true, // Enabe smilies in this post. (bool)
'enable_urls' => true, // Enable self-parsing URL links in this post. (bool)
'enable_sig' => true, // Enable the signature of the poster to be displayed in the post. (bool)
// Message Body
'message' => $message, // Your text you wish to have submitted. It should pass through generate_text_for_storage() before this. (string)
'message_md5' => md5($message),// The md5 hash of your message
// Values from generate_text_for_storage()
'bbcode_bitfield' => $bitfield, // Value created from the generate_text_for_storage() function.
'bbcode_uid' => $uid, // Value created from the generate_text_for_storage() function.
// Other Options
'post_edit_locked' => 0, // Disallow post editing? 1 = Yes, 0 = No
'topic_title' => $sujet, // Subject/Title of the topic. (string)
// Email Notification Settings
'notify_set' => false, // (bool)
'notify' => false, // (bool)
'post_time' => 0, // Set a specific time, use 0 to let submit_post() take care of getting the proper time (int)
'forum_name' => '', // For identifying the name of the forum in a notification email. (string)
// Indexing
"enable_indexing" => true, // Allow indexing the post? (bool)
// 3.0.6
"force_approved_state" => true, // Allow the post to be submitted without going into unapproved queue
// 3.1-dev, overwrites force_approve_state
"force_visibility" => true, // Allow the post to be submitted without going into unapproved queue, or make it be deleted
);
submit_post ($mode, $sujet, $username, $topic_type, $poll, $data);
Many thanks !