[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This template generates an RSS 1.0 (RDF) 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://web.resource.org/rss/1.0/} 9 * 10 * @package evoskins 11 * @subpackage rdf 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 <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/"> 34 <channel rdf:about="<?php $Blog->disp( 'url', 'xmlattr' ) ?>"> 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 <dc:language><?php $Blog->disp( 'locale', 'xml' ) ?></dc:language> 51 <admin:generatorAgent rdf:resource="http://b2evolution.net/?v=<?php echo $app_version ?>"/> 52 <sy:updatePeriod>hourly</sy:updatePeriod> 53 <sy:updateFrequency>1</sy:updateFrequency> 54 <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase> 55 <items> 56 <rdf:Seq> 57 <?php while( $Comment = & $CommentList->get_next() ) 58 { // Loop through comments: 59 ?> 60 <rdf:li rdf:resource="<?php $Comment->permanent_url() ?>"/> 61 <?php 62 } ?> 63 </rdf:Seq> 64 </items> 65 </channel> 66 <?php 67 $CommentList->restart(); 68 while( $Comment = & $CommentList->get_next() ) 69 { // Loop through comments: 70 // Load comment's Item: 71 $Comment->get_Item(); 72 ?> 73 <item rdf:about="<?php $Comment->permanent_url() ?>"> 74 <title><?php echo format_to_output( T_('In response to:'), 'xml' ) ?> <?php $Comment->Item->title( array( 75 'format' => 'xml', 76 'link_type' => 'none', 77 ) ); ?></title> 78 <link><?php $Comment->permanent_url() ?></link> 79 <dc:date><?php $Comment->date( 'isoZ', true ); ?></dc:date> 80 <dc:creator><?php $Comment->author( '', '#', '', '#', 'xml' ) ?></dc:creator> 81 <description><?php echo make_rel_links_abs( $Comment->get_content('entityencoded') ); ?></description> 82 <content:encoded><![CDATA[<?php echo make_rel_links_abs( $Comment->get_content() ); ?>]]></content:encoded> 83 </item> 84 <?php } // End of comment loop. ?> 85 </rdf:RDF> 86 <?php 87 $Hit->log(); // log the hit on this page 88 89 // This is a self contained XML document, make sure there is no additional output: 90 exit(); 91 ?>
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 |
![]() |