ich hatte mal das "Points System"-MOD installiert.....
Funktioniert super.
Nur hab ich durch eine Kontrolle festgestellt das auch ein Moderator Punkte vergeben kann.
Das hatte zur Folge das der Moderator sich ne Menge an Punkte zugespielt hat.
Kann man das denn abändern?
Sozusagen das nur der Admin punkte vergeben kann.....bzw. das System ????
Danke schon mal
Hier mal die MOD:
Code: Alles auswählen
#################################################################
## Mod Title: Points System
## Mod Version: 1.1.1
## Author: ssjslim < ssjslim@yahoo.com > - http://bbmod.sourceforge.net
## Description: A points system to use for anything you want on your board.
##
## Installation Level: moderate
## Installation Time: 15 Minutes
## Files To Edit: viewtopic.php, memberlist.php, function_post.php, usercp_viewprofile.php, lang_main.php, viewtopic_body.tpl, memberlist_body.tpl, profile_view_body.tpl
## Included Files: admin_points.php, points_config_body.tpl, points_system.tpl, pointscp.php, mod_install.php, mod_uninstall.php
#################################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
#################################################################
##
## Author Note:
## You should change all your languages and themes if you use others
## then English and subSilver.
#################################################################
##
## Installation
##
## 1) Upload all files to their respective location in this format.
##
## /admin/admin_points.php
## /templates/subSilver/admin/points_config_body.tpl
## /templates/subSilver/points_system.tpl
## /pointscp.php
## /update_user_points.php (Only needed to update user points)
## /mod_install.php (Only needed for install)
## /mod_uninstall.php (Only needed for uninstall)
##
## 2) Run mod_install.php from your web broswer to make the table changes.
## 3) If you want to give points for user's current posts run update_user_points.php.
## 4) Read below to make the rest of the changes.
#################################################################
##
## Upgrading
##
## 1) Remove all edits and files.
## 2) Follow the installation steps, but skip step 2.
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$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'];
#
#-----[ REPLACE WITH ]----------------------------------
#
$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'];
#
#-----[ FIND ]------------------------------------------
#
$user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
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 = '';
}
#
#-----[ FIND ]------------------------------------------
#
'DELETE' => $delpost,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'POINTS' => $user_points,
'DONATE_POINTS' => $donate_points,
#
#-----[ OPEN ]------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------
#
$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');
#
#-----[ REPLACE WITH ]------------------------------------------
#
$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');
#
#-----[ FIND ]------------------------------------------
#
'L_POSTS' => $lang['Posts'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_POINTS' => $board_config['points_name'],
#
#-----[ FIND ]------------------------------------------
#
case 'topten':
$order_by = "user_posts DESC LIMIT 10";
break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
case 'points':
$order_by = "user_points $sort_order LIMIT $start," . $board_config['topics_per_page'];
break;
#
#-----[ FIND ]------------------------------------------
#
$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";
#
#-----[ REPLACE WITH ]------------------------------------------
#
$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";
#
#-----[ FIND ]------------------------------------------
#
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$user_points = $row['user_points'];
#
#-----[ FIND ]------------------------------------------
#
'YIM' => $yim,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'POINTS' => $user_points,
#
#-----[ OPEN ]------------------------------------------
#
includes/function_post.php
#
#-----[ FIND ]------------------------------------------
#
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']);
}
}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
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);
}
}
}
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$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 = '';
}
#
#-----[ FIND ]------------------------------------------
#
'YIM' => $yim,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_POINTS' => $board_config['points_name'],
'POINTS' => $user_points,
'DONATE_POINTS' => $donate_points,
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['A_critical_error'] = "A Critical Error Occurred";
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// 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
//
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<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>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<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>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/memberlist_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<th class="thTop" nowrap="nowrap">{L_POSTS}</th>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<th class="thTop" nowrap="nowrap">{L_POINTS}</th>
#
#-----[ FIND ]------------------------------------------
#
<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POSTS}</span></td>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POINTS}</span></td>
#
#-----[ FIND ]------------------------------------------
#
<td class="catbottom" colspan="8" height="28"> </td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td class="catbottom" colspan="9" height="28"> </td>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<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>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<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>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM