Login   Register  
PHP Classes
elePHPant
Icontem

File: bt-rss.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.php  >  Download  
File: bt-rss.php
Role: Application script
Content type: text/plain
Description: Posts RSS File
Class: Bluetrait
A multi-user blog system
Author: By
Last change:
Date: 2008-10-26 15:39
Size: 1,592 bytes
 

Contents

Class file image Download
<?php
    $bt_content_type 
'rss';
    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 //this will need to be updated so that it takes into account edits ?>
        <lastBuildDate><?php echo date('D, d M Y H:i:s'strtotime(bt_posts_date())) . ' ' bt_get_config('time_zone') . '00'?></lastBuildDate>
        <?php
        
if (bt_get_config('rss')) {
            foreach (
$bt_post_array as $bt_post) {
            
?>
                <item>
                    <title><?php echo bt_post_title(); ?></title>
                    <link><?php echo bt_post_permalink() ;?></link>
                    <comments><?php echo bt_post_permalink() . '#comments' ;?></comments>
                    <pubDate><?php echo date('D, d M Y H:i:s'strtotime(bt_post_date())) . ' ' bt_get_config('time_zone') . '00'?></pubDate>
                    <dc:creator><?php echo bt_post_author(); ?></dc:creator>
                    <description><![CDATA[<?php echo bt_post_body(); ?>]]></description>
                </item>
            <?php
            
}
        }
        else {
            
?>
            <item>
                <title>RSS Feed Disabled</title>
            </item>
            <?php
        

        
?>
    </channel>
</rss>