aboutsummaryrefslogtreecommitdiffstats
path: root/template/standard/html/feed/main.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-02-24 21:27:59 +0100
committerThomas Lange <code@nerdmind.de>2017-02-24 21:27:59 +0100
commit52b077a48c743ba4d08ac00520a0bf1ef6deef5f (patch)
treeb4205c194167e0e03e273957cdd0aab3be9fdf01 /template/standard/html/feed/main.php
downloadblog-52b077a48c743ba4d08ac00520a0bf1ef6deef5f.tar.gz
blog-52b077a48c743ba4d08ac00520a0bf1ef6deef5f.tar.xz
blog-52b077a48c743ba4d08ac00520a0bf1ef6deef5f.zip
Initial commit.v1.0
Diffstat (limited to 'template/standard/html/feed/main.php')
-rw-r--r--template/standard/html/feed/main.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/template/standard/html/feed/main.php b/template/standard/html/feed/main.php
new file mode 100644
index 0000000..174a841
--- /dev/null
+++ b/template/standard/html/feed/main.php
@@ -0,0 +1,50 @@
+<?php
+#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
+# Standard: Feed Template [Thomas Lange <code@nerdmind.de>] #
+#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
+# #
+# [see documentation] #
+# #
+#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
+
+switch($FEED['TYPE']) {
+ case 'post':
+ $title = escapeHTML($BLOGMETA['NAME']).' ['.$Language->template('feed_only_posts').']';
+ $self = Application::getURL('feed/post/');
+ break;
+ case 'page':
+ $title = escapeHTML($BLOGMETA['NAME']).' ['.$Language->template('feed_only_pages').']';
+ $self = Application::getURL('feed/page/');
+ break;
+ default:
+ $title = escapeHTML($BLOGMETA['NAME']);
+ $self = Application::getURL('feed/');
+}
+?>
+<?='<?xml version="1.0" encoding="UTF-8" ?>'?>
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/">
+ <channel>
+ <title><?=$title?></title>
+ <link><?=$self?></link>
+ <language><?=$BLOGMETA['LANG']?></language>
+ <description><?=escapeHTML($BLOGMETA['DESC'])?></description>
+
+ <atom:link href="<?=$self?>" rel="self" type="application/rss+xml" />
+
+ <image>
+ <title><?=escapeHTML($BLOGMETA['NAME'])?></title>
+ <url><?=Application::getTemplateURL('rsrc/logo.png')?></url>
+ <link><?=$self?></link>
+ </image>
+
+ <!-- Feed items of type "post" -->
+ <?php foreach($FEED['LIST']['POSTS'] as $item): ?>
+ <?php echo $item ?>
+ <?php endforeach; ?>
+
+ <!-- Feed items of type "page" -->
+ <?php foreach($FEED['LIST']['PAGES'] as $item): ?>
+ <?php echo $item ?>
+ <?php endforeach; ?>
+ </channel>
+</rss> \ No newline at end of file