admin/applications/forums/modules_public/extras/stats.php
Найти
ksort($members);
Ниже добавить
$ids = array();
foreach( $members as $member )
{
$ids[] = $member['member_id'];
}
$weekStats = array();
if ($ids)
{
$this->DB->build( array(
'select' => 'author_id, COUNT(*) as post_week',
'from' => 'posts',
'where' => "post_date > " . (time() - 604800) . " AND author_id IN(" . implode( ',', $ids ) . ")",
'group' => "author_id",
) );
$o = $this->DB->execute();
while( $r = $this->DB->fetch($o) )
{
$weekStats[$r['author_id']] = $r['post_week'];
}
}
foreach( $members as $name => $member )
{
$members[$name]['post_week'] = isset($weekStats[$member['member_id']]) ? $weekStats[$member['member_id']] : 0;
}
В шаблоне использовать $info['post_week']