OK, this seems to work!
PHP Code:
ob_start();
require_once('./includes/functions_user.php');
require_once('./includes/functions_bigthree.php');
// Get Need Reply Threads
$forums = array(4,9,10,11,12);
$allowed_forums = array();
foreach ($forums as $f)
{
$forumperms = fetch_permissions($f);
if ($forumperms & vB::$vbulletin->bf_ugp_forumpermissions['canview'])
{
$allowed_forums[] = $f;
}
}
$allowed_forum_list = implode(",",$allowed_forums);
$needreply_get = vB::$db->query_read("
SELECT * FROM ".TABLE_PREFIX."thread
WHERE visible=1 AND sticky=0 AND replycount=0 AND forumid in(" . $allowed_forum_list .") ORDER BY replycount DESC
LIMIT 5");
$output_bits = '';
while($needreply = vB::$db->fetch_array($needreply_get))
{
$output_bits .= '<a target="_self" href="showthread.php?t='.$needreply[threadid].'">'.$needreply[title].'</a><br />';
}
$output = $output_bits;
ob_end_clean();
It seems a bit clumsy though... If anyone has a cleaner solution, I'd be glad to see it!