error()) { exit; } # Création de l'objet de type weblog avec uniquement les billets # publiés $blog = new xblog($con,DB_PREFIX,1,dc_encoding); $blog->rs_blogpost = 'xblogpost'; $blog->rs_blogcomment = 'xblogcomment'; $blog->setURL('post','http://'.$_SERVER['HTTP_HOST'].dc_blog_url.dc_format_post_url); # Si type = co on fait un fil des commentaires if ($type == 'co') { if (!empty($_GET['post'])) { $comments = $blog->getComments($_GET['post'],'DESC'); } else { $comments = $blog->getComments('','DESC',20); } $title = dc_blog_name.' - Commentaires'; $ts = time(); $items = $seq = ''; if (!$comments->isEmpty()) { $ts = $comments->getTS(); while(!$comments->EOF()) { $seq .= $comments->getRSSSeq(); $items .= $comments->getRSSItem(dc_short_feeds); $comments->moveNext(); } } } else { # Dernières nouvelles // echo "
cat = $cat, news = " ; $news = $blog->getLastNews(10,$cat,'post_dt DESC',false,$lang); // print_r ($news) ; echo "" ; $ts = strtotime($blog->getEarlierDate()); $title = dc_blog_name; $items = $seq = ''; while(!$news->EOF()) { $items .= $news->getRSSItem(dc_short_feeds); $seq .= $news->getRSSSeq(); $news->moveNext(); } } # Fermeture de connexion $con->close(); # Cache HTTP if (dc_http_cache && defined('DC_UPDATE_FILE_W') && DC_UPDATE_FILE_W) { $mod_files = get_included_files(); $mod_files[] = DC_UPDATE_FILE; $mod_files[] = dirname(__FILE__).'/conf/dotclear.ini'; cache::http($mod_files); } header('Content-Type: text/xml; charset='.dc_encoding); echo ''."\n"; ?>