Implement photosets.getPhotos

KarenS - June 18, 2007 - 20:55
Project:Flickr
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:paulbooker
Status: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.patch 3.77 KB

#3

andrewlevine - July 20, 2007 - 18:58
Status:needs review» 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.txt 3.69 KB

#4

drewish - July 20, 2007 - 20:46
Status:reviewed & tested by the community» 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:needs work» needs review

Rerolled latest patch, for Drupal 5.

AttachmentSize
photosets_getPhotos.2.patch 3.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

#10

soxofaan - November 1, 2008 - 14:18

I worked a bit on the patch of #6:
- fixed syntax error reported in #7
- there were some bugs in the refactoring (forgotten translation of $set_response['photoset'] to $photoset)
- worked a bit on PHPdoc

patch works on my setup

At glass.dimly and Shai: the patch does not change the behavior of the input filter for sets, there is only some refactoring under the hood. It's invisible above the surface, but it should make it simpler to implement your feature request.

AttachmentSize
152792_photosets.getPhotos_10.patch 3.8 KB

#11

paulbooker - November 22, 2008 - 21:20
Version:5.x-1.x-dev» 6.x-1.x-dev
Assigned to:Anonymous» paulbooker

#12

paulbooker - January 13, 2009 - 20:59

coming back to this after we have released a stable 1.0 version of this module

#13

paulbooker - April 16, 2009 - 17:01

Would you provide a recent patch for review.

Best, Paul

#14

paulbooker - April 16, 2009 - 17:21
Title:Implement photosets.getPhotos» [AWAITING RECENT] Implement photosets.getPhotos

#15

soxofaan - April 16, 2009 - 22:38

This one should do it

AttachmentSize
152792_photosets.getPhotos_D6_15.patch 5.57 KB

#16

soxofaan - April 16, 2009 - 22:41
Title:[AWAITING RECENT] Implement photosets.getPhotos» [UPDATED PATCH AVAILABLE] Implement photosets.getPhotos

(title update)

#17

ksenzee - June 24, 2009 - 17:55
Status:needs review» fixed

As best I can tell this has been committed. If I'm wrong please feel free to reopen.

#18

ksenzee - June 24, 2009 - 18:11
Status:fixed» needs review

Oops, wrong issue. Sorry.

I'm reviewing this and I think it's a good idea. I'm holding off on committing it until I get through some of the rest of the issue queue, to make sure it doesn't adversely affect anything else in the queue.

#19

drewish - September 10, 2009 - 03:07
Title:[UPDATED PATCH AVAILABLE] Implement photosets.getPhotos» Implement photosets.getPhotos

fixing the title. we use the status field to indicate that there's a patch.

didn't try applying the patch but aside from some indenting issues it looks okay to me.

 
 

Drupal is a registered trademark of Dries Buytaert.