} else {
        $display_notice = true;
    }
}
// Instantiate BBCode if need be
if ($bbcode_bitfield !== '') {
    $bbcode = new bbcode(base64_encode($bbcode_bitfield));
}
for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) {
    if (!isset($rowset[$post_list[$i]])) {
        continue;
    }
    $row =& $rowset[$post_list[$i]];
    // Size the message to max length
    if ($max_announce_item_length != 0 && strlen($row['post_text']) > $max_announce_item_length) {
        $row['post_text'] = sgp_truncate_message($row['post_text'], $max_announce_item_length);
        $row['post_text'] .= ' <a href="' . append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . ($row['forum_id'] ? $row['forum_id'] : $forum_id) . '&amp;t=' . $row['topic_id']) . '"><strong>[' . $user->lang['VIEW_FULL_ARTICLE'] . ']</strong></a>';
    }
    // Parse the message
    $message = censor_text($row['post_text']);
    $message = acronym_pass($message);
    // Second parse bbcode here
    if ($row['bbcode_bitfield']) {
        $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
    }
    $message = bbcode_nl2br($message);
    $message = smiley_text($message);
    if (!empty($attachments[$row['post_id']])) {
        parse_attachments($row['forum_id'], $message, $attachments[$row['post_id']], $update_count);
    }
    $postrow = array('ALLOW_REPLY' => $auth->acl_get('f_reply', $row['forum_id']) && $row['topic_status'] != '1' ? TRUE : FALSE, 'ALLOW_POST' => $auth->acl_get('f_post', $row['forum_id']) && $row['topic_status'] != '1' ? TRUE : FALSE, 'POSTER' => '<span style="color:#' . $row['user_colour'] . ';">' . $row['username'] . '</span>', 'TIME' => $row['post_time'], 'TITLE' => $row['topic_title'], 'MESSAGE' => $message, 'U_POSTER' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour']), 'U_VIEW' => append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . ($row['forum_id'] ? $row['forum_id'] : $forum_id) . '&amp;t=' . $row['topic_id']), 'U_REPLY' => append_sid("{$phpbb_root_path}posting.{$phpEx}", 'mode=reply&amp;t=' . $row['topic_id'] . '&amp;f=' . $row['forum_id']), 'U_PRINT' => $auth->acl_get('f_print', $row['forum_id']) ? append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", "f=" . $row['forum_id'] . "&amp;t=" . $row['topic_id'] . "&amp;view=print") : '', 'U_REPLY_IMG' => '<img src="' . $phpbb_root_path . 'styles/' . $user->theme['imageset_path'] . '/imageset/portal/post_comment.png' . '" title="' . $user->lang['POST_COMMENTS'] . '" alt="' . $user->lang['POST_COMMENTS'] . '" />', 'U_PRINT_IMG' => '<img src="' . $phpbb_root_path . 'styles/' . $user->theme['imageset_path'] . '/imageset/portal/post_print.png' . '" title="' . $user->lang['PRINT_IT'] . '" alt="' . $user->lang['PRINT_IT'] . '" />', 'U_VIEW_IMG' => '<img src="' . $phpbb_root_path . 'styles/' . $user->theme['imageset_path'] . '/imageset/portal/post_view.png' . '" title="' . $user->lang['VIEW_FULL_ARTICLE'] . '" alt="' . $user->lang['VIEW_FULL_ARTICLE'] . '" />', 'S_TOPIC_TYPE' => $row['topic_type'], 'S_NOT_LAST' => $i < sizeof($posts) - 1 ? true : false, 'S_ROW_COUNT' => $i, 'S_POST_UNAPPROVED' => $row['post_approved'] ? false : true, 'S_DISPLAY_NOTICE' => $display_notice, 'S_HAS_ATTACHMENTS' => !empty($attachments[$row['post_id']]) ? true : false, 'S_DISPLAY_NOTICE' => $display_notice && $row['post_attachment']);
        $display_notice = true;
    }
}
// Instantiate BBCode if need be
if ($bbcode_bitfield !== '') {
    $bbcode = new bbcode(base64_encode($bbcode_bitfield));
}
for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) {
    if (!isset($rowset[$post_list[$i]])) {
        continue;
    }
    $store = 0;
    $row =& $rowset[$post_list[$i]];
    // Size the message to max length set in ACP
    if ($max_news_item_length != 0 && strlen($row['post_text']) > $max_news_item_length) {
        $row['post_text'] = sgp_truncate_message($row['post_text'], $max_news_item_length);
        $row['post_text'] .= ' <a href="' . append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . ($row['forum_id'] ? $row['forum_id'] : $forum_id) . '&amp;t=' . $row['topic_id']) . '"><strong>[' . $user->lang['VIEW_FULL_ARTICLE'] . ']</strong></a>';
    }
    // Parse the message
    $message = censor_text($row['post_text']);
    $message = acronym_pass($message);
    // Second parse bbcode here
    if ($row['bbcode_bitfield']) {
        $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
    }
    $message = bbcode_nl2br($message);
    $message = smiley_text($message);
    if (!empty($attachments[$row['post_id']])) {
        parse_attachments($row['forum_id'], $message, $attachments[$row['post_id']], $update_count);
    }
    $forum_id = $row['forum_id'];