[外掛]Point System

MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!

版主: 版主管理群

主題已鎖定
jackyilk
竹貓忠實會員
竹貓忠實會員
文章: 538
註冊時間: 2002-07-21 18:55
來自: 台灣

[外掛]Point System

文章 jackyilk »

這個MOD跟虛擬貨幣的功用差不多
不過還是建議用虛擬貨幣或CashMod可能比較好用\r

---------------------------------------------------------------------------------
官方網頁 : http://www.phpbbhacks.com/viewhack.php?id=435
官方下載點(英文原版本) : http://www.phpbbhacks.com/download.php?id=435
中文化版本下載點 : http://taywe.net/net/files/Points_System中文版.exe
中文化作者原文出處 : http://taywe.net/net/viewtopic.php?t=32 ... highlight=

安裝開始 ~

#
#-----[ 開啟檔案 ]------------------------------------------
#

viewtopic.php

#
#-----[ 尋找 ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
$limit_posts_time
AND pt.post_id = p.post_id
AND u.user_id = p.poster_id
ORDER BY p.post_time $post_time_order
LIMIT $start, ".$board_config['posts_per_page'];

#
#-----[ 如未更改過任何外掛請直接覆蓋 ]----------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, u.user_points, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
$limit_posts_time
AND pt.post_id = p.post_id
AND u.user_id = p.poster_id
ORDER BY p.post_time $post_time_order
LIMIT $start, ".$board_config['posts_per_page'];

#
#-----[ 尋找 ]------------------------------------------
#
$user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];

#
#-----[ 在之後加入 ]------------------------------------------
#

if( $poster_id != ANONYMOUS )
{
$user_points = ( $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD ) ? '<a href="' . append_sid("pointscp.$phpEx?user_id=" . $postrow[$i]['user_id']) . '" class="gensmall" title="' . sprintf($lang['Points_link_title'], $board_config['points_name']) . '">' . $board_config['points_name'] . '</a>' : $board_config['points_name'];
$user_points = '<br />' . $user_points . ': ' . $postrow[$i]['user_points'];

if( $board_config['points_donate'] && $userdata['session_logged_in'] )
{
$donate_points = '<br />' . sprintf($lang['Points_donate'], '<a href="' . append_sid("pointscp.$phpEx?mode=donate&user_id=" . $postrow[$i]['user_id']) . '" class="gensmall" title="' . sprintf($lang['Points_link_title_2'], $board_config['points_name']) . '">', '</a>');
}
else
{
$donate_points = '';
}
}
else
{
$user_points = '';
$donate_points = '';
}

#
#-----[ 尋找 ]------------------------------------------
#
'DELETE' => $delpost,

#
#-----[ 在之後加入 ]------------------------------------------
#
'POINTS' => $user_points,
'DONATE_POINTS' => $donate_points,

#
#-----[ 開啟檔案 ]------------------------------------------
#

memberlist.php

#
#-----[ 尋找 ]------------------------------------------
#
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']);
$mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten');

#
#-----[ 直接覆蓋 ]------------------------------------------
#
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten'], $board_config['points_name']);
$mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten', 'points');

#
#-----[ 尋找 ]------------------------------------------
#
'L_POSTS' => $lang['Posts'],

#
#-----[ 在之後加入 ]------------------------------------------
#
'L_POINTS' => $board_config['points_name'],


#
#-----[ 尋找 ]------------------------------------------
#
case 'topten':
$order_by = "user_posts DESC LIMIT 10";
break;

#
#-----[ 在之後加入 ]------------------------------------------
#
case 'points':
$order_by = "user_points $sort_order LIMIT $start," . $board_config['topics_per_page'];
break;

#
#-----[ 尋找 ]------------------------------------------
#
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY $order_by";

#
#-----[ 直接覆蓋 ]------------------------------------------
#
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar, user_points
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY $order_by";

#
#-----[ 尋找 ]------------------------------------------
#
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

#
#-----[ 在之後加入 ]------------------------------------------
#

$user_points = $row['user_points'];

#
#-----[ 尋找 ]------------------------------------------
#
'YIM' => $yim,

#
#-----[ 在之後加入 ]------------------------------------------
#
'POINTS' => $user_points,

#
#-----[ 開啟 ]------------------------------------------
#
includes/function_post.php

#
#-----[ 尋找 ]------------------------------------------
#
if ( $result = $db->sql_query($sql) )
{
if ( $row = $db->sql_fetchrow($result) )
{
if ( $row['last_post_time'] > 0 && ( $current_time - $row['last_post_time'] ) < $board_config['flood_interval'] )
{
message_die(GENERAL_MESSAGE, $lang['Flood_Error']);
}
}
}

