[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This template generates an RSS 0.92 feed for the requested blog's latest comments 4 * 5 * For a quick explanation of b2evo 2.0 skins, please start here: 6 * {@link http://manual.b2evolution.net/Skins_2.0} 7 * 8 * See {@link http://backend.userland.com/rss092} 9 * 10 * @package evoskins 11 * @subpackage rss 12 * 13 * @version $Id: latestcom.tpl.php,v 1.6 2007/11/03 04:56:07 fplanque Exp $ 14 */ 15 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 16 17 if( isset($Item) ) 18 { // Comments for a specific Item: 19 $CommentList = & new CommentList( $Blog, "'comment'", array('published'), $Item->ID, 20 '', 'DESC', '', $Blog->get_setting('posts_per_feed') ); 21 } 22 else 23 { // Comments for the blog: 24 $CommentList = & new CommentList( $Blog, "'comment'", array('published'), '', 25 '', 'DESC', '', $Blog->get_setting('posts_per_feed') ); 26 } 27 28 skin_content_header( 'application/xml' ); // Sets charset! 29 30 echo '<?xml version="1.0" encoding="'.$io_charset.'"?'.'>'; 31 ?> 32 <!-- generator="<?php echo $app_name; ?>/<?php echo $app_version ?>" --> 33 <rss version="0.92"> 34 <channel> 35 <title><?php 36 $Blog->disp( 'name', 'xml' ); 37 // ------------------------- TITLE FOR THE CURRENT REQUEST ------------------------- 38 request_title( array( 39 'title_before'=> ' - ', 40 'title_after' => '', 41 'title_none' => '', 42 'glue' => ' - ', 43 'title_single_disp' => true, 44 'format' => 'xml', 45 ) ); 46 // ------------------------------ END OF REQUEST TITLE ----------------------------- 47 ?></title> 48 <link><?php $Blog->disp( 'lastcommentsurl', 'xml' ) ?></link> 49 <description></description> 50 <language><?php $Blog->disp( 'locale', 'xml' ) ?></language> 51 <docs>http://backend.userland.com/rss092</docs> 52 <?php while( $Comment = & $CommentList->get_next() ) 53 { // Loop through comments: 54 // Load comment's Item: 55 $Comment->get_Item(); 56 ?> 57 <item> 58 <title><?php echo format_to_output( T_('In response to:'), 'xml' ) ?> <?php $Comment->Item->title( array( 59 'format' => 'xml', 60 'link_type' => 'none', 61 ) ); ?></title> 62 <description><?php echo make_rel_links_abs( $Comment->get_content('entityencoded') ); ?></description> 63 <link><?php $Comment->permanent_url() ?></link> 64 </item> 65 <?php } // End of comment loop. ?> 66 </channel> 67 </rss> 68 <?php 69 $Hit->log(); // log the hit on this page 70 71 // This is a self contained XML document, make sure there is no additional output: 72 exit(); 73 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |