Subversion Repositories taios

Rev

Rev 409 | Rev 411 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
409 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
5
$page = new Taios_Page('Blog RSS Feed', '../');
6
 
7
write('''<?xml version="1.0" encoding="UTF-8" ?>
8
<rss version="2.0">
9
<channel>
10
<title>Tim32 Blog RSS</title>
11
<description>This is the RSS feed for the Tim32 Blog.</description>
410 tom 12
<link>http://tim32.org/blog/</link>''');
409 tom 13
 
14
$ids = $page->findIDs('BlogPosts', 'ORDER BY DatePosted DESC');
15
for ($i = 0; $i < count($ids); $i++)
16
{
17
    $id = $ids[$i];
18
    $post = $page->getBlogPost($id);
19
 
20
    write('<item>');
21
    write('<title>' . $post->title . '</title>');
22
    write('<link>http://tim32.org/blog/post.php?id=' . $id . '</link>');
23
    write('<guid>' . $id . '</guid>');
24
    write('<pubDate>' . date('D, d M Y H:i:s O', $post->datePosted). '</pubDate>');
25
    write('</item>');
26
 
27
    write('<a href="post.php?id=' . $id . '"><h3>' . $post->title. '</h3></a>');
28
    write('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . $post->user->name . ' (' . $post->user->username . ')</h5>');
29
    write('<p>' . $page->replaceBBCode($post->content) . '</p>');
30
    write('<br />');
31
}
32
 
33
write('''</channel>
34
</rss>''');
35
 
36
?>