So hab die topnews.php mal an H angepasst bzw auch ausgemistet:
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: News';
$hmenu = 'News<br /><br />';
$design = new design ( $title , $hmenu );
$design->header();
function news_find_kat ($kat) {
$katpfad = 'include/images/news/';
$katjpg = $katpfad.$kat.'.jpg';
$katgif = $katpfad.$kat.'.gif';
$katpng = $katpfad.$kat.'.jpg';
if ( file_exists( $katjpg ) ) {
$pfadzumBild = $katjpg;
} elseif ( file_exists ( $katgif ) ) {
$pfadzumBild = $katgif;
} elseif ( file_exists ( $katpng ) ) {
$pfadzumBild = $katpng;
}
if ( !empty( $pfadzumBild ) ) {
$kategorie = '<img style="" src="'.$pfadzumBild.'" alt="'.$kat.'">';
} else {
$kategorie = '<b>'.$kat.'</b><br /><br />';
}
return ( $kategorie );
}
$limit = $allgAr['Nlimit'];
$MPL = db_make_sites ($page , "WHERE news_recht >= ".$_SESSION['authright'] , $limit , '?news' , 'news' );
//Topnews ausgeben
@readfile('include/contents/selfbp/selfp/spTOPnews.php');
echo '<br />';
$tpl = new tpl ( 'news.htm' );
$abf = "SELECT
a.news_title as title,
a.news_id as id,
DATE_FORMAT(a.news_time,'%d. %m. %Y') as datum,
DATE_FORMAT(a.news_time,'%W') as dayofweek,
a.news_kat as kate,
a.news_text as text,
b.name as username
FROM prefix_news as a
LEFT JOIN prefix_user as b ON a.user_id = b.id
WHERE ".$_SESSION['authright']." <= a.news_recht
OR a.news_recht = 0
ORDER BY news_time DESC
LIMIT ".$limit;
$erg = db_query($abf);
while ($row = db_fetch_assoc($erg)) {
$k0m = db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = ".$row['id']." AND cat = 'NEWS'");
$row['kom'] = db_result($k0m,0);
$row['kate'] = news_find_kat($row['kate']);
$row['datum'] = $lang[$row['dayofweek']].' '.$row['datum'];
if ( strpos ( $row['text'] , '[PREVIEWENDE]' ) !== FALSE ) {
$a = explode('[PREVIEWENDE]' , $row['text']);
$row['text'] = $a[0];
$row['readwholenews'] = '» <a href="index.php?news-'.$row['id'].'">'.$lang['readwholenews'].'</a> «';
} else {
$row['readwholenews'] = '';
}
$row['text'] = bbcode($row['text']);
$tpl->set_ar_out($row,0);
}
$tpl->set_out('SITELINK', $MPL,1);
unset($tpl);
$design->footer();
?>
Damit braucht man auch kein Template (also es wird das von der News benutzt).