Using phpFlickr, how would one display the primary photo from each photoset?

Posted by Michael on Stack Overflow See other posts from Stack Overflow or by Michael
Published on 2010-04-08T00:52:02Z Indexed on 2010/04/08 0:53 UTC
Read the original article Hit count: 349

Filed under:
|
|
|

Referring to this question: http://stackoverflow.com/questions/2561475/flickr-phpflickr-api

how would you display a primary photo from a photoset rather than all photos and photosets?

this is the code I have so far:

photosets_getList($user);

?>

 <?php $photoset_id = $ph_set['id'];
 $photos = $f->photosets_getPhotos($photoset_id);
     foreach ($photos['photoset']['photo'] as $photo): ?>

         <?php if($parentID == $ph_set['parent']): ?>
         <a rel="lightbox[album<?=$count;?>]" href="<?= $f->buildPhotoURL($photo, 'medium') ?>" title="<?= $photo['title'] ?>">
     <?php endif;?>

     <img src="<?= $f->buildPhotoURL($photo, 'square') ?>" alt="<?= $photo['title'] ?>" width="75" height="75" title="<?= $photo['title'] ?>" />
         <h3><?=$ph_set['title']?></h3>

     <?php if($parentID == $ph_set['parent']): ?>
             </a>
             </div>
    <?php endif;?>

© Stack Overflow or respective owner

Related posts about phpflickr

Related posts about flickr