• I have set up a wordpress blog where basically all of the content is a single NextGen gallery. I grabbed the RSS feed for NextGen that is generally used to support the slideshow, because I wanted an RSS feed people could subscribe to to see new picures. It works, but is less than ideal. By default, the RSS feed just pulls in the title/description and a link to the image. I hacked it a little so people see the actual image, but it’s full sized and links to the original image. I’d love an RSS feed that actually resizes the image and links back to the page in my gallery.

    So if anybody else has done this, please let me know if there is a better media-rss.php file I can upload and link to and/or a better way to create a subscription feed to my gallery.

    The gallery is here: http://kurtisscaletta.com/snakes (you can see the feed by following the link.)

    Best,

    – Kurtis

Viewing 5 replies - 1 through 5 (of 5 total)
  • Try this:

    $title = html_entity_decode(stripslashes($image->alttext));
            $desc = html_entity_decode(stripslashes($image->description));
            $url = $site ."/snakes;
    
            $thumbwidth = $ngg_options['thumbwidth'];
            $thumbheight = ($ngg_options['thumbfix'] ? $ngg_options['thumbheight'] : $thumbwidth);     
    
            $out  = $indent . "<item>\n";
            $out .= $indent . "\t<title><![CDATA[" . $title . "]]></title>\n";
            $out .= $indent . "\t<description><![CDATA[<a href=" . $url ." ><img src='" . $image->thumbURL . "'></a>]]></description>\n";
            $out .= $indent . "\t<link><![CDATA[" . $url . "]]></link>\n";
            $out .= $indent . "</item>\n";

    change this in the last line of media-rss.php

    Thread Starter skutir

    (@skutir)

    Hi,

    Thanks so much for you reply and help. I did have to make one fix on line three above, but implemented it successfully. Unfortunately, it only shows one item at a time in the RSS feed. Can I make it more?

    Edit: never mind, it does show 10, just not in Safari for some reason. It works in my aggregator. If you do know how to change this number, let me know… I’d like it to be higher.

    Thanks again for your help; pulling the thumbnails is a nice solution.

    but it’s correct, so if a person add your rss feed receive a notification every time you add a photo.

    Thread Starter skutir

    (@skutir)

    I changed the first three lines of your code to this:

    $title = html_entity_decode(stripslashes($image->alttext));
            $desc = html_entity_decode(stripslashes($image->description));
            $url = "http://kurtisscaletta.com/snakes";
            $url = $url . "/?page_id=3&pid=" . $image->pid;

    … and now it works beautifully. I should make it clear for people who see this that they’ll have to copy this and change the two URL lines to show the URL to their blog and the page_id to show the page of their own gallery.

    Thanks for your help, Marco!

    Thread Starter skutir

    (@skutir)

    BTW, you can set the number of items in your RSS feed in the OTHER media-rss.php file, in the xml folder. If I knew how to code better, I’d make a generic example available for the community.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘NextGEN Gallery RSS’ is closed to new replies.