由於oO]-[Oo™所發表的虛擬貨幣不能用在2.0.4版
而正好我是使用2.0.4版本,所以我花了些時間修改\r
有問題的地方還請不吝指教..
首先:
------------------------------------------------------------------------
請按照oO]-[Oo™的說明安裝到viewtopic.php為止
http://phpbb-tw.net/phpbb/viewtopic.php ... %B3f%B9%F4
-----------------------------------------------------------------------
然後重點來了
請跳過posting.php的部分
按照以下的方式安裝
打開/include/functions_post.php
尋找
代碼: 選擇全部
//
// Update post stats and details
//
function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_id, &$user_id)
{
global $db;
$sign = ($mode == 'delete') ? '- 1' : '+ 1';
代碼: 選擇全部
$money ='+ 0';
if($mode == 'newtopic')
{
$money ='+ 30'; // newtopic get money value
}elseif($mode == 'reply')
{
$money ='+ 20'; // reply get money value
}
代碼: 選擇全部
if ($post_data['first_post'])
{
$forum_update_sql .= ', forum_topics = forum_topics - 1';
}
else
{
$topic_update_sql .= 'topic_replies = topic_replies - 1';
$sql = "SELECT MAX(post_id) AS last_post_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id";
代碼: 選擇全部
if ($post_data['first_post'])
{
$forum_update_sql .= ', forum_topics = forum_topics - 1';
$money ='- 30'; //delete 主題
}
else
{
$topic_update_sql .= 'topic_replies = topic_replies - 1';
$money ='- 20'; //delete 回覆
$sql = "SELECT MAX(post_id) AS last_post_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id";
代碼: 選擇全部
$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts $sign
WHERE user_id = $user_id";
代碼: 選擇全部
$sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts $sign , user_money = user_money $money
WHERE user_id = $user_id";