Topic: BBCode Outside of Forums

I am using the punbb version downloaded from here and I have neutral's modern bbcode loaded. I also use the following sscript to pull posts from a topic called "news" and have it displayed on the front page of my site:


Punbb News Script
Written by: Jesse Spillane (

$news_forum_id = 6;
$news_forum_id2 = 7;
$limit = 7;
$forum_path = './forums/';

define('PUN_ROOT', $forum_path);

define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);

require PUN_ROOT.'include/parser.php';
$result = $db->query('select id, subject, num_replies, posted from '.$db->prefix.'topics WHERE forum_id='.$news_forum_id.' OR forum_id='.$news_forum_id2.' ORDER BY -posted LIMIT '.$limit.';')or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
while ($row = $db->fetch_assoc($result))
    $id = $row['id'];
    $subject = $row['subject'];
    $num_replies = $row['num_replies'];
    $posted = date("F j, Y, g:i a", $row['posted']);

    $result2 = $db->query('select message, poster from '.$db->prefix.'posts WHERE topic_id='.$id.' ORDER BY id LIMIT 1 ')or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
    $post = $db->fetch_assoc($result2);
    $message = parse_message($post['message'], 1);
    $poster = $post['poster'];

  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" class="main_content" height="75">
      <td width="100%" background="images/navbar_gradiant.png" height="19" colspan="2">
      <p style="text-indent: 3; margin: 2 3"><b><?php echo '<a href='.$forum_path.'viewtopic.php?id='.$id.'">
      <font face="Verdana" size="2" color="#FF0000">'.$subject.'</a>'; ?></font></b></td>
      <td width="100%" height="37" background="images/main_cont_gradiant.png" colspan="2" valign="top">
      <div align="center">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="99%">
            <td width="100%">
            <p style="margin-top: 4; margin-bottom: 4">
            <font face="Verdana" size="2"><?php echo $message;?></font></td>
      <td width="82%" height="19" background="images/navbar_gradiant.png">
      <p style="margin: 2 3">&nbsp;</td>
      <td width="18%" height="19" background="images/navbar_gradiant.png">
      <p align="right" style="margin: 2 3"><i>
      <font face="Verdana" size="2" color="#FF0000"><?php
    echo '<a style="text-decoration: none" href='.$forum_path.'viewtopic.php?id='.$id.'">
   '.$num_replies.' Comment(s)</a>';




But the problem is any BBcode I use in thread as far as text size or centering doesnt transfer to the topic posted outside the forums on the main page of my site. Does anyone know how I can fix this?

Thanks smile