Adding RSS?

I got my website all figured out with Zenphoto; I'm using a modified version of simple+ (Which is excellent), but it doesn't seem that it has included RSS at all. I'm wondering if it would be fairly simple to add RSS to this theme, and if so if I could be pointed in the right direction.

Thanks! :)

Comments

  • acrylian Administrator, Developer
    Take a look at the default theme for example, it's really simple. You just have to copy the rss functions over. (the part from index.php is for the whole gallery, the part of album.php/image.php for the current visitited album).
    For further details on that functions take a look at our functions guide on zenphoto.org
  • Cool, thanks. I'll grab a look at it. I'm a pretty big duface with code, so I'll do my best.
  • It was pretty easy to add RSS to the simple+ theme, but I have another problem now. Because the simple+ theme uses a lightbox script, the RSS feed tries to link to an an image that doesn't have template information to display and so it doesn't look so good. I'd like to change it so that clicking on the link in an RSS reader will link a person to the album instead of directly to the image. Does anyone know how I can do this?

    I'm looking at the rss.php script, but I'm just not good enough at php to know how to change the code to make it work. Any help?
  • acrylian Administrator, Developer
    That is relativly easy. Take a look the <item> section and modify it the following way:
    `

    <?php echo $images['title']; ?>

    <?php echo '<![CDATA[http://'.$host.WEBPATH.$albumpath.$images['folder']. ']]>';?>

    <?php echo '<![CDATA[<a title="'.$images['title'].' in '.$images['albumtitle'].'" href="http://'.$host.WEBPATH.$albumpath.$images['folder'].'">'. $images['title'] .'' . $images['desc'] . ']]>';?> <?php if($exif['datetime']) { echo '<![CDATA[Date: ' . $exif['datetime'] . ']]>'; } ?>

    <?php echo $images['title']; ?>

    <?php echo '<![CDATA[http://'.$host.WEBPATH.$albumpath.$images['folder']. ']]>';?>

    <?php echo $images['date']; ?>

    `
  • Thanks! That worked great! :)
Sign In or Register to comment.