<php>
$justSayNo = array();
foreach( $this->registry->getClass('class_forums')->forum_by_id as $id => $data )
{
if ( ! $data['inc_postcount'] )
{
$justSayNo[] = $id;
}
}
$fiddyCent = $this->registry->getClass('class_forums')->fetchSearchableForumIds( $member['member_id'], $justSayNo );
$fiddyCent = ( count( $fiddyCent ) ) ? $fiddyCent : array( 0 => 0 );
$result = $this->DB->buildAndFetch( array(
'select' => 'COUNT(*) as post_week',
'from' => array( 'posts' => 'p' ),
'where' => "p.author_id={$member['member_id']} AND p.post_date > " . (time() - 604800) . " AND t.forum_id IN(" . implode( ',', $fiddyCent ) . ')',
'group' => "p.author_id",
'add_join' => array( array( 'from' => array( 'topics' => 't' ),
'where' => 't.tid=p.topic_id',
'type' => 'inner' ) )
) );
</php>