Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function flickr_sets_html( $apikey, $user )
- {
- $f = new phpFlickr( "$apikey" );
- $f->enableCache( "fs", "phpflickr/cache" );
- $photos_url = $f->urls_getUserPhotos( "$user" );
- $sets = $f->photosets_getList( "$user", NULL, NULL, 36 );
- $fphotos = array( );
- $html = "";
- foreach( $sets['photoset'] as $set )
- {
- $set_title = $set['title'];
- $set_id = $set['id'];
- $setphotos = $f->photosets_getPhotos( $set_id );
- $html .="<div class=\"fset\">\n";
- $html .= "<h1>$set_title</h1>\n";
- foreach( $setphotos['photoset']['photo'] as $photo )
- {
- $photo_id = $photo['id'];
- $photo_title = $photo['title'];
- $aux['f_set_title'] = "$set_title";
- $aux['f_href'] = "$photos_url$photo_id";
- $aux['f_href_m'] = $f->buildPhotoURL( $photo, "Medium" );
- $aux['f_href_l'] = $f->buildPhotoURL( $photo, "Large" );
- $aux['f_href_s'] = $f->buildPhotoURL( $photo, "Square" );
- $aux['f_title'] = "$photo_title";
- $aux['f_src_s'] = $f->buildPhotoURL( $photo, "Square" );
- $aux['f_src_m'] = $f->buildPhotoURL( $photo, "Medium" );
- $aux['f_src_l'] = $f->buildPhotoURL( $photo, "Large" );
- $html .= "<li>\n";
- $html .= " <a href=\"" . $aux['f_href_l'] . "\" title=\"" . $aux['f_title'] . "\" rel=\"$set_id\"> <img src=\"" . $aux['f_src_s'] . "\" /> </a>\n";
- $html .= "</li>\n";
- unset( $aux );
- }
- $html .="</div>\n\n";
- }
- return $html;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement