Why, sure :)
set_include_path(get_include_path().':../forums');
@include 'config.php';
// If config.php doesn't exist, PUN shouldn't be defined
if (!defined('PUN'))
exit('config.php doesn\'t exist or is corrupt. Please run install.php to install PunBB first.');
define('PUN_DONT_UPDATE_COOKIE', 1); // This will make sure that the forum doesn't set a new cookie for the visiting user
require 'include/common.php';
$result = $db->query('SELECT id, subject FROM '.$db->prefix.'topics WHERE moved_to IS NULL ORDER BY last_post DESC LIMIT 14') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
while ($cur_topic = $db->fetch_assoc($result))
{
if ($options['censoring'] == '1')
$cur_topic['subject'] = censor_words($cur_topic['subject']);
if (strlen($cur_topic['subject']) > 30)
$cur_topic['subject'] = trim(substr($cur_topic['subject'], 0, 24)).' ...';
echo "\t\t\t\t\t\t\t".'<b>·</b> <a href="http://punbb.org/forums/viewtopic.php?id='.$cur_topic['id'].'">'.htmlspecialchars($cur_topic['subject']).'</a><br>'."\n";
}
Please note two things however:
1. You have to enter the path to your forum root directory on the line stating "set_include_path". My path there is ../forums. Edit that line and enter the path to your forum root dir relative to where the script is located. This procedure is far from perfect. It has been greatly improved in an upcoming version of PunBB.
2. If you have any admin/mod only forums, topics from those forums will also be displayed (even if the visiting user is only a guest or a regular user). I'm going to fix that, but right now, I just don't have the time. I'm off to a wedding.
"Programming is like sex: one mistake and you have to support it for the rest of your life."