Expand photoset rendering: render it like a list of the photos in the photoset.
Before this change only the first photo in the photoset was displayed.

theme_flickr_photoset() is called also by the filter component when it finds a
[flikr-photoset:...] tag.

The patch needs more work, it duplicates some code also present in sets/flickr_sets.module

Signed-off-by: Antonio Ospite <ao2@openezx.org>

diff -pruN flickr.orig/flickr.module flickr/flickr.module
--- flickr.orig/flickr.module	2008-04-02 22:09:05.000000000 +0200
+++ flickr/flickr.module	2008-10-14 19:28:37.000000000 +0200
@@ -233,9 +233,16 @@ function theme_flickr_photos($uid, $phot
 }
 
 function theme_flickr_photoset($ps, $owner, $size, $attribs = NULL) {
-  $img = flickr_img($ps, $size, $attribs);
-  $photo_url = flickr_photoset_page_url($owner, $ps['id']);
-  $title = is_array($ps['title']) ? $ps['title']['_content'] : $ps['title'];
-  return l($img, $photo_url, array('attributes' => array('title' => $title), 'absolute' => TRUE, 'html' => TRUE));
+  $output = theme('pager', NULL, variable_get('flickr_photos_per_page', 20));
+  $output .= "<div class='fickr-photoset'>\n";
+  $photos = flickr_set_load($ps['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>';
+  $output .= theme('pager', NULL, variable_get('flickr_photos_per_page', 20));
+  return $output;
 }
 
