Чтобы вам не искать, приведу инструкцию по подключению бота в 3.0
Open: includes/functions_posting.php
Find
Код: Выделить всё
//
// Post handling functions
//
Код: Выделить всё
function chat_notification($mode, $subject, $topic_title, $forum_name, $forum_id, $topic_id, $post_id)
{
global $db, $user, $config, $phpbb_root_path, $phpEx, $auth, $table_prefix;
$topic_notification = ($mode == 'reply' || $mode == 'quote') ? true : false;
$forum_notification = ($mode == 'post') ? true : false;
if (!$topic_notification && !$forum_notification) return;
$poster_id = $user->data['user_id'];
$forum_url = generate_board_url() . "/viewforum.$phpEx?f=$forum_id";
$topic_url = generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&p=$post_id&e=$post_id";
$notify = "<strong>" . $user->data['username'] . "</strong> ";
if($forum_notification)
{
$notify .= " создал в форуме «<a href='{$forum_url}'>{$forum_name}</a>» новую тему: <a href='{$topic_url}'>{$topic_title}</a>";
}
if($topic_notification)
{
$notify .= " ответил в теме: <a href='{$topic_url}'>{$topic_title}</a>";
}
$message = array(
'user_id' => 0,
'username' => "slutsk.net",
'time' => time(),
'text' => $notify,
'color' => '000000'
);
define('CHAT_MESSAGES_TABLE', $table_prefix . 'chat_messages');
$sql = "INSERT INTO " . CHAT_MESSAGES_TABLE . " " . $db->sql_build_array('INSERT', $message);
$db->sql_query($sql);
}
Код: Выделить всё
// Send Notifications
if ($mode != 'edit' && $mode != 'delete' && $post_approval)
{
user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id']);
Код: Выделить всё
chat_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id']);