if($bb_cfg['new_add_post_num'])
{
$trash_forums = $bb_cfg['trash_forum_id'] ? $bb_cfg['trash_forum_id'] : '0';
$ignor_forum = $bb_cfg['new_add_post_ignor_f'];
$data = DB()->fetch_rowset("SELECT
tr.topic_id, tr.forum_id, tr.poster_id, tr.post_id,
t.*, f.*, u.user_id, u.username, u.user_avatar, u.user_avatar_type, u.user_opt, u.user_rank
FROM
". BB_POSTS ." tr
LEFT JOIN ". BB_TOPICS ." t ON tr.post_id = t.topic_last_post_id
AND t.forum_id NOT IN($ignor_forum, $trash_forums)
LEFT JOIN ". BB_FORUMS ." f ON tr.forum_id = f.forum_id
AND f.auth_read = ". AUTH_ALL ."
LEFT JOIN ". BB_USERS ." u ON tr.poster_id = u.user_id
AND u.username = u.username
AND f.allow_porno_topic = 0
ORDER BY
t.topic_last_post_time DESC
LIMIT 0,".$bb_cfg['new_add_post_num']);
$this->store('new_added_post', $data);
}