// Genererer liste over 10 sist aktive emner
$siste_aktive = '';
$sql = 'SELECT
topic_id,
topic_title
FROM
' . TOPICS_TABLE . "
ORDER BY
topic_last_post_time DESC
LIMIT
0, 10";
$result = $db->sql_query($sql);
$siste_aktive ='<ul>';
while ($row = $db->sql_fetchrow($result))
{
// Avkorting hentet fra /modules/phpbb/phpbb_block_recent_topics.inc.php
if (strlen($row['topic_title']) > 26)
{
//Chop the end off at the last space before the specified length
$pos = strrpos($row['topic_title'], " ", -(strlen($row['topic_title']) - 26));
$descstr = substr($row['topic_title'],0,$pos) . " ...";
}
else
{
$descstr = $row['topic_title'];
}
$siste_aktive .= '<li><a href="/forum/viewtopic.php?t=' . $row[topic_id] . '" title="' . $row['topic_title'] . '">' . $descstr . '</a></li>';
}
$siste_aktive .= '</ul>';
$db->sql_freeresult($result);
'SISTE_AKTIVE' => $siste_aktive,
Registrerte brukere: Google [Bot]