b2evolution

Multilingual multiuser multiblog engine

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

Source for file rdf.php

Documentation is available at rdf.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.     $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\" 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.     ?></title>
  34.     <link><?php $Blog->disp'blogurl''xml' ?></link>
  35.     <description><?php $Blog->disp'shortdesc''xml' ?></description>
  36.     <dc:language><?php $Blog->disp'locale''xml' ?></dc:language>
  37.     <admin:generatorAgent rdf:resource="http://b2evolution.net/?v=<?php echo $b2_version ?>"/>
  38.     <sy:updatePeriod>hourly</sy:updatePeriod>
  39.     <sy:updateFrequency>1</sy:updateFrequency>
  40.     <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
  41.     <items>
  42.         <rdf:Seq>
  43.         <?php while$Item $MainList->get_item() ) ?>
  44.             <rdf:li rdf:resource="<?php $Item->permalink'single' ?>"/>
  45.         <?php ?>
  46.         </rdf:Seq>
  47.     </items>
  48. </channel>
  49. <?php
  50. $MainList->restart();
  51. while$Item $MainList->get_item() )
  52. ?>
  53. <item rdf:about="<?php $Item->permalink'single' ?>">
  54.     <title><?php $Item->title''''false'xml' ?></title>
  55.     <link><?php $Item->permalink'single' ?></link>
  56.     <dc:date><?php $Item->issue_date'isoZ'true ?></dc:date>
  57.     <dc:creator><?php $Item->Author->prefered_name'xml' ?></dc:creator>
  58.     <dc:subject><?php $Item->main_category'xml' ?></dc:subject>
  59.     <description><?php
  60.         $Item->url_link''' ''xml' );
  61.         $Item->content1falseT_('[...] Read more!')'''''''xml'$rss_excerpt_length );
  62.     ?></description>
  63.     <content:encoded><![CDATA[<?php
  64.         $Item->url_link'<p>''</p>' );
  65.         $Item->content()
  66.     ?>]]></content:encoded>
  67. </item>
  68. <?php ?>
  69. </rdf:RDF>
  70. <?php log_hit()// log the hit on this page ?>

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