link['news']; $description = "RSS News Feed"; if($_GET['sct']) $sections = $NEWS->get_section_by_name($_GET['sct']); else $sections = $NEWS->get_section_by_name($global['news']['default_section']); // Add section names if(is_array($sections) && count($sections['parts'])) { $tmp = array(); $subdesc = array(); foreach($sections['parts'] AS $tmps) { $tmp[] = $tmps['short']; if(trim($tmps['intro'])) $subdesc[] = $tmps['name'].": ".$tmps['intro']; } $title .= " (".implode(", ",$tmp).")"; $url = sprintf($NEWS->link['section'],$sections['ok']); if($subdesc) $description .= " - ".implode(" - ",$subdesc); } // function channel_add($title,$link,$description="") { $CHANNEL =& $RSS->channel_add($title,$url,$description); // ######################################################################## // # add news postings to rss feed # // ######################################################################## $news_array = $NEWS->load_news($sct); $shown = 0; if(is_array($news_array['news'])) foreach($news_array['news'] AS $data) { if($data['date_unix'] < time() && $shown < $global['news']['max_news_rss']) { $title = $data['headline']; $link = sprintf($NEWS->link['comments'],intval($data['id'])); $description = trim(str_replace("\n","",str_replace("\r","",str_replace("\t","",$data['htmlshort'])))); $pubDate = $data['date_unix']; $category = ($data['section_id']) ? $data['section_name'] : FALSE; $author = ($data['user_id']) ? $data['vorname']." ".$data['nachname'] : FALSE; // function item_add($title,$link,$description=FALSE,$pubDate=FALSE,$category=FALSE) $CHANNEL->item_add($title,$link,$description,$pubDate,$category); $shown++; } } // ######################################################################## // # start output off rss feed # // ######################################################################## $RSS->render(); ?>