okeej dat probleem heb ik idd op kunnen lossen met behulp van de zoek functies, maaruh ik stuit nu op het volgende
ik heb de statistieken mod top_shoutbox_posters geinstalleerd en ik heb het in zoverre werkend dat er word opgeteld, maar ik heb zelf 13 berichten wat als 130 berichten word weergegeven en plaats 1 t/m 4 heeft 100 % gepost?
Iemand een idee.. hieronder ff de source van module.php
Code: Selecteer alles
<?php
/***************************************************************************
*
* 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.
*
***************************************************************************/
// DB Cache used here
//
// Top Posting Users
//
$template->assign_vars(array(
'L_RANK' => $lang['Rank'],
'L_SHOUTS' => $lang['Shouts'],
'L_PERCENTAGE' => $lang['Percent'],
'L_USERNAME' => $lang['Username'],
'L_GRAPH' => $lang['Graph'],
'MODULE_NAME' => $lang['module_name'])
);
//
// Method 2 to define Vote Bars: Let the Statistics Mod define default Bars
//
$statistics->init_bars();
$sql = "SELECT COUNT(*) as msg FROM " . SHOUTBOX_TABLE . "
WHERE sb_user_id <> " . ANONYMOUS;
if ( !($result = $stat_db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Couldn\'t retrieve users data', '', __LINE__, __FILE__, $sql);
}
$row = $stat_db->sql_fetchrow($result);
$total_shouts = $row['msg'];
$sql = 'SELECT sb_user_id, sb_username, COUNT(id) as msg
FROM ' . SHOUTBOX_TABLE . ' , ' . USERS_TABLE . '
WHERE sb_user_id <> ' . ANONYMOUS . '
AND sb_user_id = sb_user_id
GROUP BY sb_user_id, sb_username
ORDER BY msg DESC
LIMIT ' . $return_limit;
if ( !($result = $stat_db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Couldn\'t retrieve users data', '', __LINE__, __FILE__, $sql);
}
$user_count = $stat_db->sql_numrows($result);
$user_data = $stat_db->sql_fetchrowset($result);
$firstcount = $user_data[0]['msg'];
for ($i = 0; $i < $user_count; $i++)
{
$class = ($i % 2) ? $theme['td_class2'] : $theme['td_class1'];
$statistics->do_math($firstcount, $user_data[$i]['msg'], $total_shouts);
$template->assign_block_vars('users', array(
'RANK' => $i+1,
'CLASS' => $class,
'USERNAME' => $user_data[$i]['sb_username'],
'PERCENTAGE' => $statistics->percentage,
'BAR' => $statistics->bar_percent,
'URL' => append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $user_data[$i]['sb_user_id']),
'SHOUTS' => $user_data[$i]['msg'])
);
}
?>
zoals je ziet heb ik wel database rijen moeten vervangen voor de juiste namen, want ik gebruik blijkbaar toch een net iets ander shoutbox mod