AllCity писал(а):должно работать
Работает) Спасибо большое!
koushi писал(а):permissions to non-default groups
$mchat_read_archive = (($mchat_allow_user_read_archive && $auth->acl_get('u_') && $user->data['is_registered']) || ($mchat_allow_guest_read_archive && $user->data['user_id'] == ANONYMOUS)) ? true : false;
if($user->data['group_id'] == '8' || $user->data['group_id'] == '6') {$mchat_read_archive = true;}
if($user->data['group_id'] == '9' || $user->data['group_id'] == '7') {$mchat_read_archive = false;}
unset($sql_data[POSTS_TABLE]['sql']);
/* ============= mChat Start Addon ============= */
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'],
'user_ip' => $user->data['session_ip'],
'message' => $message,
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'bbcode_options' => $options,
'message_time' => time(),
'guestname' => ''
);
$sql = 'REPLACE INTO '.MCHAT_TABLE.' '.$db->sql_build_array('REPLACE', $sql_ary);
$db->sql_query($sql);
/* ============== mChat End Addon ============== */
/* ============= mChat Start Addon ============= */
global $table_prefix;
// Add name for db.
define('MCHAT_TABLE', $table_prefix.'mchat');
// New post only!
if ($post_mode == 'post')
{
// New post lang
$mchat_new_data = $user->lang['POST_TOPIC'];
// 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'],
'user_ip' => $user->data['session_ip'],
'message' => $message,
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'bbcode_options' => $options,
'message_time' => time(),
'guestname' => ''
);
$sql = 'REPLACE INTO '.MCHAT_TABLE.' '.$db->sql_build_array('REPLACE', $sql_ary);
$db->sql_query($sql);
}
/* ============== mChat End Addon ============== */
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1