
Grazie ancora funziona alla stragrande xd.
Codice: Seleziona tutto
// Lista degli ultimi Topics - by Micogian
$sql = "SELECT topic_id, forum_id, topic_title, topic_time, topic_type, topic_moved_id, topic_first_poster_name, topic_last_post_id, topic_last_poster_name
FROM " . TOPICS_TABLE . "
WHERE forum_id IN(66,63)
AND topic_type = 0
AND topic_moved_id = 0
ORDER BY topic_time DESC LIMIT 0,10";
$result = $db->sql_query($sql);
$n = 0;
while ($row = $db->sql_fetchrow($result))
{
if (strlen($row['topic_title'] > '28'))
{
$topic_title = substr($row['topic_title'],0,27) . "..";
}else{
$topic_title = $row['topic_title'];
}
$template->assign_block_vars('lista_topics', array(
'TOPIC_LINK' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row['forum_id'] . "&t=" . $row['topic_id']),
'POST_LINK' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=" . $row['topic_id'] . "&p=" . $row['topic_last_post_id'] . "#p" . $row['topic_last_post_id'] ),
'TOPIC_TITLE' => $topic_title ,
'FIRST_POSTER' => $row['topic_first_poster_name'],
'LAST_POSTER' => $row['topic_last_poster_name'],
));
$n = ++$n ;
}
Esatto Mico.Questo Intendo.Se invece vuoi due liste diverse, una per forum
Codice: Seleziona tutto
title="{lista_topic1.LAST_POSTER}
Visitano il forum: Nessuno e 64 ospiti