Nose si esta 100% bien porque no puedo probarlo ahora mismo pero seria algo así:
<?php
include ('funciones.php');
$config['host'] = '...';
$config['user'] = '...';
$config['pass'] = '...';
$config['db'] = '...';
// here is the start html, <html><body> for example
$start = '<html><head><title>News Flash</title></head><body bgcolor="#ffffff">';
// here is the end html that is put to document
$end = '</body></html>';
// news template
$tpl= '<font color ="#FFFBF0" size="1" Font="Verdana"><font face="Verdana">
<!--//%t=Date-->
<!--//%s=Title or Subject-->
<!--//%n=News-->
<!--//%a=User or Posted by-->
<b>%t - %s</b><br>
<br>
%n
<br>
<br>
<b>Por %a</b>
<br>
<HR size="1" align="right" width="100%" color="7D889A">
<br>
</font> ';
echo $start;
mysql_connect($config['host'], $config['user'], $config['pass']) or die('Connection failed');
mysql_select_db($config['db']) or die('DB selection failed');
$maximo = 10; //Numero máximo de noticias
while($result = mysql_fetch_array(mysql_query("SELECT * FROM wootnews ORDER BY id DESC LIMIT $maximo")))
{
echo str_replace(Array('%t', '%a', '%n', '%s'), Array($result['date'], $result['name'], bbcode($result['message']), $result['subject']), $tpl);
$max = $result['id'];
}
echo bbcode ($end);
?>