-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxml.php
40 lines (32 loc) · 1.49 KB
/
xml.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
32
33
34
35
36
37
38
39
40
<?='<?xml version="1.0" encoding="UTF-8"?>'?>
<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/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel>
<title><?= $chronicle->settings->site->name ?></title>
<atom:link href="<?= $chronicle->settings->site->feedURL ?>" rel="self" type="application/rss+xml" />
<link><?= $chronicle->settings->site->URL ?></link>
<description><?= $chronicle->settings->site->tagline ?></description>
<lastBuildDate><?= $chronicle->lastUpdated() ?></lastBuildDate>
<language>en-US</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<?php while ( ( $p = $chronicle->nextPost() ) ) { ?>
<item>
<title><?= $p->title ?></title>
<link><?= $chronicle->settings->site->URL ?><?= $p->url ?></link>
<pubDate><?= date('r', strtotime($p->published)); ?></pubDate>
<dc:creator><?= $p->author ?></dc:creator>
<category><![CDATA[<?= $p->categories ?>]]></category>
<guid isPermaLink="false"><?= $chronicle->settings->site->URL ?>/guids/<?= $p->guid ?></guid>
<description><![CDATA[<?= $p->excerpt ?>]]></description>
<content:encoded><![CDATA[<?= $p->content ?>]]></content:encoded>
<slash:comments><?= $p->comments ?></slash:comments>
</item>
<?php } ?>
</channel>
</rss>