Index: flickr.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flickr/Attic/flickr.inc,v
retrieving revision 1.25.2.4
diff -u -p -F^f -r1.25.2.4 flickr.inc
--- flickr.inc	12 Jun 2007 23:48:03 -0000	1.25.2.4
+++ flickr.inc	6 Jul 2007 21:54:04 -0000
@@ -259,6 +259,26 @@ function flickr_photoset_page_url($owner
   }
 }
 
+
+/**
+ * @param $group_id
+ *   id of the group to get Photos from
+ *
+ * @return
+ *   response from the flickr method flickr.groups.pools.getPhotos
+ *   (http://www.flickr.com/services/api/flickr.groups.pools.getPhotos)
+ */
+function flickr_group_pool_getphotos($group_id) {
+  $response = flickr_request(
+    'flickr.groups.pools.getPhotos',
+    array('group_id' => $group_id)
+  );
+  if ($response) {
+    return $response['photos'];
+  }
+  return FALSE;
+}
+
 /**
  * @param $photo_id
  *   id of the photo to get info about
@@ -538,3 +558,4 @@ function flickr_set_error($messageOrResp
   }
   watchdog('flickr', $message, WATCHDOG_WARNING);
 }
+
Index: flickr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flickr/Attic/flickr.module,v
retrieving revision 1.37.2.2
diff -u -p -F^f -r1.37.2.2 flickr.module
--- flickr.module	2 Jun 2007 04:46:58 -0000	1.37.2.2
+++ flickr.module	6 Jul 2007 21:54:04 -0000
@@ -117,6 +117,12 @@ function flickr_admin_settings() {
     '#default_value' => variable_get('flickr_default_userid', ''),
     '#description' => t("An, optional, default Flickr username or user id. This will be used when no user is specified."),
   );
+  $form['flickr_default_groupid'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Default Flickr Group Id'),
+    '#default_value' => variable_get('flickr_default_groupid', ''),
+    '#description' => t("An optional Flickr group id. This will be used by default when no group is specified."),
+  );
   $times = array(900, 1800, 2700, 3600, 7200, 10800, 14400, 18000, 21600, 43200, 86400);
   $ageoptions = drupal_map_assoc($times, 'format_interval');
   $form['flickr_cache_duration'] = array(
@@ -131,6 +137,8 @@ function flickr_admin_settings() {
   if (!$form['flickr_api_key']['#default_value']) {
     $form['flickr_default_userid']['#disabled'] = TRUE;
     $form['flickr_default_userid']['#description'] .= t(" Disabled until a valid API Key is set.");
+    $form['flickr_default_groupid']['#disabled'] = TRUE;
+    $form['flickr_default_groupid']['#description'] .= t(" Disabled until a valid API Key is set.");
   }
 
   return system_settings_form($form);
@@ -140,6 +148,7 @@ function flickr_admin_settings_validate(
   $key = trim($form['flickr_api_key']);
   $sec = trim($form['flickr_api_secret']);
   $uid = trim($form['flickr_default_userid']);
+  $gid = trim($form['flickr_default_groupid']);
 
   if ($key && (preg_match('/^[A-Fa-f\d]{32}$/', $key) != 1)) {
     form_set_error('flickr_api_key', t('This does not appear to be a Flickr API key.'));
@@ -147,9 +156,17 @@ function flickr_admin_settings_validate(
   if ($sec && (preg_match('/^[A-Fa-f\d]{16}$/', $sec) != 1)) {
     form_set_error('flickr_api_secret', t('This does not appear to be a Flickr API secret.'));
   }
+  if ($gid) {
+    if (flickr_is_nsid($gid)) {
+      // it's already a numerical id (nsid)
+    }
+    else {
+      form_set_error('flickr_default_groupid', t('%gid is not a Flickr group id.', array('%gid' => $gid)));
+    }
+  }
   if ($uid) {
     if (flickr_is_nsid($uid)) {
-      // it's already a uid
+      // it's already a numerical id (nsid)
     }
     else {
       $user = flickr_user_find_by_username($uid);
Index: block/flickr_block.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flickr/block/Attic/flickr_block.module,v
retrieving revision 1.9.2.1
diff -u -p -F^f -r1.9.2.1 flickr_block.module
--- block/flickr_block.module	9 Jun 2007 18:56:44 -0000	1.9.2.1
+++ block/flickr_block.module	6 Jul 2007 21:54:04 -0000
@@ -18,6 +18,7 @@ function flickr_block($op = 'list', $del
     $blocks[3]['info'] = t('Flickr recent photos');
     $blocks[4]['info'] = t('Flickr recent photosets');
     $blocks[5]['info'] = t('Flickr random photos');
+    $blocks[6]['info'] = t('Flickr group pool photos');
 
     return $blocks;
 
@@ -40,6 +41,12 @@ function flickr_block($op = 'list', $del
       '#default_value' => $settings['user_id'],
       '#description' => t("The user id of a Flickr user. If this is left blank, the sites's default user will be used. Current default id is " . variable_get('flickr_default_userid', '')),
     );
+    $form["flickr_block_{$delta}_group_id"] = array(
+      '#type' => 'textfield',
+      '#title' => t('Flickr Group Id'),
+      '#default_value' => $settings['group_id'],
+      '#description' => t("The group id of a Flickr group. If this is left blank, the sites's default user will be used. Current default id is " . variable_get('flickr_default_userid', '')),
+    );
     $form["flickr_block_{$delta}_show_n"] = array(
       '#type' => 'select',
       '#options' => $count_options,
@@ -58,9 +65,11 @@ function flickr_block($op = 'list', $del
     switch ($delta) {
     case 0: // user page, recent
       unset($form["flickr_block_{$delta}_user_id"]);
+      unset($form["flickr_block_{$delta}_group_id"]);
       break;
     case 1: // user page, photosets
       unset($form["flickr_block_{$delta}_user_id"]);
+      unset($form["flickr_block_{$delta}_group_id"]);
       // photoset, not photos
       $form["flickr_block_{$delta}_show_n"]['#title'] = t('Show the last <em>n</em> photosets');
       $form["flickr_block_{$delta}_show_n"]['#description'] = t("The block will show this many of the user's photosets.");
@@ -68,15 +77,16 @@ function flickr_block($op = 'list', $del
     case 2: // user page, random
       unset($form["flickr_block_{$delta}_user_id"]);
       break;
-
     case 3: // sitewide, recent
       break;
-    case 4: // sitewite photoset, not photos
+    case 4: // sitewide photoset, not photos
       $form["flickr_block_{$delta}_show_n"]['#title'] = t('Show the last <em>n</em> photosets');
       $form["flickr_block_{$delta}_show_n"]['#description'] = t("The block will show this many of the user's photosets.");
       break;
     case 5: // sitewide, random
       break;
+    case 6: // sitewide, group pool
+      break;
     }
 
     return $form;
@@ -101,6 +111,13 @@ function flickr_block($op = 'list', $del
         'size' => $edit["flickr_block_{$delta}_size"],
       ));
       break;
+    case 6: 
+      variable_set('flickr_block_'. $delta, array(
+        'group_id' => $edit["flickr_block_{$delta}_group_id"],
+        'show_n' => (int) $edit["flickr_block_{$delta}_show_n"],
+        'size' => $edit["flickr_block_{$delta}_size"],
+      ));
+      break;
     }
     break;
 
@@ -114,7 +131,6 @@ function flickr_block($op = 'list', $del
     if (isset($settings['user_id'])) {
       $settings['user_id'] = variable_get('flickr_default_userid', '');
     }
-
     // Get per user nsid if necessary
     if ($delta < 3) {
       if (arg(0) == 'user' && ($uid = (int) arg(1))) {
@@ -148,6 +164,10 @@ function flickr_block($op = 'list', $del
       $block['subject'] = t('Flickr random photos');
       $block['content'] = _flickr_block_random($settings['user_id'], $settings['show_n'], $settings['size']);
     }
+    elseif ($delta == 6) {
+      $block['subject'] = t('Flickr group pool photos');
+      $block['content'] = _flickr_block_group_pool_recent('335563@N25', $settings['show_n'], $settings['size']);
+    }
     return $block;
   }
 }
@@ -162,6 +182,31 @@ function _flickr_block_recent($nsid, $sh
   return $output;
 }
 
+/**
+ * @param $group_id
+ *   id of the group to get Photos from
+ * @param $show_n
+ *   number of images to display
+ * @param $size
+ *   size format in which to display images
+ *
+ * @return
+ *   output of flickr_block_photo applied to each image
+ *
+ * Limitations:
+ *   One can configure only one group per site
+ *   Currently all images from a group are displayed (there is no filtering)
+ */
+function _flickr_block_group_pool_recent($group_id, $show_n, $size) {
+  $output = '';
+  if ($photos = flickr_photos_search('', 1, array('per_page' => $show_n, 'group_id' => $group_id))) {
+    foreach($photos['photo'] as $photo) {
+      $output .= theme('flickr_block_photo', $photo, $size);
+    }
+  }
+  return $output;
+}
+
 function _flickr_block_photosets($nsid, $show_n, $size) {
   $photosets = flickr_photoset_get_list($nsid);
   $output = '';
