Quote:OK, I changed temlate... now it looks better. One thing - I need to show next to the post the forum where it is
There are two ways you can do this. Longer way In the function recentthread_list_threads, globalize the variable $cache. Somewhere in the while($thread = $db->fetch_array($query)) You'll need to add this code:
if(!is_array($forums))
{
$forums = $cache->read("forums");
}
$thread['forum'] = $forums[$thread['fid']]['name'];
The second method is to alter the query itself. Change the query to
SELECT t.*, u.username AS userusername, u.usergroup, u.displaygroup, u.avatar as threadavatar, u.avatardimensions as threaddimensions, lp.usergroup AS lastusergroup, lp.avatar as lastavatar, lp.avatardimensions as lastdimensions, lp.displaygroup as lastdisplaygroup, f.name as forum
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."forums f ON (t.fid=f.fid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
LEFT JOIN ".TABLE_PREFIX."users lp ON (t.lastposteruid=lp.uid)
WHERE 1=1 $where AND t.visible > {$approved} {$unsearchableforumssql} {$ignoreforums}
ORDER BY t.lastpost DESC
LIMIT $threadlimit
In your templates you will then use {$thread['forum']} to output the name of the forum the thread is in. I can add this feature in the next release and get rid of the views column.