再次感謝倉木麻衣大大的指導
原來是那個外掛出問題
小弟有再次去比對一次安裝的過程
發現在修改 functions_post.php 這個檔案中\r
代碼: 選擇全部
#-----[ 尋找 ]------------------------------------------
#
if ($mode != 'poll_delete')
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts $sign
WHERE user_id = $user_id";
#
#-----[ 改成 ]------------------------------------------
#
if ($mode != 'poll_delete')
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts $sign,
user_reply = user_reply $replysign
WHERE user_id = $user_id";
#
而小弟去在我的 functions_post.php 中尋找不到他所要尋找的關鍵字
當初修改時是用 $sql = "UPDATE " . USERS_TABLE . " 當關鍵字來作搜尋修改\r
而剛剛去看時才發現小弟所用的關鍵字所搜尋到的卻是在水怪的mod裡面\r
整個 functions_post.php 中 只找到一個 $sql = "UPDATE " . USERS_TABLE . "
而那段附近的檔案在小弟的檔案中為:
代碼: 選擇全部
// 水怪 RPG
if ( $mode == "newtopic" )
{
$reward_sql = ", rpg_cur_hp = rpg_cur_hp - 3, rpg_cur_mp = rpg_cur_mp - 3, rpg_cur_exp = rpg_cur_exp + 3"; // 發表主題 HP - 3 , MP - 3 , 經驗值 + 3
}
if ( $mode == "reply" )
{
$reward_sql = ", rpg_cur_hp = rpg_cur_hp - 2, rpg_cur_mp = rpg_cur_mp - 2, rpg_cur_exp = rpg_cur_exp + 2"; // 回覆文章 HP - 2 , MP - 2 , 經驗值 + 2
}
[color=red]$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts $sign $checkin $reward_sql
WHERE user_id = $user_id";[/color]
\n if (!$db->sql_query($sql, END_TRANSACTION))
{
message_die(GENERAL_ERROR, 'Error in posting' . $sql, '', __LINE__, __FILE__, $sql);
}
LevelUp($user_id);
}
return;
}
是不是因為水怪的關係而導致出問題呢??
而小弟如果用 if ($mode != 'poll_delete') 當關鍵字來搜尋的話\r
則找到三個檔案位置\r
但是卻又不一樣了
第一個:
代碼: 選擇全部
else [color=red]if ($mode != 'poll_delete')[/color]
{
$forum_update_sql .= ", forum_last_post_id = $post_id" . (($mode == 'newtopic') ? ", forum_topics = forum_topics $sign" : "");
$topic_update_sql = "topic_last_post_id = $post_id" . (($mode == 'reply') ? ", topic_replies = topic_replies $sign" : ", topic_first_post_id = $post_id");
}
else
{
$topic_update_sql .= 'topic_vote = 0';
}
[color=red]$sql = "UPDATE " . FORUMS_TABLE . " SET
$forum_update_sql
WHERE forum_id = $forum_id";[/color]
第二個:
代碼: 選擇全部
[color=red]if ($mode != 'poll_delete')[/color]
{
if($board_config['checkin_coden'] != 0)//起動條件後台的checkin_coden不等於0
{
$config_checkin = $board_config['checkin_coden'];
if (( $mode == "newtopic" ) && $forum_id == $config_checkin && $userdata['user_level'] == 0 && $userdata['user_checkin'] == 0)//啟動條件(發表文章,一般會員,現在版面等於後台指定版面,checkin值等於0)
{
$checkin= ", user_checkin = 1"; // CHECKIN值等於1
}
}
// 水怪 RPG
if ( $mode == "newtopic" )
{
$reward_sql = ", rpg_cur_hp = rpg_cur_hp - 3, rpg_cur_mp = rpg_cur_mp - 3, rpg_cur_exp = rpg_cur_exp + 3"; // 發表主題 HP - 3 , MP - 3 , 經驗值 + 3
}
if ( $mode == "reply" )
{
$reward_sql = ", rpg_cur_hp = rpg_cur_hp - 2, rpg_cur_mp = rpg_cur_mp - 2, rpg_cur_exp = rpg_cur_exp + 2"; // 回覆文章 HP - 2 , MP - 2 , 經驗值 + 2
}
[color=red]$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts $sign $checkin $reward_sql
WHERE user_id = $user_id";[/color]
if (!$db->sql_query($sql, END_TRANSACTION))
{
message_die(GENERAL_ERROR, 'Error in posting' . $sql, '', __LINE__, __FILE__, $sql);
}
LevelUp($user_id);
}
return;
第三個:
代碼: 選擇全部
[color=red]if ($mode != 'poll_delete')[/color]
{
$GLOBALS['cm_posting']->update_delete($mode, $post_data, $forum_id, $topic_id, $post_id);
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
[color=red]$sql = "DELETE FROM " . POSTS_TABLE . "
WHERE post_id = $post_id";[/color]
所以當初才會選擇以 $sql = "UPDATE " . USERS_TABLE . " 當關鍵字
然後在上述第二個裡面做修改\r
是否我裝錯地方??還是此外掛跟水怪不相容呢??謝謝!!