b2evolution

Multilingual multiuser multiblog engine

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

Source for file rdf.comments.php

Documentation is available at rdf.comments.php

  1. <?php
  2.     /**
  3.      * This template generates an RSS 1.0 (RDF) feed for the requested blog's latest posts
  4.      *
  5.      * See {@link http://web.resource.org/rss/1.0/}
  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\" encoding=\"UTF-8\"?".">";
  24. ?>
  25. <!-- generator="b2evolution/<?php echo $b2_version ?>" -->
  26. <rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"                    xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  27. <channel rdf:about="<?php $Blog->disp'blogurl''xmlattr' ?>">
  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.     <dc:language><?php $Blog->disp'locale''xml' ?></dc:language>
  38.     <admin:generatorAgent rdf:resource="http://b2evolution.net/?v=<?php echo $b2_version ?>"/>
  39.     <sy:updatePeriod>hourly</sy:updatePeriod>
  40.     <sy:updateFrequency>1</sy:updateFrequency>
  41.     <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
  42.     <items>
  43.         <rdf:Seq>
  44.         <?php while$Comment $CommentList->get_next() )
  45.         // Loop through comments: ?>
  46.             <rdf:li rdf:resource="<?php $Comment->permalink(?>"/>
  47.         <?php // End of comment loop. ?>
  48.         </rdf:Seq>
  49.     </items>
  50. </channel>
  51. <?php $CommentList->restart();
  52. while$Comment $CommentList->get_next() )
  53. // Loop through comments: ?>
  54. <item rdf:about="<?php $Comment->permalink(?>">
  55.     <title><?php echo format_to_outputT_('In response to:')'xml' ?> <?php $Comment->Item->title''''false'xml' ?></title>
  56.     <link><?php $Comment->permalink(?></link>
  57.     <dc:date><?php $Comment->date'isoZ'true )?></dc:date>
  58.     <dc:creator><?php $Comment->author'''#''''#''xml' ?></dc:creator>
  59.     <description><?php $Comment->content'xml' ?></description>
  60.     <content:encoded><![CDATA[<?php $Comment->content(?>]]></content:encoded>
  61. </item>
  62. <?php // End of comment loop. ?>
  63. </rdf:RDF>
  64. <?php log_hit()// log the hit on this page ?>

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