You are here

function theme_flickr_photoset in Flickr 6

Same name and namespace in other branches
  1. 5 flickr.module \theme_flickr_photoset()
  2. 7 flickr.module \theme_flickr_photoset()
2 theme calls to theme_flickr_photoset()
theme_flickr_block_photoset in block/flickr_block.module
theme_flickr_filter_photoset in filter/flickr_filter.module

File

./flickr.module, line 328

Code

function theme_flickr_photoset($photoset, $owner, $size, $attributes = NULL) {
  if (module_exists('flickr_sets')) {
    $output .= "<div class='flickr-photoset'>\n";
    $photos = flickr_set_load($photoset['id']);
    foreach ((array) $photos['photoset']['photo'] as $photo) {

      // Insert owner into $photo because theme_flickr_photo needs it.
      $photo['owner'] = $owner;
      $output .= theme('flickr_photo', $photo, $size);
    }
    $output .= '</div>';
    return $output;
  }
  else {
    $img = flickr_img($photoset, $size, $attributes);
    $output = theme('pager', NULL, variable_get('flickr_photos_per_page', 20));
    $photo_url = flickr_photoset_page_url($owner, $photoset['id']);
    $output .= "<div class='flickr-photoset'>\n";
    $title = is_array($photoset['title']) ? $photoset['title']['_content'] : $photoset['title'];
    return l($img, $photo_url, array(
      'attributes' => array(
        'title' => $title,
      ),
      'absolute' => TRUE,
      'html' => TRUE,
    ));
  }
}