Your-pMF
     registrieren     benutzer     suche     team     kalender     hilfe     index    
Chat     downloads     link us     gästebuch     supportforum    
 

Newshack FRage...

original Thema anzeigen

04.01.05, 12:40:33

Andreas

Hiho ,hab da ein kleines problem mit meinem Newshack, ich wollte gerne auch die attachments in den News ausgeben aber leider klappt das nicht so ganz... kann mir mal einer sagen was an dem script hier schief geht? die attachments versuchte ich dann per $attachment wie in der tpl_topic auszugeben... hier der code der news.php [PHP] query('SELECT (t.`id`) AS `tid`, (t.`name`) AS `tname`, t.`board_id`, t.`posts`, t.`post_date`, t.`user_id`, (p.`id`) AS `pid`, p.`text`, p.`topic_id`, (u.`id`) AS `uid`, (u.`name`) AS `uname` FROM `'.$_cfg['DB_PREFIX'].'topic` AS t, `'.$_cfg['DB_PREFIX'].'post` AS p, `'.$_cfg['DB_PREFIX'].'user` AS u WHERE t.`board_id` = 13 AND p.`topic_id` = t.`id` AND u.`id` = t.`user_id` ORDER BY t.`id` DESC LIMIT 1'); $daten = $_db->fetch_array($result); $news = array(); $news[name] = $daten[uname]; $news[uid] = $daten[uid]; $news[text] = $_bbcode->parse($daten[text]); $news[date] = date('d.m.Y',$daten[post_date]); $news[topic] = $daten[tname]; $news[tid] = $daten[tid]; $news[posts] = $daten[posts]; $news[pid] = $daten[pid]; # # ### Attachments Abfragen $attachments = array(); if (!empty($forum['attachments'])) { $result = $_db->query('SELECT * FROM `'.$_cfg['DB_PREFIX'].'attachment` WHERE `post_id` IN ('.implode(',', array_keys($news['pid'])).')'); while ($Daten = $_db->fetch_array($result)) { $attachments[$Daten['post_id']][$Daten['id']] = $Daten; } } ### Attachment ausgeben if (!empty($attachments[$Daten['id']])) { $attachment = attachment($attachments[$Daten['id']]); } else { $attachment = ''; } eval ('echo "'.$_style->get('news').'";'); footer(); ?> [/PHP] schonmal danke für antworten...
 
Powered by: phpMyForum 4.2.1 © Christoph Roeder
SQL Error