b2evolution

Multilingual multiuser multiblog engine

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

Source for file atom.php

Documentation is available at atom.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.     $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/atom+xml");
  23.     // header("Content-type: text/xml");
  24.     echo '<?xml version="1.0" encoding="utf-8"?'.'>';
  25. ?>
  26. <feed version="0.3" xml:lang="<?php $Blog->disp'locale''xml' ?>" xmlns="http://purl.org/atom/ns#">
  27.     <title><?php 
  28.         $Blog->disp'name''xml' );
  29.         single_cat_title' - ''xml' )
  30.         single_month_title' - ''xml' );
  31.         single_post_title' - ''xml' );
  32.     ?></title>
  33.     <link rel="alternate" type="text/html" href="<?php $Blog->disp'blogurl''xml' ?>" />
  34.     <tagline><?php $Blog->disp'shortdesc''xml' ?></tagline>
  35.     <generator url="http://b2evolution.net/" version="<?php echo $b2_version ?>">b2evolution</generator>
  36.     <modified><?php $MainList->mod_date'isoZ'true ?></modified>
  37.     <?php while$Item $MainList->get_item() ) {    ?>
  38.     <entry>
  39.         <title type="text/plain" mode="xml"><?php $Item->title''''false'xml' ?></title>
  40.         <link rel="alternate" type="text/html" href="<?php $Item->permalink'single' ?>" />
  41.         <author>
  42.             <name><?php $Item->Author->prefered_name'xml' ?></name>
  43.             <?php $Item->Author->url'<url>'"</url>\n"'xml' ?>
  44.         </author>
  45.         <id><?php $Item->permalink'single' ?></id>
  46.         <issued><?php $Item->issue_date'isoZ'true ?></issued>
  47.         <modified><?php $Item->mod_date'isoZ'true ?></modified>
  48.         <content type="text/html" mode="escaped"><![CDATA[<?php
  49.             $Item->url_link'<p>''</p>' );
  50.             $Item->content()
  51.         ?>]]></content>
  52.     </entry>
  53.     <?php ?>
  54. </feed>
  55. <?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