Gallery2:Modules:rss - Gallery Codex
Personal tools

Gallery2:Modules:rss

From Gallery Codex

RSS Module

The RSS Module publishes information about your Gallery in the well-known RSS protocol, used by blogs for syndication.

It allows you to define feeds (or just let Gallery do it for you automatically) for different types of data, such as:

  • new or updated albums
  • new or updated pictures
  • comments

This helps your friends stay up to date on your latest pictures by allowing them to syndicate the feed, either in an aggregator application or an online aggregator.

The RSS module is available with Gallery 2.1 and later.

Features

  • simple feeds: no configuration necessary, all albums and photos offer a feed
  • configurable feeds: the owner of an album or a photo (or a Gallery administrator) can define a named feed (many options are available)
  • various RSS version (0.91 or 2.0), Atom will come later
  • the Gallery administrator can allow or disallow certain types of feeds

Types of feeds:

  • for albums
    • list of items in the album
    • list of sub-albums of the album
    • list of items in the album and its sub-albums
    • comments for the album (in Gallery 2.2: and its sub-albums)
  • for photos (and other items)
    • comments for the photo

Usage

For administrators

Enable the module in the administrator interface.

You can then set the administrator options:

  • enabling or disabling simple feeds and configurable feeds
  • for configurable feeds, enable or disable the various types of feeds (some may generate more load on your server)
  • set the default and maximum values for feeds, including maximum items, which also has an influence on performance

You should also probably enable the RSS rewrite rules in the Rewrite module, in order to make feed URLs shorter and more human-readable.

Finally, you should add the RSS block to the themes used in your Gallery. This will have two effects:

  • the block itself, which users can see and pick feeds from (and get a list of all feeds)
  • hidden page headers that modern web browsers will use to make it easier for the user to subscribe to the feeds

For item owners

If the administrator has enabled configurable feeds, you will be able to create feeds for the albums and photos (and other items) that you own.

Go to the item, and you should see Configure RSS Feeds in the Action menu. This will let you create a new feed, edit a previously created feed, or get a list of feeds for this item.

Visitors to the site will see a list of all feeds in the Gallery, but if you hidden, password-protect or set the permissions on a photo or an album such that visitors can't see it when they visit Gallery, the photo or album will also not appear in the feed.

If you use a different theme than the default, or if the default doesn't show the RSS block, you may want to add it yourself.

For visitors

When you visit a Gallery, you may notice in the sidebar a link called RSS Feeds for this Album (or Photo).

This is a link to the feed associated with this item. You can look at it if you like reading XML, but for most people, you'll want to use an aggregator to read it and get updates whenever the feed is updated (usually when a new picture is added).

There may also be a block in the sidebar called RSS Feeds, with a small list of feeds. These are not necessarily associated with the item you are looking at, but are global to the Gallery. You can click on List all RSS Feeds to get a complete list of all the special feeds created on the Gallery. This list doesn't include the feeds that are implicitly available for all items (if the Gallery administrator so decided).

Each link here is again a link to a feed.

How to view feeds

Here are some examples of applications and online services to subscribe to RSS feeds. Feel free to add your favorite.

Aggregator applications

Online Aggregators

Even if you don't want to install an application on your computer, you can read feeds and stay up-to-date on your friends' galleries.

  • NewsGator online has free basic subscriptions, which have advanced features and can synchronize to aggregator applications
  • My Yahoo
  • Squeet will send you updated items via email, which is great if you want to set up feeds for your grandma (allright, your mom) since she won't have to even know what a feed is

Requested Features

  • Integrate with Pheed
  • Support PhotoCast if Apple fixes it
    • It would be useful to support the de-facto standard.
  • Support Media RSS as an extension
    • Supporting the Media tags would be a great and very useful feature that would allow G2 to integrate into other software (e.g. Flickr and SlideShowPro)
  • Extend the comments-feed with:
comments for the album and its sub-albums (added in version Gallery 2.next)
  • Replace the hard-coded "days old" value that is used to determine if an item is included in the feed with a configurable value determined by the user.
    Note: The value is actually not hard-coded. The rss-module uses the value from the newitems-modules. The module newitems can be disabled again after configuring if the functionality of that module is not needed. This is highly counter-inituitive, though. At least a short notice where to find this setting would save lots of time.
  • People should have the ability to utilize a feed (identified by the feed URL) regardless of their browser's cookie state. Currently the feed content varies depending on if the user has viewed/logged in the site. This behavior makes it impossible to add a feed to Thunderbird.
  • Make rss work even for protected pictures. This could be done through HTTP authentification with the same user/pass as the ones used to log on the site. I am not sure, but this might be related to the request above, concerning cookie state.
  • Add the standard RSS meta header to all pages with feeds, for example: <link rel="alternate" type="application/rss+xml" title="RSS" href="http://host.com/g2/main.php?g2_view=rss.Render&g2_name=my_feed" />
  • Add PubDate to RSS 0.91 feed

Bugs

If the random image sidebar is enabled then a random image is included with the RSS feed.(not a bug)