Tendrías que hacer lo siguiente:
1- Obtener los últimos 4 temas:
Código PHP:
$query = "SELECT id,forum_id,topic_title FROM usebb_topics ORDER BY id DESC LIMIT 0,4";
$temas = mysql_query($query) or die(mysql_error());
2- Generar la lista de temas en base al formato html :
Código PHP:
$lista = '';
while($r = mysql_fetch_array($temas)) {
$title = $r['topic_title'];
$id = $r['id'];
$lista .= "
<p><span class='sidelinks'>
<strong>
<a href='./community/topic.php?post=$id'>$title</a>
</strong></span>
<br/>
</p>";
}
3. Mostrar los temas:
Código PHP:
echo "
<td width='191' valign='top' background='./images/pixi_greyblue.gif' class='sidetable'>
<table width='100%' border='0' cellspacing='0' cellpadding='10'>
<tr>
<td><h3 class='sidetable2'>Ultimos Temas</h3>
$lista
</td>
</tr>
<tr>
<td><h3 class='sidetable2'>Ultimo Miembro</h3>
<div class='sidelinks'>
<a href='./community/profile.php?id=$userid'>$username</a></span>
</td>
</tr>
</table></td>
Prueba y luego nos comentas