//Store TopDownloaded
if($bb_cfg['t_top_downloaded'])
{
$data = DB()->fetch_rowset("SELECT
tr.topic_id, tr.forum_id, tr.reg_time, tr.complete_count,
t.topic_title,
f.forum_name,
u.username, u.user_id, u.user_rank
FROM
". BB_BT_TORRENTS ." tr
LEFT JOIN ". BB_TOPICS ." t ON tr.topic_id = t.topic_id
LEFT JOIN ". BB_FORUMS ." f ON tr.forum_id = f.forum_id
LEFT JOIN ". BB_USERS ." u ON tr.poster_id = u.user_id
WHERE reg_time > ". (TIMENOW - 30*86400) ."
ORDER BY
tr.complete_count DESC
LIMIT 0,".$bb_cfg['t_top_downloaded']);
$this->store('top_downloaded', $data);
}