<?php
$query = $db->query("
SELECT t.*, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
WHERE 1=1 $unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
ORDER BY t.lastpost DESC
LIMIT 0, ".$mybb->settings['portal_showdiscussionsnum']
);
<?php
$query = $db->query("
SELECT t.*, u.username, i.path
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
LEFT JOIN ".TABLE_PREFIX."icons i ON (t.icon=i.iid)
WHERE 1=1 $unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
ORDER BY t.lastpost DESC
LIMIT 0, ".$mybb->settings['portal_showdiscussionsnum']
);
<?php
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
<?php
$thread['icon_thread'] = $thread['path'];
<?php
<tr>
<td class="{$altbg}">
<img src="{$thread['icon_thread']}">
<strong><a href="{$mybb->settings['bburl']}/{$thread['threadlink']}">{$thread['subject']}</a></strong>
<span class="smalltext"><br />
<a href="{$thread['lastpostlink']}">{$lang->latest_threads_lastpost}</a> {$lastposterlink}<br />
{$lastpostdate} {$lastposttime}<br />
<strong>» </strong>{$lang->latest_threads_replies} {$thread['replies']}<br />
<strong>» </strong>{$lang->latest_threads_views} {$thread['views']}
</span>
</td>
</tr>
<?php
$thread['icon_thread'] = $thread['path'];
<?php
$thread['icon_thread'] = htmlspecialchars_uni($thread['path']);