Придется еще раз полазить в коде

пардон, а что за жучек???Xpert писал(а):Готово. Жучок затесался в functions_post, вот что должно быть на самом деле:Код в архиве уже обновлен.Код: Выделить всё
if ( ($mode == 'editpost') && (isset($post_data['post_time'])) ) { $sql = 'UPDATE ' . POSTS_TABLE . ' SET post_time = ' . $post_data['post_time'] . ' WHERE post_id = ' . $post_id; $result = $db->sql_query($sql) or message_die(GENERAL_ERROR, 'Could not update last post time', '', __LINE__, __FILE__, $sql); $sql = 'UPDATE ' . FORUMS_TABLE . ' SET forum_last_post_id = ' . $post_id . ' WHERE forum_id = ' . $forum_id; $result = $db->sql_query($sql) or message_die(GENERAL_ERROR, 'Could not update last post id', '', __LINE__, __FILE__, $sql); }
$sql = 'UPDATE ' . FORUMS_TABLE . ' SET forum_last_post_id = ' . $post_data['post_time'] . ' WHERE forum_id = ' . $forum_id;
Код: Выделить всё
//
// Grab all the basic data (all topics except announcements)
// for this forum
//
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
$limit_topics_time
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
Код: Выделить всё
//
// Grab all the basic data (all topics except announcements)
// for this forum
//
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
-----AND t.topic_type <> " . POST_GLOBAL_ANNOUNCE . "---
$limit_topics_time
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
Не забудьИнтервал поправлю
Почему нет? Отдельный интервал и всех делов. Я это сделал за час, а потом ещё за весь день пофиксил багиНасчет гостей надо подумать - идея конечно хорошая, но стоит ли это делать...