File: rss2.inc

package info (click to toggle)
php-horde-ansel 3.0.9%2Bdebian0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,860 kB
  • sloc: php: 15,757; xml: 1,979; makefile: 28; sh: 3
file content (42 lines) | stat: -rwxr-xr-x 1,995 bytes parent folder | download | duplicates (5)
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
41
42
<?php echo '<?xml version="1.0" encoding="UTF-8"?>' ?>

<?php echo '<?xml-stylesheet href="' . $xsl . '" type="text/xsl"?>' ?>

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
 <channel>
  <title><?php echo $stream_name ?></title>
  <description><?php echo $stream_desc ?></description>
  <image>
   <url><?php echo $image_url ?></url>
   <link><?php echo $image_link ?></link>
   <title><?php echo $stream_name ?></title>
  </image>
  <link><?php echo $stream_official ?></link>
  <atom:link rel="self" type="application/rss+xml" title="<?php echo $stream_name ?>" href="<?php echo $stream_rss ?>" xmlns:atom="http://www.w3.org/2005/Atom"></atom:link>
  <pubDate><?php echo $stream_updated ?></pubDate>
  <generator><?php echo $ansel ?></generator>
  <?php foreach($imgs as $image): ?>
  <item>
   <title><?php echo $image['filename'] ?></title>
   <description><?php echo htmlspecialchars('<img src="' . $image['url'] . '" />') . $image['caption'] ?></description>
   <link><?php echo htmlspecialchars($image['link']) ?></link>
   <?php if (!empty($image['author'])): ?>
   <author><?php echo $image['author'] ?></author>
   <?php endif; ?>
   <guid isPermaLink="true"><?php echo htmlspecialchars($image['link']) ?></guid>
   <media:content url="<?php echo $image['url'] ?>" type="<?php echo $image['type'] ?>"/>
   <media:thumbnail url="<?php echo $image['thumb'] ?>"/>
   <media:title type="plain"><?php echo $image['filename'] ?></media:title>
   <media:description type="html"><?php echo $image['caption'] ?></media:description>
   <?php if(!empty($image['latitude'])):?>
   <georss:point><?php echo $image['latitude'] ?> <?php echo $image['longitude']?></georss:point>
   <geo:point>
     <geo:lat><?php echo $image['latitude'] ?></geo:lat>
     <geo:long> $image['longitude']</geo:long>
   </geo:point>
   <?php endif;?>
  </item>
  <?php endforeach; ?>
 </channel>
</rss>