#
#-----[ 在之後加入 ]------------------------------------------
#

if( $board_config['points_post'] )
{
$points = abs( ( $mode == 'newtopic' ) ? $board_config['points_topic'] : $board_config['points_reply'] );

if( $userdata['session_logged_in'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_points = user_points + $points
WHERE user_id = $userdata[user_id]";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update user points', '', __LINE__, __FILE__, $sql);
}
}
}

#
#-----[ 開啟檔案 ]------------------------------------------
#
includes/usercp_viewprofile.php

#
#-----[ 尋找 ]------------------------------------------
#
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

#
#-----[ 在之後加入 ]------------------------------------------
#

$user_points = ( $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD ) ? '<a href="' . append_sid("pointscp.$phpEx?user_id=" . $profiledata['user_id']) . '" class="gen" title="' . sprintf($lang['Points_link_title'], $board_config['points_name']) . '">' . $profiledata['user_points'] . '</a>' : $profiledata['user_points'];

if( $board_config['points_donate'] && $userdata['session_logged_in'] )
{
$donate_points = '<br />' . sprintf($lang['Points_donate'], '<a href="' . append_sid("pointscp.$phpEx?mode=donate&user_id=" . $profiledata['user_id']) . '" class="genmed" title="' . sprintf($lang['Points_link_title_2'], $board_config['points_name']) . '">', '</a>');
}
else
{
$donate_points = '';
}

#
#-----[ 尋找 ]------------------------------------------
#
'YIM' => $yim,

#
#-----[ 在之後加入 ]------------------------------------------
#
'L_POINTS' => $board_config['points_name'],
'POINTS' => $user_points,
'DONATE_POINTS' => $donate_points,

#
#-----[ 開啟檔案 ]------------------------------------------
#
英文語系 :
language/lang_english/lang_main.php
中文語系 :
/language/lang_chinese_traditional_taiwan/lang_main.php

#
#-----[ 尋找 ]------------------------------------------
#
英文語系 :
$lang['A_critical_error'] = "A Critical Error Occurred";
中文語系請找 :
$lang['A_critical_error'] = '發生重大錯誤';

#
#-----[ 在之後加入 ]------------------------------------------
#

英文語系 :

//
// Points System MOD
//
$lang['Points_cp'] = "Points Control Panel";
$lang['Points_sys'] = "Points System";
$lang['Points_donation'] = "Points Donation";
$lang['Points_method'] = "Method";
$lang['Points_donate'] = "%sDonate%s";
$lang['Points_add_subtract'] = "Add or subtract %s";
$lang['Points_amount'] = "Amount";
$lang['Points_give_take'] = "Amount of %s to give or take";
$lang['Points_give'] = "Amount of %s to give";
$lang['Add'] = "Add";
$lang['Subtract'] = "Subtract";
$lang['Points_donate_to'] = "The person you want to donate %s to";
$lang['Points_no_username'] = "No username entered.";
$lang['Points_not_admin'] = "You are not allowed to admin the points system.";
$lang['Points_cant_take'] = "You can't take away that amount of %s from this user.";
$lang['Points_thanks_donation'] = "Thanks for your donation.";
$lang['Click_return_points_donate'] = "Click %sHere%s to return to Points Donation";
$lang['Points_cant_donate'] = "You can't donate that amount of %s to this user.";
$lang['Points_cant_donate_self'] = "You can't donate %s to yourself.";
$lang['Points_user_donation_off'] = "User donation is not enabled.";
$lang['Click_return_pointscp'] = "Click %sHere%s to return to the Points Control Panel";
$lang['Points_user_updated'] = "The user's %s has been updated successfully.";

//Admin
$lang['Points_updated'] = "Points Configuration Updated Successfully";
$lang['Click_return_points'] = "Click %sHere%s to return to Points Configuration";
$lang['Points_config_explian'] = "The form below will allow you to edit your point system configuration.";
$lang['Points_sys_settings'] = "Points System Settings";
$lang['Points_enable_post'] = "Earn %s by posting";
$lang['Points_enable_donation'] = "Enable Donation";
$lang['Points_name'] = "Points Name";
$lang['Points_per_reply'] = "Points Per Reply";
$lang['Points_per_topic'] = "Points Per New Topic";
$lang['Points_enable_post_explain'] = "Let users earn %s by posting new topics and replies";
$lang['Points_enable_donation_explain'] = "Let users donate %s to their friends";
$lang['Points_name_explain'] = "Whatever you call your points on your board e.g. (money, gil, gold)";
$lang['Points_per_reply_explain'] = "The amount of %s they earn per reply";
$lang['Points_per_topic_explain'] = "The amount of %s they earn per new topic";
//
// End Points System MOD
//


