Here you go, snippet properties are
$photoLimit = How many photos should be called
$showTitles = Shall we show titles? 0 (false) 1 (true)
$album(x) = Unique Album ID
<?php
//Declare our vars
$namespace = "http://search.yahoo.com/mrss/";
$ourItems = "";
$ourFeeds = array();
foreach ($scriptProperties as $album) { //Lets add an entry into ourFeeds array for each valid album
if (strlen($album) > 10) { //Lets just check we are dealing with a valid album id
//$ourFeeds[$album] = "http://api.flickr.com/services/feeds/photoset.gne?set=".$album."&nsid=50910794@N07&lang=en-us&format=rss_200";
$ourFeeds[$album] = $album;
}
}
foreach($ourFeeds as $aFeed) {
//Lets now build the URL for the feed and work out how many images the user wants to pull
$feedID = substr($aFeed, 0, 17);
$feedURL = "http://api.flickr.com/services/feeds/photoset.gne?set=".$feedID."&nsid=50910794@N07&lang=en-us&format=rss_200";
$photoLimit = substr($aFeed, 18);
if ($photoLimit == null) { //If no limit was set, we will take the default photosToReturn value and use that as our limit
$photoLimit = $photosToReturn;
}
//Fetch the feeds details as raw code, and turn it into an XML document
$content = file_get_contents($feedURL);
$rawFeed = new SimpleXmlElement($content);
$albumTitle = $rawFeed->channel->title; //Grab the album title
$thisPhoto = 1; //PhotoCounter
//Lets now loop through all the items grabbing what we need, and adding to our LI var
foreach($rawFeed->channel->item as $entry) {
if ($thisPhoto <= $photoLimit) {
$thumbParent = $entry->children($namespace);
$thumb = $thumbParent->thumbnail->attributes();
$image = $thumbParent->content->attributes();
$attr = array(
"aT" => $albumTitle, //Album Title
"tW" => $thumb['width'], "tH" => $thumb['height'], "tU" => $thumb['url'], //Thumbnail Attributes
"iW" => $image['width'], "iH" => $image['height'], "iU" => $image['url']); //Image Attributes
if ($showTitles == 1) { //Are we showing titles?
$attr["pT"] = $entry->title;
}
//Going to make an assumption there that all of the files ever returned are jpgs...
$attr["tU"] = substr($attr["tU"], 0, -5);
$attr["tU"] .= "q.jpg";
$ourItems .= "<div class='fpPhoto'><img src='" . $attr["tU"] . "' /></div>";
$thisPhoto++; //Added now onto the next photo
}
}
}
//Add all the LI's into the UL
return $ourItems;