Login   Register  
PHP Classes
elePHPant
Icontem

File: bt-rss-comments.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Michael Dale  >  Bluetrait  >  bt-rss-comments.php  >  Download  
File: bt-rss-comments.php
Role: Application script
Content type: text/plain
Description: Comments RSS File
Class: Bluetrait
A multi-user blog system
Author: By
Last change:
Date: 6 years ago
Size: 1,499 bytes
 

Contents

Class file image Download
<?php
    $bt_content_type 
'rss_comments';
    include(
'bt-header.php');
    if (
bt_is_404()) exit;
    
header('Content-type: text/xml; charset=UTF-8'true); 
?>
<rss version="2.0" 
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
>
    <channel>
        <title><?php echo bt_get_title(); ?></title>
        <link><?php echo bt_get_config('address'); ?></link>
        <description><?php echo bt_get_config('description'); ?></description>
        <copyright>Copyright <?php echo bt_get_config('installed'); ?></copyright>
        <generator><?php echo bt_get_config('address'); ?></generator>
        <?php
        
if (bt_get_config('rss')) {
            foreach (
$bt_comment_array as $bt_comment) {
            
$bt_post $bt_comment;
            
?>
                <item>
                    <title><?php echo 'Comment by 'bt_comment_display_name() . ' on ' bt_post_title(); ?></title>
                    <link><?php echo bt_post_permalink(). '#comments-' bt_comment_id(); ?></link>
                    <comments><?php echo bt_post_permalink(); ?></comments>
                    <pubDate><?php echo date('D, d M Y H:i:s'strtotime(bt_comment_date())) . ' ' bt_get_config('time_zone') . '00'?></pubDate>
                    <dc:creator><?php echo bt_comment_display_name(); ?></dc:creator>
                    <description><![CDATA[<?php echo bt_comment_body(); ?>]]></description>
                </item>
            <?php
            
}
        }
        else {
            
?>
            <item>
                <title>RSS Feed Disabled</title>
            </item>
            <?php
        

        
?>
    </channel>
</rss>