中文語系 :

//
// Points System MOD
//
$lang['Points_cp'] = "積分系統控制台";
$lang['Points_sys'] = "Points System";
$lang['Points_donation'] = "積分贈與系統";
$lang['Points_method'] = "積分數量";
$lang['Points_donate'] = "%s積分贈與%s";
$lang['Points_add_subtract'] = "增加或減少 %s";
$lang['Points_amount'] = "積分總數";
$lang['Points_give_take'] = "是否改變或直接更改數量 %s ";
$lang['Points_give'] = "請輸入給予的 %s 數量";
$lang['Add'] = "增加";
$lang['Subtract'] = "減少";
$lang['Points_donate_to'] = "請輸入你要將 %s 給予的會員帳號";
$lang['Points_no_username'] = "沒有此位會員或帳號";
$lang['Points_not_admin'] = "系統錯誤‧你並沒有管理員權限";
$lang['Points_cant_take'] = "數量輸入錯誤‧你並沒有此數量的 %s 可以贈與或轉讓";
$lang['Points_thanks_donation'] = "感謝你的增與";
$lang['Click_return_points_donate'] = "按這裡 %sHere%s 回到積分贈與畫面";
$lang['Points_cant_donate'] = "你並沒有此總額的 %s 可以給予其他會員";
$lang['Points_cant_donate_self'] = "你並不能將 %s 給予自己";
$lang['Points_user_donation_off'] = "使用者沒有給予的權力";
$lang['Click_return_pointscp'] = "按此 %sHere%s 回到積分控制系統";
$lang['Points_user_updated'] = "The user's %s has been updated successfully.";

//Admin
$lang['Points_updated'] = "積分系統設定完成";
$lang['Click_return_points'] = "按此 %sHere%s 回到積分系統組態設定";
$lang['Points_config_explian'] = "在此可編輯積分系統的基本組態";
$lang['Points_sys_settings'] = "積分系統組態控制選項";
$lang['Points_enable_post'] = "發表文章是否可得到 %s ";
$lang['Points_enable_donation'] = "是否能贈送或是給予";
$lang['Points_name'] = "積分系統名稱";
$lang['Points_per_reply'] = "設定經由回覆文章而達到的積分數量";
$lang['Points_per_topic'] = "設定經由發表文章而達到的積分數量";
$lang['Points_enable_post_explain'] = "讓論壇會員在發表或回覆文章時得到 %s ";
$lang['Points_enable_donation_explain'] = "讓會員能將 %s 贈送或給予其他會員";
$lang['Points_name_explain'] = "你可以為你的積分系統取一個新名稱";
$lang['Points_per_reply_explain'] = "論壇會員回覆文章後可得到 %s 的數量";
$lang['Points_per_topic_explain'] = "論壇會員發表文章後可得到 %s 的數量";
//
// End Points System MOD
//



#-----[ 開啟檔案 ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl

#
#-----[ 尋找 ]------------------------------------------
#
<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>

#
#-----[ 直接覆蓋 ]------------------------------------------
#
<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}{postrow.POINTS}{postrow.DONATE_POINTS}</span><br /></td>

#
#-----[ 開啟檔案 ]------------------------------------------
#
templates/subSilver/memberlist_body.tpl

#
#-----[ 尋找 ]------------------------------------------
#
<th class="thTop" nowrap="nowrap">{L_POSTS}</th>

#
#-----[ 在之後加入 ]------------------------------------------
#
<th class="thTop" nowrap="nowrap">{L_POINTS}</th>

#
#-----[ 尋找 ]------------------------------------------
#
<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POSTS}</span></td>

#
#-----[ 在之後加入 ]------------------------------------------
#
<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POINTS}</span></td>

#
#-----[ 尋找 ]------------------------------------------
#
<td class="catbottom" colspan="8" height="28"> </td>

#
#-----[ 直接覆蓋 ]------------------------------------------
#
<td class="catbottom" colspan="9" height="28"> </td>

#
#-----[ 開啟檔案 ]------------------------------------------
#
templates/subSilver/profile_view_body.tpl

#
#-----[ 尋找 ]------------------------------------------
#
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}/span></td>
<td> <b><span class="gen">{INTERESTS}</span></b></td>
</tr>

#
#-----[ 在之後加入 ]------------------------------------------
#
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_POINTS}/span></td>
<td><b><span class="gen">{POINTS}</span></b><span class="genmed">{DONATE_POINTS}</span></td>
</tr>

#
#-----[ 存檔並上傳所有檔案 ]------------------------------------------
#
主題已鎖定

回到「非官方認證外掛」