這個
輸入SQL
代碼: 選擇全部
ALTER TABLE `phpbb_posts` ADD `post_bump` TINYINT(1) DEFAULT '0' NOT NULL;
開啟
代碼: 選擇全部
viewforum.php
代碼: 選擇全部
p2.post_time
代碼: 選擇全部
p2.post_bump
代碼: 選擇全部
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
代碼: 選擇全部
ORDER BY p.post_time DESC, t.topic_type DESC, t.topic_last_post_id DESC
代碼: 選擇全部
$last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' .
代碼: 選擇全部
$bump = ( $topic_rowset[$i]['post_bump'] ) ? '[' . strtoupper($lang['Bump']) . ']' : '';
代碼: 選擇全部
'LAST_POST_IMG' => $last_post_url,
代碼: 選擇全部
'BUMP' => $bump,
-----------------------------------------------------------------------------
開啟
代碼: 選擇全部
viewtopic.php
代碼: 選擇全部
$goodpost_user = $postrow[$i]['goodpost_user'];
代碼: 選擇全部
$current_time = time();
$user_id2 = $userdata['user_id'];
代碼: 選擇全部
$message = $lang['Goodpost_OK'] . $return_url;
message_die(GENERAL_MESSAGE, $message);
之前加入\r
☆如果你已經有$sql = "UPDATE " . TOPICS_TABLE . " SET topic_time = $current_time
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update topic gp.", '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . POSTS_TABLE . " SET post_time = $current_time, poster_id = $user_id2
WHERE post_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update post gp.", '', __LINE__, __FILE__, $sql);
}
代碼: 選擇全部
$sql = "UPDATE " . TOPICS_TABLE . " SET topic_goods = topic_goods + 1
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update topic gp.", '', __LINE__, __FILE__, $sql);
}
代碼: 選擇全部
$sql = "UPDATE " . TOPICS_TABLE . " SET topic_goods = topic_goods + 1, topic_time = $current_time
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update topic gp.", '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . POSTS_TABLE . " SET post_time = $current_time, poster_id = $user_id2
WHERE post_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update post gp.", '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . USERS_TABLE . " SET user_gp = user_gp + 1
WHERE user_id = $poster_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update usergp.", '', __LINE__, __FILE__, $sql);
}
----------------------------------------------------------------------------------
開啟
代碼: 選擇全部
viewforum_body.tpl
代碼: 選擇全部
{topicrow.LAST_POST_IMG}
代碼: 選擇全部
{topicrow.BUMP}
----------------------------------------------------------------------------------
開啟
代碼: 選擇全部
lang_main.php
代碼: 選擇全部
?>
代碼: 選擇全部
$lang['Bump'] = "推文";
----------------------------------------------------------------------------------