Implement photosets.getPhotos

KarenS - June 18, 2007 - 20:55
Project:Flickr
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:patch (code needs review)
Description

I'd like to see photosets.getPhotos implemented to return all the photos from a photoset. Patch attached that will add that function.

It could be useful in many ways. I'm using this in a CCK Flickrfield module that allows you to input a photo or photoset id and retrieve the photo, the photoset primary photo, or all photoset photos to display in the field (I'm submitting that module in a separate issue).

AttachmentSize
flickr.inc_.patch916 bytes

#1

drewish - July 9, 2007 - 01:02

here's a re-roll that updates some of the other andrew's code in the sets module to use the function.

#2

drewish - July 9, 2007 - 01:02

here's the patch...

AttachmentSize
flickr_152792.patch3.77 KB

#3

andrewlevine - July 20, 2007 - 18:58
Status:patch (code needs review)» patch (reviewed & tested by the community)

your re-roll looks good to me except for the fact that you are leaving the $set_response variable in there unused. am i missing something? My re-re-roll adds these lines to the patch:

-  $set_response = flickr_request('flickr.photosets.getPhotos',
-    array(
-      'photoset_id'=>$set_id,
-      'page' => $pager_page_array[$element]+1,
-      'per_page' => variable_get('flickr_photos_per_page', 20),
-     ));

I am setting this RTBC for you to commit. thanks KarenS and drewish...

AttachmentSize
photosets_getPhotos.patch.txt3.69 KB

#4

drewish - July 20, 2007 - 20:46
Status:patch (reviewed & tested by the community)» patch (code needs work)

i'd like to clean up some of the PHPDoc before we commit this.

#5

KarenS - December 28, 2007 - 16:29
Assigned to:KarenS» Anonymous

I'm unassigning myself for now, but still interested in this idea.

#6

Egon Bianchet - April 23, 2008 - 09:53
Status:patch (code needs work)» patch (code needs review)

Rerolled latest patch, for Drupal 5.

AttachmentSize
photosets_getPhotos.2.patch3.66 KB

#7

glass.dimly - June 18, 2008 - 20:03

I applied the patch but it didn't get any more than one photo. Perhaps I am doing something wrong.

Great idea, I hope somebody smarter than me can make it work.

Also, double parenthesis in line 148 spits a syntax error.

thanks,
jmjohn

#8

Shai - July 6, 2008 - 20:24

I couldn't get the patch to apply cleanly at all. But I updated the files "by hand." But like #7, I still just get 1 image using the input filter for sets.

#9

ao2 - September 14, 2008 - 09:20

Any update for drupal 6?

See also http://drupal.org/node/262591

Thanks,
Antonio

 
 

Drupal is a registered trademark of Dries Buytaert.