-
Notifications
You must be signed in to change notification settings - Fork 0
/
rss.tpl.php
32 lines (31 loc) · 1.17 KB
/
rss.tpl.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated by Russert -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title><?=htmlspecialchars($source->getName());?></title>
<link><?=htmlspecialchars($source->getLink());?></link>
<description><?=htmlspecialchars($source->getDescription());?></description>
<lastBuildDate><?=date("r");?></lastBuildDate>
<atom:link href="<?=htmlspecialchars(RSS_URL . "/" . $source->getClassName()) . ".xml";?>" rel="self" type="application/rss+xml" />
<?php foreach ($items as $item):?>
<item>
<title><?=htmlspecialchars($item->title)?></title>
<link><?=htmlspecialchars($item->link)?></link>
<description>
<?php if (!empty($item->image) || !empty($item->description)):?>
<![CDATA[
<?php if (!empty($item->image)):?>
<img src="<?=$item->image;?>" alt="" />
<?php endif;?>
<?php if (!empty($item->description)):?>
<p><?=htmlspecialchars($item->description);?></p>
<?php endif;?>
]]>
<?php endif?>
</description>
<pubDate><?=date("r", ($item->seen->__toString() / 1000));?></pubDate>
<guid><?=htmlspecialchars($item->guid);?></guid>
</item>
<?php endforeach;?>
</channel>
</rss>