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 = ''; } else { # Dernières nouvelles $news = $blog->getLastNews(10,$cat,'post_dt DESC',false,$lang); $ts = strtotime($blog->getEarlierDate()); $title = dc_blog_name; } # 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"; /* echo ''."\n"; //*/ ?> <?php echo $blog->toXML($title); ?> DotClear daily 1 EOF()) { echo $comments->getAtomEntry(dc_short_feeds); $comments->moveNext(); } } else { while(!$news->EOF()) { echo $news->getAtomEntry(dc_short_feeds); $news->moveNext(); } } $con->close(); ?>