Modifying RSS feed

I'm trying not to have the image page at all in my theme, but the RSS feed links the newest images to the image page. I know I could use the RSS feed for albums, but the default feed still exists. Is there a way to link the feed to the album page instead? Thanks for your help.

Comments

  • acrylian Administrator, Developer
    Well, you can remove the feed functions or modify them on your theme.

    Except that two ways:
    1. Modify the rss.php file to do what you want. Look at line 52:
    `$fullimagelink = $host.WEBPATH."/albums/".$albumobj->name."/".$item->filename;`
    and change it to
    `$fullimagelink = $host.WEBPATH."/albums/".$albumobj->name;`
    should do the trick.

    2. Use the Zenpage news feed with CombiNews enabled, this has an option to link to the album page instead of the single image pages. You don't even need to use Zenpage at all, just enable it and add its rss functions instead the default ones.
  • Thanks, that works perfectly! My site is almost complete, too!
  • Hmm, I thought it was working on my local install, but online it seems to still be trying to go to the image page. I'm using zenpage, so turning on combinews would mess with my current news page setup. I'm not sure how to not have it show the gallery updates, and still get the rss functions you're talking about.
  • acrylian Administrator, Developer
    Well, you probably did not upload your modifyed file then. Also you might need to clear the rss cache.
  • I replaced the file. Didn't know about the rss cache, and was pretty sure that would work, but it still goes to the image page. Here's the link:

    http://www.sedone.com/rss.php

    Is there supposed to be something else after the rss.php part?
  • acrylian Administrator, Developer
    I can't look at the file as it is already exectute when I do. But I just noticed that I wrote nonsense above.... That is the full image link used internally of the feed.

    You have to change the line after that.
    `$itemlink = $host.WEBPATH.$albumpath.pathurlencode($albumobj->name).$imagepath.pathurlencode($item->filename).$modrewritesuffix;`
    to
    `$itemlink = $host.WEBPATH.$albumpath.pathurlencode($albumobj->name);`

    That should really do it now..
  • Ah yes! It works! Thanks!
Sign In or Register to comment.