nee dat moet je toch echt opzoeken.
Ik post de mod effe.
@special18:ik ben het forum nog aan het inrichten;)
Code: Selecteer alles
#####################################################################
##
## Only do this if you prevously installed this MOD without function to list top donors in index page.
##
#####################################################################
#
#-----[ SQL ]-------------------------------------------------
#
INSERT INTO phpbb_config(config_name, config_value) VALUES('list_top_donors', '0');
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<tr>
<td class="row1">{L_LW_DISPLAY_X_DONORS}<br /><span class="gensmall">{L_LW_DISPLAY_X_DONORS_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="dislay_x_donors" value="{LW_DISPLAY_X_DONORS}" /></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_LW_TOP_DONORS}<br /><span class="gensmall">{L_LW_TOP_DONORS_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="list_top_donors" value="{LW_TOP_DONORS}" /></td>
</tr>
#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------------
#
"L_LW_DONATION_POINTS_EXPLAIN" => $lang['L_LW_DONATION_POINTS_EXPLAIN'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"LW_TOP_DONORS" => $new['list_top_donors'],
"L_LW_TOP_DONORS" => $lang['L_LW_TOP_DONORS'],
"L_LW_TOP_DONORS_EXPLAIN" => $lang['L_LW_TOP_DONORS_EXPLAIN'],
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------------
#
//-- fin mod : Loewen Enterprise - Donation MOD v1.0.0.1 ----------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['L_LW_TOP_DONORS'] = 'Display top donors: ';
$lang['L_LW_TOP_DONORS_EXPLAIN'] = 'If you want to display top donors, enter 1; If you want to display last donors, enter 0.';
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
//-- fin mod : Loewen Enterprise - Donation MOD v1.0.0.1 ----------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['L_LW_TOP_DONORS_TITLE'] = 'Top %s Donors';
#
#-----[ OPEN ]------------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------------
#
if( strlen($donordesc) > 0)
{
$donordesc .= '<a href="' . append_sid("lwdonors.$phpEx?mode=viewcurrent") . '"' . $style_color .'>' . $lang['LW_CURRENT_DONORS'] . '</a>';
$donordesc .= ']';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
$donationtitle = "";
if(intval($board_config['list_top_donors']) == 1)
{
$donationtitle = sprintf($lang['L_LW_TOP_DONORS_TITLE'], $board_config['dislay_x_donors']) . ' ' . $donordesc;
}
else
{
$donationtitle = sprintf($lang['L_LW_LAST_DONORS'], $board_config['dislay_x_donors']) . ' ' . $donordesc;
}
#
#-----[ FIND ]------------------------------------------------
#
# This is a partial search, then whole line maybe longer
#
'L_LW_LAST_DONORS' =>
#
#-----[ REPLACE WITH ]------------------------------------------------
#
# Replace the whole line with following setence
#
'L_LW_LAST_DONORS' => $donationtitle,
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
# Replace the whole function definition with following replacement.
#
function last_donors()
{
global $db, $phpEx, $theme, $lang, $board_config;
// Show All
$count = 0;
$sql = "SELECT COUNT(*) FROM " . ACCT_HIST_TABLE . " a, " . USERS_TABLE . " u" . " WHERE a.comment LIKE 'donate from%' AND u.user_id = a.user_id";
//in between content are omitted.
$last_donors .= '<a href="' . append_sid("lwdonors.$phpEx?mode=viewall") . '"' . $style_color .'>' . $lang['LW_MORE_DONORS'] . '</a>';
}
if($count == 0)
{
$last_donors = $lang['LW_NO_DONORS_YET'];
}
return $last_donors;
}
#
#-----[ REPLACE WITH ]------------------------------------------------
#
function last_donors()
{
global $db, $phpEx, $theme, $lang, $board_config;
// Show All
$count = 0;
$sql = "SELECT COUNT(*) FROM " . ACCT_HIST_TABLE . " a, " . USERS_TABLE . " u" . " WHERE a.comment LIKE 'donate from%' AND u.user_id = a.user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forum donors information', '', __LINE__, __FILE__, $sql);
}
if($row = $db->sql_fetchrow($result))
{
$count = $row['COUNT(*)'];
}
$orderby = "ORDER BY lw_date DESC";
if(intval($board_config['list_top_donors']) == 1)
{
$orderby = "ORDER BY lw_money DESC";
}
$str_input = intval($board_config['dislay_x_donors']);
$sql = "SELECT a.*, u.* FROM " . ACCT_HIST_TABLE . " a, " . USERS_TABLE . " u" . " WHERE a.comment LIKE 'donate from%' AND u.user_id = a.user_id" .
" $orderby LIMIT $str_input";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forum donors information', '', __LINE__, __FILE__, $sql);
}
$last_donors = '';
while( $row = $db->sql_fetchrow($result) )
{
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
if($row['user_id'] == ANONYMOUS)
{
$last_donors .= $lang['LW_ANONYMOUS_DONOR'] . '(' . $row['MNY_CURRENCY'] . sprintf("%.2f", $row['lw_money']) . '), ';
}
else
{
$last_donors .= '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>(' . $row['MNY_CURRENCY'] . sprintf("%.2f", $row['lw_money']) . '), ';
}
}
if($count > $str_input)
{
$last_donors .= '<a href="' . append_sid("lwdonors.$phpEx?mode=viewall") . '"' . $style_color .'>' . $lang['LW_MORE_DONORS'] . '</a>';
}
if($count == 0)
{
$last_donors = $lang['LW_NO_DONORS_YET'];
}
return $last_donors;
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Dus of de mod klopt niet of ik ie iets over het hoofd