Another thing.
There is a Problem when moving a thread and leave a link in another forum.
So here is another fix:
PHP Code:
//start get last thread title from forums
$lastposttitle = $DB_site->query("SELECT iconid,title FROM thread WHERE forumid='$forum[forumid]' AND open!='10' ORDER BY lastpost DESC");
$lastposttitle = $DB_site->fetch_array($lastposttitle);
$threadicon = $lastposttitle[iconid];
$lastposttitle = $lastposttitle[title];
$has_access=getpermissions($forum[forumid]);
if (!$has_access['canview']) {
$lastposttitle='';
}
else
{
if ($threadicon > 0) {
$icon="<img src=\"images/icons/icon$threadicon.gif\">";
}
else {
$threadicon=1;
$icon="<img src=\"images/icons/icon$threadicon.gif\">";
}
if (strlen($lastposttitle) > 20) {
$lastposttitle = substr($lastposttitle,0,18);
$lastposttitle .= "..";
}
}
//end get last thread title from forums
I also included the Thread icons, so change forumhome_lastpostby template to this:
Code:
<table cellpadding="0" cellspacing="0" border="0" width="100%" id="ltlink">
<tr align="right">
<td nowrap rowspan="2">$icon</td>
<td nowrap><smallfont><a href="showthread.php?s=$session[sessionhash]&goto=lastpost&forumid=$forum[forumid]"><b>$lastposttitle</b></a></smallfont></td>
<td nowrap rowspan="2"> <a href="showthread.php?s=$session[sessionhash]&goto=lastpost&forumid=$forum[forumid]"><img src="images/lastpost.gif" border="0" alt="Go to last post"></a></td>
</tr>
<tr align="right">
<td nowrap><smallfont>$forum[lastpostdate] <font color="#666686">$forum[lastposttime]</font><br>
von <a href="member.php?s=$session[sessionhash]&action=getinfo&find=lastposter&forumid=$forum[forumid]"><b>$forum[lastposter]</b></a></smallfont></td>
</tr>
</table>