Code: Alles auswählen
<?php
// ############ Edit below ########################################
$topic_length = '20'; // length of topic title
$topic_limit = '10'; // limit of displayed topics
$special_forums = '1'; // specify forums ('0' = no; '1' = yes)
$forum_ids = '74'; // IDs of forums; separate them with a comma
// ############ Edit above #######################################
// ############## output ##############
$domain_top = '<h2>Domain Verkauf</h2><ul>';
// ############## output ##############
$where_forums = ( $special_forums == '0' ) ? '' : ' AND forum_id IN ('. $forum_ids .') ';
$sql = 'SELECT topic_title, forum_id, topic_id
FROM ' . TOPICS_TABLE . '
WHERE topic_status <> ' . ITEM_MOVED . '
AND topic_approved = 1
AND topic_type = ' . POST_NORMAL . '
AND topic_moved_id = 0
' . $where_forums . '
ORDER BY topic_time DESC';
$result = $db->sql_query_limit($sql, $topic_limit);
if( !$result )
{
die('SQL Statement Error: '. mysql_error());
exit();
}
$line = array();
while($row = $db->sql_fetchrow($result))
{
$line[] = $row;
}
for( $i = 0; $i < count($line); $i++ )
{
$forum_id = $line[$i]['forum_id'];
$forum_url = $root_path .'viewforum.php?f='. $forum_id;
$topic_id = $line[$i]['topic_id'];
$topic_url = $root_path .'viewtopic.php?t='. $topic_id;
$topic_title = ( strlen($line[$i]['topic_title']) < $topic_length ) ? $line[$i]['topic_title'] : substr(stripslashes($line[$i]['topic_title']), 0, $topic_length) .'...';
// ############## output ##############
$domain_top = $domain_top .'<li><a href="'. $topic_url .'">'. $topic_title .'</a></li>';
// ############## output ##############
}
$db->sql_freeresult($result);
$domain_top = $domain_top .'</ul>';
$template->assign_vars(array(
'DOMAIN_VERKAUF' => $domain_top)
);
?>

EDIT: Wenn Du mehrere von diesen Blöcken anzeigen willst, könnt man das Ganze noch in eine eigene Funktion packen und dies einfach für jeden darzustellenden Block aufrufen.
FatFreddy