# #-----[ SQL ]------------------------------------------ # INSERT INTO bb_config (config_name, config_value) VALUES ('join_interval', '3'); # #-----[ OPEN ]------------------------------------------ # posting.php # #-----[ FIND ]------------------------------------------ # // // Submit post/vote (newtopic, edit, reply, etc.) // # #-----[ AFTER, ADD ]------------------------------------------ # // double_post eliminate start if ( $mode == 'reply' && $userdata['user_id'] != ANONYMOUS ) { $poster_id = $userdata['user_id']; $sql = "SELECT post_id, poster_id, post_time, MAX(post_time) FROM " . BB_POSTS . " WHERE topic_id = $topic_id GROUP BY post_time ORDER BY post_time DESC LIMIT 1"; if ( !($result = DB()->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql); } $post_id_last_row = DB()->sql_fetchrow($result); $post_id = $post_id_last_row['post_id']; $difference_time = TIMENOW - $post_id_last_row['post_time']; $separator = " \n\n[size=9][color=#999999]" . $lang['ADDED_LATER'] . delta_time($post_id_last_row['post_time'], TIMENOW, 'seconds'). ":[/color][/size]\n\n "; if ( $post_id_last_row['poster_id'] == $poster_id && ( $difference_time < ( $bb_cfg['join_interval'] * 3600 ) ) ) { $mode = 'editpost'; $sql = "SELECT post_text FROM " . BB_POSTS_TEXT . " WHERE post_id = $post_id"; if ( !($result = DB()->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql); } $last_message_row = DB()->sql_fetchrow($result); // i don't know much about parsing the message, so it may well be that, there are some wrongs, anyway all seems to work fine $last_message = $last_message_row['post_text']; $last_message = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $last_message); $last_message = undo_htmlspecialchars(addslashes($last_message)); } } $added = 0; // double_post eliminate end # #-----[ FIND ]------------------------------------------ # $poll_length = ( isset($_POST['poll_length']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_length'] : ''; # #-----[ AFTER, ADD ]------------------------------------------ # if ( !empty($last_message) ) { $message = ( $last_message != $message ) ? $last_message . $separator . $message : $message; $added = 1; } # #-----[ FIND ]------------------------------------------ # submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, DB()->escape($username), DB()->escape($subject), DB()->escape($message), DB()->escape($poll_title), $poll_options, $poll_length, $update_post_time); # #-----[ IN-LINE FIND ]------------------------------------------ # , $poll_length # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , $added # #-----[ OPEN ]------------------------------------------ # /includes/functions_post.php # #-----[ FIND ]------------------------------------------ # function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length, $update_post_time) # #-----[ IN-LINE FIND ]------------------------------------------ # , &$poll_length # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , &$added # #-----[ FIND ]------------------------------------------ # $edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : ""; # #-----[ REPLACE]------------------------------------------ # $edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && @$post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : ""; # #-----[ FIND ]------------------------------------------ # if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post'])) { $topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0; # #-----[ BEFORE, ADD ]------------------------------------------ # if ( $added && $mode == 'editpost' ) { $sql = "UPDATE " . BB_POSTS . " SET post_time = " . $current_time . " WHERE post_id = " . $post_id; if ( !($result = DB()->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not update last post time', '', __LINE__, __FILE__, $sql); } } # #-----[ OPEN ]------------------------------------------ # admin\admin_board.php # #-----[ FIND ]------------------------------------------ # 'FLOOD_INTERVAL' => $new['flood_interval'], # #-----[ AFTER, ADD ]------------------------------------------ # 'JOIN_INTERVAL' => $new['join_interval'], # #-----[ OPEN ]------------------------------------------ # /language/lang_russian/lang_admin.php # #-----[ В самый низ добавить ]------------------------------------------ # // Склеивание сообщений $lang['JOIN'] = 'Склеивание сообщений'; $lang['JOIN_INTERVAL'] = 'Интервал склеивания сообщений'; $lang['JOIN_INTERVAL_EXPLAIN'] = 'Интервал времени по какому мод склеивает сообщения'; # #-----[ OPEN ]------------------------------------------ # /language/lang_russian/lang_main.php # #-----[ В самый низ добавить ]------------------------------------------ # // Склеивание сообщений $lang['ADDED_LATER'] = 'Добавлено спустя '; # #-----[ OPEN ]------------------------------------------ # templates\admin\admin_board.tpl # #-----[ FIND ]------------------------------------------ # # #-----[ BEFORE, ADD ]------------------------------------------ #