b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: xmlsrv ] [ index: xmlsrv ] [ all elements ]

Source for file atom.comments.php

Documentation is available at atom.comments.php

  1. <?php
  2.     /**
  3.      * This template generates an Atom feed for the requested blog's latest posts
  4.      *
  5.      * See {@link http://www.mnot.net/drafts/draft-nottingham-atom-format-02.html}
  6.      *
  7.      * b2evolution - {@link http://b2evolution.net/}
  8.      * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  9.      * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  10.      *
  11.      * @package xmlsrv
  12.      */
  13.     $skin '';                                // We don't want this do be displayed in a skin !
  14.     $disp 'comments';                // What we want is the latest comments
  15.     $show_statuses array()// Restrict to published comments
  16.     /**
  17.      * Initialize everything:
  18.      */
  19.     $resolve_extra_path false;    // We don't want extra path resolution on this page
  20.     require dirname(__FILE__).'/../b2evocore/_blog_main.php';
  21.     $CommentList new CommentList$blog"'comment'"$show_statuses'',    '',    'DESC',    '',    20 );
  22.     header("Content-type: application/atom+xml");
  23.     echo '<?xml version="1.0" encoding="utf-8"?'.'>';
  24. ?>
  25. <feed version="0.3" xml:lang="<?php $Blog->disp'locale''xml' ?>" xmlns="http://purl.org/atom/ns#">
  26.     <title><?php 
  27.         $Blog->disp'name''xml' );
  28.         single_cat_title' - ''xml' )
  29.         single_month_title' - ''xml' );
  30.         single_post_title' - ''xml' );
  31.         last_comments_title' - ''xml' ;
  32.     ?></title>
  33.     <link rel="alternate" type="text/html" href="<?php $Blog->disp'lastcommentsurl''xml' ?>" />
  34.     <generator url="http://b2evolution.net/" version="<?php echo $b2_version ?>">b2evolution</generator>
  35.     <modified><?php echo gmdate('Y-m-d\TH:i:s\Z')?></modified>
  36.     <?php while$Comment $CommentList->get_next() )
  37.     // Loop through comments: ?>
  38.     <entry>
  39.         <title type="text/plain" mode="xml"><?php echo format_to_outputT_('In response to:')'xml' ?> <?php $Comment->Item->title''''false'xml' ?></title>
  40.         <link rel="alternate" type="text/html" href="<?php $Comment->permalink(?>" />
  41.         <author>
  42.             <name><?php $Comment->author'''#''''#''xml' ?></name>
  43.             <?php $Comment->author_url'''<url>'"</url>\n"false ?>
  44.         </author>
  45.         <id><?php $Comment->permalink(?></id>
  46.         <issued><?php $Comment->date'isoZ'true )?></issued>
  47.         <modified><?php $Comment->date'isoZ'true )?></modified>
  48.         <content type="text/html" mode="escaped"><![CDATA[<?php $Comment->content(?>]]></content>
  49.     </entry>
  50.     <?php // End of comment loop. ?>
  51. </feed>
  52. <?php log_hit()// log the hit on this page ?>

Documentation generated on Tue, 20 May 2008 01:51:08 +0200 by phpDocumentor 1.4.2