diff options
| author | 2013-03-20 22:56:17 +0100 | |
|---|---|---|
| committer | 2013-03-20 22:56:17 +0100 | |
| commit | bf24aa601f96d184f9635fa72377d7521b324b4f (patch) | |
| tree | 647e17c2a22c0e861c5dbe8f4efef1ea86bf8084 /app/views/rss | |
| parent | 80d4f5cf3d2d48fb095d0a2c7013dc3d99ae0065 (diff) | |
Ajout controller Rss pour export au format RSS (très très basique) #34 + ajout lib text pour gérer le bbcode
Diffstat (limited to 'app/views/rss')
| -rwxr-xr-x | app/views/rss/public.phtml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app/views/rss/public.phtml b/app/views/rss/public.phtml new file mode 100755 index 000000000..04a035699 --- /dev/null +++ b/app/views/rss/public.phtml @@ -0,0 +1,31 @@ +<?php echo '<?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/"> + <channel> + <title><?php echo View::title(); ?></title> + <link><?php echo Url::display(); ?></link> + <description>Flux public de <?php echo View::title(); ?></description> + <language>fr</language> + <pubDate><?php echo date('D, d M Y H:i:s O'); ?></pubDate> + <lastBuildDate><?php echo gmdate('D, d M Y H:i:s'); ?> GMT</lastBuildDate> + <atom:link href="<?php echo Url::display(array('a' => 'rss')); ?>" rel="self" type="application/rss+xml" /> +<?php +$items = $this->itemPaginator->items (); +foreach ($items as $item) { +?> + <item> + <title><?php echo htmlspecialchars(html_entity_decode($item->title ())); ?></title> + <link><?php echo $item->link (); ?></link> + <?php $author = $item->author (); ?> + <?php if ($author != '') { ?> + <dc:creator><?php echo $author; ?></dc:creator> + <?php } ?> + <description><![CDATA[<?php + echo html_entity_decode($item->notes (false, false)); +?>]]></description> + <pubDate><?php echo date('D, d M Y H:i:s O', $item->date (true)); ?></pubDate> + <guid><?php echo $item->guid (); ?></guid> + </item> +<?php } ?> + + </channel> +</rss> |
