Ranks afbeeldingen niet in de statestieken
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

je hebt er een dubbele url staan
als ik kijk naar de url van je plaatje zie ik dit :
http://www.test.birdplanet.nl/http://ww ... rsvers.gif
als ik kijk naar de url van je plaatje zie ik dit :
http://www.test.birdplanet.nl/http://ww ... rsvers.gif
statistic.tpl:
(die is het niet
)
rank_module.tpl (in stat_modules / users_ranks / )
Code: Selecteer alles
<!-- BEGIN main_bottom -->
<center><span class="copyright">{VERSION_INFO}<br>
{INSTALL_INFO}<br>
{VIEWED_INFO}</span></center>
<!-- END main_bottom -->
(die is het niet

rank_module.tpl (in stat_modules / users_ranks / )
Code: Selecteer alles
<table border="0" cellpadding="4" cellspacing="1" class="forumline" width="100%">
<tr>
<td class="catHead" align="center" colspan="7">
<span class="cattitle">{MODULE_NAME}</span>
</td>
</tr>
<tr>
<th class="thCornerL" align="center"><strong>{L_RANK}</strong></th>
<th class="thTop" align="center" width="10%"><strong>{L_RANK_IMAGE}</strong></th>
<th class="thTop" align="center" width="10%"><strong>{L_RANK_TITLE}</strong></th>
<th class="thTop" align="center" width="10%"><strong>{L_RANK_RANGE}</strong></th>
<th class="thTop" align="center" width="10%"><strong>{L_USERS}</strong></th>
<th class="thTop" align="center" width="10%"><strong>{L_PERCENTAGE}</strong></th>
<th class="thCornerR" align="center" width="50%"><strong>{L_GRAPH}</strong></th>
</tr>
<!-- BEGIN ranks -->
<tr>
<td class="{ranks.CLASS}" align="left"><span class="gen">{ranks.RANK}</span></td>
<td class="{ranks.CLASS}" align="center" width="10%"><span class="gen">{ranks.RANK_IMAGE}</span></td>
<td class="{ranks.CLASS}" align="center" width="10%"><span class="gen">{ranks.RANK_TITLE}</span></td>
<td class="{ranks.CLASS}" align="center" width="10%"><span class="gen">{ranks.RANK_RANGE}</span></td>
<td class="{ranks.CLASS}" align="center" width="10%"><span class="gen">{ranks.USERS}</span></td>
<td class="{ranks.CLASS}" align="center" width="10%"><span class="gen">{ranks.PERCENTAGE}%</span></td>
<td class="{ranks.CLASS}" align="left" width="50%">
<table cellspacing="0" cellpadding="0" border="0" align="left">
<tr>
<td align="right"><img src="{LEFT_GRAPH_IMAGE}" width="4" height="12" /></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" align="left" width="{ranks.BAR}%">
<tr>
<td><img src="{GRAPH_IMAGE}" width="100%" height="12" /></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" align="left">
<tr>
<td align="left"><img src="{RIGHT_GRAPH_IMAGE}" width="4" height="12" /></td>
</tr>
</table>
</td>
</tr>
<!-- END ranks -->
</table>
Laatst gewijzigd door Eefjuh op 24 feb 2005, 18:54, 1 keer totaal gewijzigd.
-
- Berichten: 521
- Lid geworden op: 29 jan 2004, 22:41
- Contacteer:
Code: Selecteer alles
<?php
/***************************************************************************
* module.php
* -------------------
* begin : Tuesday, Aug 20, 2002
* copyright : RustyDragon
* contact : <dev@RustyDragon.com>, http://www.RustyDragon.com
* $Id: module.php,v 1.3.1.4 2002/10/21 14:59:29 RustyDragon Exp $
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
//
//All your code
//
//Vote Images based on the theme path, (i.e. templates/CURRNT_THEME/ is already inserted below)
$vote_left = 'images/vote_lcap.gif';
$vote_right = 'images/vote_rcap.gif';
$vote_bar = 'images/voting_bar.gif';
$rank = 0;
//
// Getting voting bar info from template
//
if( !$board_config['override_user_style'] )
{
if( $userdata['user_id'] != ANONYMOUS && isset($userdata['user_style']) )
{
$style = $userdata['user_style'];
if( !$theme )
$style = $board_config['default_style'];
}
else
$style = $board_config['default_style'];
}
else
$style = $board_config['default_style'];
$sql = 'SELECT *
FROM ' . THEMES_TABLE . "
WHERE themes_id = $style";
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Couldn't query database for theme info.");
}
if( !$row = $db->sql_fetchrow($result) )
{
message_die(CRITICAL_ERROR, "Couldn't get theme data for themes_id=$style.");
}
$template_path = $phpbb_root_path . 'templates/' ;
$template_name = $row['template_name'] ;
$current_template_path = $template_path . $template_name . '/';
$template->assign_vars(array(
'LEFT_GRAPH_IMAGE' => $current_template_path . $vote_left,
'RIGHT_GRAPH_IMAGE' => $current_template_path . $vote_right,
'GRAPH_IMAGE' => $current_template_path . $vote_bar)
);
$total_users = get_db_stat('usercount');
$lines_num = 0;
$percentage = 0;
$bar_percent = 0;
//
// Regular ranks
//
$sql = 'SELECT *
FROM ' . RANKS_TABLE . '
WHERE rank_special != 1
ORDER BY rank_min ASC';
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't retrieve ranks data", '', __LINE__, __FILE__, $sql);
}
$ranks_count = $db->sql_numrows($result);
$ranks_data = $db->sql_fetchrowset($result);
for ($j = 0; $j < $ranks_count && $lines_num<$return_limit ; $j++)
{
$rank_min = $ranks_data[$j]['rank_min'];
if ( $j == $ranks_count - 1 )
{
$sql = 'SELECT COUNT(user_id) used_counter
FROM ' . USERS_TABLE . '
WHERE user_posts >= '. $rank_min;
$posts_range = $rank_min . ' + ';
}
else
{
$rank_max = $ranks_data[$j+1]['rank_min'];
$sql = 'SELECT COUNT(user_id) used_counter
FROM ' . USERS_TABLE . '
WHERE user_posts >= '. $rank_min .'
AND user_posts < '. $rank_max;
$posts_range = $rank_min . ' - ' . $rank_max;
}
if ($rank_min == ($rank_max - 1)) {
$posts_range = $rank_min;
} else {
$posts_range = $rank_min . " - " . ($rank_max - 1);
}
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't retrieve ranks data", '', __LINE__, __FILE__, $sql);
}
$user_data = $db->sql_fetchrowset($result);
$user_count = $user_data[0]['used_counter'];
if ( $j == 0 ){//first row
$firstcount = $user_count;
$cst = 90 / $firstcount;
}
if ( $user_count != 0 )
{
$percentage = round( min(100, ($user_count /$total_users) * 100));
}
else
{
continue;
}
$bar_percent = round($user_count * $cst);
if ($ranks_data[$j]['rank_image'])
{
$rank_image = "<img src='".$phpbb_root_path.$ranks_data[$j]['rank_image']."' border=0 alt=".$ranks_data[$j]['rank_title'].">";
}
else
{
$rank_image = "";
}
$lines_num++;
$template->assign_block_vars('ranks', array(
'RANK' => $lines_num,
'CLASS' => ( !($i+1 % 2) ) ? $theme['td_class2'] : $theme['td_class1'],
'RANK_TITLE' => $ranks_data[$j]['rank_title'],
'RANK_IMAGE' => $rank_image,
'RANK_RANGE' => $posts_range,
'USERS' => $user_count,
'PERCENTAGE' => $percentage,
'BAR' => $bar_percent)
);
}
/*
//
// Uncomment this if you want to see special ranks statistic
//
$sql = 'SELECT COUNT(u.user_rank) used_counter, r.rank_title , r.rank_image
FROM ' . USERS_TABLE . ' u, '. RANKS_TABLE . ' r
WHERE u.user_id != -1
AND u.user_rank = r.rank_id
GROUP BY u.user_rank ORDER BY used_counter DESC';
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't retrieve ranks data", '', __LINE__, __FILE__, $sql);
}
$user_count = $db->sql_numrows($result);
$user_data = $db->sql_fetchrowset($result);
for ($i = 0; $i < $user_count; $i++)
{
if ( $user_data[$i]['used_counter'] != 0 )
{
$percentage = round( min(100, ($user_data[$i]['used_counter'] /$total_users) * 100));
}
else
{
$percentage = 0;
}
$bar_percent = round($user_data[$i]['used_counter'] * $cst);
if ($user_data[$i]['rank_image'])
{
$rank_image = "<img src='".$phpbb_root_path.$user_data[$i]['rank_image']."' border=0 alt=".$user_data[$i]['rank_title'].">";
}
else
{
$rank_image = "";
}
$lines_num++;
$template->assign_block_vars('ranks', array(
'RANK' => $lines_num,
'CLASS' => ( !($i+1 % 2) ) ? $theme['td_class2'] : $theme['td_class1'],
'RANK_TITLE' => $user_data[$i]['rank_title'],
'RANK_IMAGE' => $rank_image,
'RANK_RANGE' => $lang['Rank_special'],
'USERS' => $user_data[$i]['used_counter'],
'PERCENTAGE' => $percentage,
'BAR' => $bar_percent)
);
}
*/
$template->assign_vars(array(
'L_RANK' => $lang['Rank'],
'L_USERS' => $lang['Memberlist'],
'L_PERCENTAGE' => $lang['Percent'],
'L_RANK_IMAGE' => $lang['Rank_image'],
'L_RANK_TITLE' => $lang['Poster_rank'],
'L_RANK_RANGE' => $lang['Rank_range'],
'L_GRAPH' => $lang['Graph'],
'MODULE_NAME' => $lang['module_name'])
);
?>
- Cheeta
- Berichten: 1165
- Lid geworden op: 11 jan 2004, 11:26
- Locatie: Mijdrecht Sites: -- Derbi Club --
- Contacteer:
Code: Selecteer alles
$rank_image = "<img src='".$phpbb_root_path.$ranks_data[$j]['rank_image']."' border=0 alt=".$ranks_data[$j]['rank_title'].">";
alleen hoe heb jij je rank images opgegeven in je admin paneel? volledige link waarschijnlijk?
*zou je me mss kunnen aktiveren
Don't mess with BD and save the Cheeta's!
-
- Berichten: 521
- Lid geworden op: 29 jan 2004, 22:41
- Contacteer:
-
- Berichten: 521
- Lid geworden op: 29 jan 2004, 22:41
- Contacteer: