b2evolution

Multilingual multiuser multiblog engine

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

Source for file rss2.comments.php

Documentation is available at rss2.comments.php

  1. <?php
  2.     /**
  3.      * This template generates an RSS 2.0 feed for the requested blog's latest comments
  4.      *
  5.      * See {@link http://backend.userland.com/rss}
  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/xml");
  23.     echo "<?xml version=\"1.0\"?".">";
  24. ?>
  25. <!-- generator="b2evolution/<?php echo $b2_version ?>" -->
  26. <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  27.     <channel>
  28.         <title><?php 
  29.             $Blog->disp'name''xml' );
  30.             single_cat_title' - ''xml' )
  31.             single_month_title' - ''xml' );
  32.             single_post_title' - ''xml' );
  33.             last_comments_title' - ''xml' ;
  34.         ?></title>
  35.         <link><?php $Blog->disp'lastcommentsurl''xml' ?></link>
  36.         <description></description>
  37.         <language><?php $Blog->disp'locale''xml' ?></language>
  38.         <docs>http://backend.userland.com/rss</docs>
  39.         <admin:generatorAgent rdf:resource="http://b2evolution.net/?v=<?php echo $b2_version ?>"/>
  40.         <ttl>60</ttl>
  41.         <?php while$Comment $CommentList->get_next() )
  42.         // Loop through comments: ?>
  43.         <item>
  44.             <title><?php echo format_to_outputT_('In response to:')'xml' ?> <?php $Comment->Item->title''''false'xml' ?></title>
  45.             <pubDate><?php $Comment->time'r'true )?></pubDate>
  46.             <guid isPermaLink="false">c<?php $Comment->ID(?>@<?php echo $baseurl ?></guid>
  47.             <description><?php $Comment->content'xml' ?></description>
  48.             <content:encoded><![CDATA[<?php $Comment->content(?>]]></content:encoded>
  49.             <link><?php $Comment->permalink(?></link>
  50.         </item>
  51.         <?php // End of comment loop. ?>
  52.     </channel>
  53. </rss>
  54. <?php log_hit()// log the hit on this page ?>

Documentation generated on Tue, 20 May 2008 01:52:00 +0200 by phpDocumentor 1.4.2