diff --git a/block/flickr_block.module b/block/flickr_block.module
index 1e2e09c..c8bc63b 100644
--- a/block/flickr_block.module
+++ b/block/flickr_block.module
@@ -17,6 +17,10 @@ function flickr_block($op = 'list', $delta = 0, $edit = array()) {
     $blocks[4]['info'] = t('Flickr recent photosets');
     $blocks[5]['info'] = t('Flickr random photos');
 
+    // Group blocks
+    $blocks[6]['info'] = t("Flickr group recent photos");
+    $blocks[7]['info'] = t("Flickr group random photos");
+
     return $blocks;
 
   case 'configure':
@@ -75,6 +79,17 @@ function flickr_block($op = 'list', $delta = 0, $edit = array()) {
       break;
     case 5: // sitewide, random
       break;
+
+    case 6: // group, recent
+    case 7: // group, random
+      unset($form["flickr_block_{$delta}_user_id"]);
+      $form["flickr_block_{$delta}_group_id"] = array(
+        '#type' => 'textfield',
+        '#title' => t('Flickr Group Id'),
+        '#default_value' => $settings['group_id'],
+        '#description' => t("The id of a Flickr group."),
+      );
+      break;
     }
 
     return $form;
@@ -99,12 +114,21 @@ function flickr_block($op = 'list', $delta = 0, $edit = array()) {
         'size' => $edit["flickr_block_{$delta}_size"],
       ));
       break;
+    case 6:
+    case 7:
+      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;
 
   case 'view': default:
     $settings = variable_get('flickr_block_'. $delta, array(
       'user_id' => '',
+      'group_id' => '',
       'show_n' => 4,
       'size' => 's',
     ));
@@ -148,13 +172,21 @@ function flickr_block($op = 'list', $delta = 0, $edit = array()) {
       $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('Group recent photos');
+      $block['content'] = _flickr_block_recent($settings['user_id'], $settings['show_n'], $settings['size'], array('group_id' => $settings['group_id']));
+    }
+    elseif ($delta == 7) {
+      $block['subject'] = t('Group random photos');
+      $block['content'] = _flickr_block_random($settings['user_id'], $settings['show_n'], $settings['size'], array('group_id' => $settings['group_id']));
+    }
     return $block;
   }
 }
 
-function _flickr_block_recent($nsid, $show_n, $size) {
+function _flickr_block_recent($nsid, $show_n, $size, $other_args = array()) {
   $output = '';
-  if ($photos = flickr_photos_search($nsid, 1, array('per_page' => $show_n))) {
+  if ($photos = flickr_photos_search($nsid, 1, array_merge($other_args, array('per_page' => $show_n)))) {
     foreach ($photos['photo'] as $photo) {
       $output .= theme('flickr_block_photo', $photo, $size);
     }
@@ -172,9 +204,9 @@ function _flickr_block_photosets($nsid, $show_n, $size) {
   return $output;
 }
 
-function _flickr_block_random($nsid, $show_n, $size) {
+function _flickr_block_random($nsid, $show_n, $size, $other_args = array()) {
   $output = '';
-  if ($photos = flickr_photos_search($nsid, 1, array('per_page' => 500))) {
+  if ($photos = flickr_photos_search($nsid, 1, array_merge($other_args, array('per_page' => 500)))) {
     $page_count = $photos['pages'];
 
     // we shouldn't try to return more than the total number of photos
@@ -183,7 +215,7 @@ function _flickr_block_random($nsid, $show_n, $size) {
     for ($i = 0; $i < $to; $i++) {
       sleep(0.125);
       // request a random page
-      $photos = flickr_photos_search($nsid, rand(1, $page_count), array('per_page' => 500));
+      $photos = flickr_photos_search($nsid, rand(1, $page_count), array_merge($other_args, array('per_page' => 500)));
       // then select a random photo
       $index = rand(0, count($photos['photo']) - 1);
       $output .= theme('flickr_block_photo', $photos['photo'][$index], $size);
