sql_in_set( 'p.forum_id', $news_fora_id ) . " AND u.user_id = p.poster_id AND t.topic_id = p.topic_id GROUP BY topic_id ORDER BY topic_id DESC LIMIT 0, {$topic_count} "; //die('
' . $query );
$result = $db->sql_query( $query );


while( $row = $db->sql_fetchrow($result) )
{

        // Parse the message and subject
        $message = censor_text($row['post_text']);


        // Second parse bbcode here
        if ($row['bbcode_bitfield'])
        {
            $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
        }
      
      $phpbb_root_path = '../../../forums/'; //      
        $message = bbcode_nl2br($message);
        $message = smiley_text($message);
      
         
        // Send data to output var
		
        //Subject
        $output .= "

".censor_text($row['post_subject'])."

\n"; //Date $output .= "

"; $output .= " by " . $row['username'] . " on " . date("M d, Y - g:ia", $row['post_time']); $output .= "

"; //Main portion $output .= "
" . $message; $output .= "
"; //Footer $output .= "

"; $output .= ""; $output .= "Comments: ("; $output .= $row['topic_replies']; $output .= ")"; $output .= "

"; } // print the output print( $output ); ?>