所以我寫出一個投票就送錢的模組鼓勵使用者投票\r
代碼: 選擇全部
#################################################################
## Mod Title: Voting + Money for phpBB2
## Mod Version: v1.0b
## Author: Vincent <want@ms59.url.com.tw>
## Description: When user voting, the money of user will add.
##
## Installation Level: Very Easy
## Installation Time: 1 Minutes
##
## Files To Edit: 1
## posting.php
#################################################################
#
#-----[ OPEN ]-------------------------------------------------------
#
posting.php
#
#-----[ FIND ]----------------------------------------
#
$message = $lang['Vote_cast'];
#
#-----[ BEFORE, ADD ]---------------------------------
#
// 投票就送錢,BEGIN
$sql = "UPDATE phpbb_users
SET user_money = user_money + 100
WHERE user_id = ".$userdata['user_id'];
if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
{
message_die(GENERAL_ERROR, 'Could not update poll result', '', __LINE__, __FILE__, $sql);
}
// 投票就送錢,END
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM