b2evolution

Multilingual multiuser multiblog engine

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

Source for file rss2.php

Documentation is available at rss2.php

  1. <?php
  2.     /**
  3.      * This template generates an RSS 2.0 feed for the requested blog
  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.     $show_statuses array();            // Restrict to published posts
  15.     $timestamp_min '';                    // Show past
  16.     $timestamp_max 'now';                // Hide future
  17.     /**
  18.      * Initialize everything:
  19.      */
  20.     $resolve_extra_path false;    // We don't want extra path resolution on this page
  21.     require dirname(__FILE__).'/../b2evocore/_blog_main.php' ;
  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.         ?></title>
  34.         <link><?php $Blog->disp'blogurl''xml' ?></link>
  35.         <description><?php $Blog->disp'shortdesc''xml' ?></description>
  36.         <language><?php $Blog->disp'locale''xml' ?></language>
  37.         <docs>http://backend.userland.com/rss</docs>
  38.         <admin:generatorAgent rdf:resource="http://b2evolution.net/?v=<?php echo $b2_version ?>"/>
  39.         <ttl>60</ttl>
  40.         <?php while$Item $MainList->get_item() ) {    ?>
  41.         <item>
  42.             <title><?php $Item->title''''false'xml' ?></title>
  43.             <link><?php $Item->permalink'single' ?></link>
  44.             <pubDate><?php $Item->issue_date'r'true ?></pubDate>
  45.             <?php // Disabled because of spambots: <author><php the_author_email( 'xml' ) ></author>?>
  46.             <?php $Item->categoriesfalse'<category domain="main">''</category>''<category domain="alt">''</category>''<category domain="external">''</category>'"\n"'xml' ?>
  47.             <guid isPermaLink="false"><?php the_ID(?>@<?php echo $baseurl ?></guid>
  48.             <description><?php
  49.                 $Item->url_link''' ''xml' );
  50.                 $Item->content1falseT_('[...] Read more!')'''''''xml'$rss_excerpt_length );
  51.             ?></description>
  52.             <content:encoded><![CDATA[<?php
  53.                 $Item->url_link'<p>''</p>' );
  54.                 $Item->content()
  55.             ?>]]></content:encoded>
  56.             <comments><?php comments_link''1?></comments>
  57.         </item>
  58.         <?php ?>
  59.     </channel>
  60. </rss>
  61. <?php log_hit()// log the hit on this page ?>

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