"; $error .= "Specified photoset has not been setup.
"; $error .= "
"; return $error; } /* Set up a Flickr Handler */ $f = new phpFlickr(""); /* lets enable file system caching */ $f->enableCache("fs", "phpFlickrCache"); /* Check URL to determin specified page#, if none set it to 1 */ $page = $_SERVER['QUERY_STRING']; if(!$page){ $page = 1; } /* Use Flickr Handler to fill the array $photoset with our desired images */ $photoset = $f->photosets_getPhotos($setid, NULL, 1, $limit, $page); /* Use Flickr Handler get the Photoset Info */ $setinfo = $f->photosets_getInfo($setid); /* Format and output a title for the gallery using it's flickr description field */ $output = "
"; $output .= ""; $output .= "
"; /* Iterate throught the array of photos returned by flicker and display them as thumbnails */ foreach ($photoset['photo'] as $photo) { $output .= ""; $output .= "\"""; if($page > 1) { $output .= "«Prev"; } else { $output .= "«Prev"; } /* Get the total number of pages in the Photoset */ $num_pages = $photoset[pages]; $counter = 1; $pagecount = 1; while ( $counter <= $num_pages ) { if ($page == $pagecount) { $output .= " [$page] "; } else { $output .= " " . ($pagecount) . " "; }; $counter++; $pagecount++; } //end while if($page != $num_pages) { $output .= "Next»"; } else { $output .= "Next»"; } $output .= "
"; return $output; } ?>