Great Work, thank you!
To get the prefix to be shown to the recent thread add:
PHP Code:
$recent_thread[prefix_rich] = $vbphrase["prefix_$recent_thread[prefixid]_title_rich"];
$toutput .=''.$recent_thread[prefix_rich].' ';
Widget new:
PHP Code:
ob_start();
global $vbulletin, $db, $vbphrase;
//Begin Thread Counts
$toutput='';
$recent_threads = $vbulletin->db->query_read("
SELECT thread.threadid, thread.prefixid, thread.title, thread.dateline, thread.lastpost, thread.lastposter, thread.lastposterid, thread.visible, thread.open, thread.postusername, thread.postuserid, thread.replycount, thread.views, forum.forumid, forum.title as forumtitle
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON ( forum.forumid = thread.forumid )
WHERE NOT ISNULL(threadid) AND visible = '1' AND open!='10'
ORDER BY lastpost DESC
LIMIT 0, 20
");
$i = 0;
while ($recent_thread = $db->fetch_array($recent_threads))
{
$i++;
if (!in_array($recent_thread[forumid], array(105,83,121,110,82,112,109,101,102,72))) {
if ($i & 1) {$class='alt1';} else {$class='alt2';}
$recent_thread[title] = unhtmlspecialchars($recent_thread[title]);
$recent_thread[lastpostdate] = vbdate('j. F Y', $recent_thread[lastpost], 1);
$recent_thread[lastposttime] = vbdate($vbulletin->options['timeformat'], $recent_thread[lastpost]);
$recent_thread[prefix_rich] = $vbphrase["prefix_$recent_thread[prefixid]_title_rich"];
$toutput .='<tr><td class="'.$class.'" align="left"><font size="2" face="verdana,arial"><a href="forumdisplay.php?f='.$recent_thread[forumid].'">'.$recent_thread[forumtitle].'</a></font><br/>';
if('.$recent_thread[prefixid].' <> '')
$toutput .=''.$recent_thread[prefix_rich].' ';
$toutput .='<b><font color="#98B5E2" size="2" face="verdana,arial"><a href="showthread.php?t='. $recent_thread[threadid].'">'. $recent_thread[title].'</a></font></b><br/>';
$toutput .='<font size="1" face="verdana,arial">letzter Eintrag von: <a href="member.php?u='.$recent_thread[lastposterid].'">'.$recent_thread[lastposter].'</a></font><br/>';
$toutput .='<font size="1" face="verdana,arial">am <strong>'.$recent_thread[lastpostdate].'</strong> um <strong>'. $recent_thread[lastposttime].'</strong> Uhr</font><hr/></td></tr>';
}
}
//End Thread Counts
//Sidebar - Begin Forum Threads
$sb_threads = '
<table class="tborder" cellpadding="'.$stylevar[cellpadding].'" cellspacing="'.$stylevar[cellspacing].'" border="0" width="100%" align="center"> <thead> <tr> <td class="tcat"></td> </tr> </thead> <tbody> <div class="smallfont"> <tr> <td>
'.$toutput.'
</td> </tr> </div> </tbody> </table>
';
//Sidebar - End Forum Threads
echo $sb_threads;
$db->free_result($recent_threads);
$output=ob_get_contents();
ob_end_clean();