
http://www.xoops.net.br/modules/newbb/viewtopic.php?topic_id=8043&post_id=45924#forumpost45924
Here is the code:
In the file modules/newbb/class/forum.php find the function getAllTopics.
Inside it, find this lines:
// topic_icon: priority: sticky -> digest -> regular
if ($myrow['icon'] && is_file(XOOPS_ROOT_PATH . '/images/subject/' . $myrow['icon'])) {
$topic_icon = '
. XOOPS_URL . '/images/subject/' . $myrow['icon'] . '" alt="" />';
$stick = 1;
} else {
$topic_icon = '
. XOOPS_URL . '/images/icons/no_posticon.gif" alt="" />';
$stick = 1;
}
and change them by these:
$sql1 = 'SELECT * FROM '.$this->db->prefix('bb_posts').' WHERE topic_id='.$myrow['topic_id'].' ORDER BY pid ASC LIMIT 1';
$res = $this->db->query($sql1);
$row = $this->db->fetchArray($res);
if ($row['icon'] && is_file(XOOPS_ROOT_PATH . '/images/subject/' . $row['icon'])) {
$topic_icon = '
. XOOPS_URL . '/images/subject/' . $row['icon'] . '" alt="" />';
$stick = 1;
} else {
$topic_icon = '
. XOOPS_URL . '/images/icons/no_posticon.gif" alt="" />';
$stick = 1;
}
Cheers!

