PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/halogy/application/modules/blog/views/rss.php

https://bitbucket.org/haloweb/halogy-1.0/
PHP | 48 lines | 37 code | 11 blank | 0 comment | 0 complexity | 89862d07acda7b3797ffc739c7c2d20e MD5 | raw file
 1<?php 
 2echo '<?xml version="1.0" encoding="utf-8"?>' . "
 3";
 4?>
 5<rss version="2.0"
 6    xmlns:dc="http://purl.org/dc/elements/1.1/"
 7    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
 8    xmlns:admin="http://webns.net/mvcb/"
 9    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
10    xmlns:content="http://purl.org/rss/1.0/modules/content/"
11    xmlns:atom="http://www.w3.org/2005/Atom">
12
13    <channel>
14    
15    <title><?php echo $feed_name; ?></title>
16
17    <link><?php echo $feed_url; ?></link>
18    <description><?php echo $page_description; ?></description>
19    <dc:language><?php echo $page_language; ?></dc:language>
20    <dc:creator><?php echo $creator_email; ?></dc:creator>
21
22    <dc:rights>Copyright <?php echo gmdate("Y", time()); ?></dc:rights>
23    <admin:generatorAgent rdf:resource="http://www.halogy.com/" />
24    <atom:link href="<?php echo $feed_url; ?>/feed" rel="self" type="application/rss+xml" />
25
26    <?php foreach($posts as $entry): ?>
27    
28	    <item>
29
30          <title><?php echo xml_convert($entry['postTitle']); ?></title>
31          <link><?php echo site_url('blog/'.dateFmt($entry['dateCreated'], 'Y/m').'/'.$entry['uri']); ?></link>
32          <guid><?php echo site_url('blog/'.dateFmt($entry['dateCreated'], 'Y/m').'/'.$entry['uri']); ?></guid>
33
34			<description><![CDATA[
35				<?php
36					$body = $this->template->parse_body($entry['body'], TRUE, site_url('blog/'.dateFmt($entry['dateCreated'], 'Y/m').'/'.$entry['uri']));
37					$body = preg_replace('/\/images\//i', site_url('images').'/', $body);
38					$body = preg_replace('/\/gfx\//i', site_url('gfx').'/', $body);
39				?>
40				<?php echo $body; ?>
41			]]></description>
42      <pubDate><?php echo dateFmt($entry['dateCreated'], 'r');?></pubDate>
43        </item>
44
45        
46    <?php endforeach; ?>
47    
48</channel></rss>