Оповещение о новых ответах или темах в чате
Открыть - : includes/functions_posting.php найти
Код: Выделить всё
unset($sql_data[POSTS_TABLE]['sql']);
Код: Выделить всё
/* ============= mChat Start ============= */
global $table_prefix;
// Add name for db.
define('MCHAT_TABLE', $table_prefix.'mchat');
// New post/message.
if ($post_mode == 'post')
{
// For new post
$mchat_new_data = $user->lang['POST_TOPIC'];
}
else
{
// For new message
$mchat_new_data = $user->lang['NEW_MESSAGE'];
}
// Data...
$message = utf8_normalize_nfc($mchat_new_data.': [url='.generate_board_url().'/viewtopic.'.$phpEx.'?p='.$data['post_id'].'#p'.$data['post_id'].']'.$subject.'[/url]');
// Add function part code from http://wiki.phpbb.com/Parsing_text
$uid = $bitfield = $options = ''; // will be modified by generate_text_for_storage
generate_text_for_storage($message, $uid, $bitfield, $options, true, false, false);
$sql_ary = array(
'user_id' => $user->data['user_id'],
'username' => $user->data['username'],
'user_colour' => $user->data['user_colour'],
'user_ip' => $user->data['session_ip'],
'message' => $message,
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'bbcode_options' => $options,
'message_time' => time()
);
$sql = 'INSERT INTO '.MCHAT_TABLE.' '.$db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
/* ============== mChat End ============== */