Subversion Repositories taios

Rev

Rev 410 | Rev 412 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

require '../_taios.php';

$page = new Taios_Page('Blog RSS Feed', '../');

write('<?xml version="1.0" encoding="UTF-8" ?>');
write('<rss version="2.0">');
write('<channel>');
write('<title>Tim32 Blog RSS</title>');
write('<description>This is the RSS feed for the Tim32 Blog.</description>');
write('<link>http://tim32.org/blog/</link>');
 
$ids = $page->findIDs('BlogPosts', 'ORDER BY DatePosted DESC');
for ($i = 0; $i < count($ids); $i++)
{
    $id = $ids[$i];
    $post = $page->getBlogPost($id);
   
    write('<item>');
    write('<title>' . $post->title . '</title>');
    write('<link>http://tim32.org/blog/post.php?id=' . $id . '</link>');
    write('<guid>' . $id . '</guid>');
    write('<pubDate>' . date('D, d M Y H:i:s O', $post->datePosted). '</pubDate>');
    write('</item>');
   
    write('<a href="post.php?id=' . $id . '"><h3>' . $post->title. '</h3></a>');
    write('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . $post->user->name . ' (' . $post->user->username . ')</h5>');
    write('<p>' . $page->replaceBBCode($post->content) . '</p>');
    write('<br />');
}

write('</channel>');
write('</rss>');

?>