sorry,
das war für die newskomments zum anzeigen des Avatar des Kommentarschreibers.
Also hier nochmal richtig,nochmal sorry, es liegt an der abfrage der News.
$tpl = new tpl ( 'news.htm' );
$abf = "SELECT
a.news_title as title,
a.news_id as id,
user_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
b.avatar
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 ".$anfang.",".$limit;
#echo '<pre>'.$abf.'</pre>';
$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['UID'] = $row['user_id'];
$row['AVATA'] = '<img src="'.$row['avatar'].'" border="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['text'] = bbcode($row['text']);
$tpl->set_ar_out($row,0);
}
$tpl->set_out('SITELINK', $MPL,1);
unset($tpl);
}
so das sollte helfen
samo
Zuletzt modifiziert von samo am 14.05.2006 - 14:47:26
Ain't no use running, fool! I know where your mama parks your house