Gallery RSS Feeds

I finally got around to figure out how the RSS feeds plug-in for Gallery2 works. I still haven’t figured out how to define rss feeds yet, but I’ve got simple feeds working for every album and item. I doubt RSS feeds for items would be of any use at the moment as it’s an RSS feed of comments, which I haven’t really enabled yet. But it came free when I defined RSS feeds for albums, so why not I thought.

First you’ll need to download the RSS plug-in from Site Admin > Plugins > Get More Plugins.

After you install and activate it, you’ll notice a new category (RSS) in your Admin Options. On the settings page, you can define the max number of items in each feed, how long before rss feed aggregators refetch (aka TTL: time to live), and some other stuff. I left all the settings to be default.

On the next tab (Simple Feed Settings), you’ll find settings for the simple feed generator. Every item and album has its own simple feed which can be reached at:
main.php?g2_view=rss.SimpleRender&g2_itemId=itemId
(replace itemId with the item’s id)

Anyway, it defaults to items in this album only, so it ignores items in sub-albums. I’ve enabled “Items in the album and its subalbums”, which is the slowest of the bunch, but I would like to be able to subscribe to my main gallery RSS feed and be able to get updates for everything.

On the wikipage for the RSS Feed plugin, they mention if you enable the RSS feed block, it’ll enable hidden page headers which will give you the RSS feed icon in most modern browsers. However, I wasn’t able to get that working even when I enabled the RSS feed block. It might be because I’m using a non-standard theme: Ajaxian.

Also, since I don’t have any specially configured RSS feeds, all my RSS feeds block just shows this message: No feeds have yet been defined

Therefore, I decided to remove that block and just manually add it to the theme. If you goto /themes/themeName/templates (replace themeName with the theme you’re using. by default, it’s matrix), you’ll find a file called theme.tpl. Open that up in your favorite text editor and add this line after your stylesheet:

<link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”/main.php?g2_view=rss.SimpleRender&g2_itemId={$theme.item.id}” />

I also noticed that my favicon.ico was no longer available for my Gallery. Must’ve forgotten to move it over when I transferred my gallery to this subdomain. Anyway, that’s fixed now.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.