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).
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 152792_photosets.getPhotos_D6_15.patch | 5.57 KB | soxofaan |
| #10 | 152792_photosets.getPhotos_10.patch | 3.8 KB | soxofaan |
| #6 | photosets_getPhotos.2.patch | 3.66 KB | Egon Bianchet |
| #3 | photosets_getPhotos.patch.txt | 3.69 KB | andrewlevine |
| #2 | flickr_152792.patch | 3.77 KB | drewish |
Comments
Comment #1
drewish commentedhere's a re-roll that updates some of the other andrew's code in the sets module to use the function.
Comment #2
drewish commentedhere's the patch...
Comment #3
andrewlevine commentedyour 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:
I am setting this RTBC for you to commit. thanks KarenS and drewish...
Comment #4
drewish commentedi'd like to clean up some of the PHPDoc before we commit this.
Comment #5
karens commentedI'm unassigning myself for now, but still interested in this idea.
Comment #6
Egon Bianchet commentedRerolled latest patch, for Drupal 5.
Comment #7
glass.dimly commentedI 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
Comment #8
Shai commentedI 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.
Comment #9
ao2 commentedAny update for drupal 6?
See also http://drupal.org/node/262591
Thanks,
Antonio
Comment #10
soxofaan commentedI 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.
Comment #11
Anonymous (not verified) commentedComment #12
Anonymous (not verified) commentedcoming back to this after we have released a stable 1.0 version of this module
Comment #13
Anonymous (not verified) commentedWould you provide a recent patch for review.
Best, Paul
Comment #14
Anonymous (not verified) commentedComment #15
soxofaan commentedThis one should do it
Comment #16
soxofaan commented(title update)
Comment #17
ksenzeeAs best I can tell this has been committed. If I'm wrong please feel free to reopen.
Comment #18
ksenzeeOops, 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.
Comment #19
drewish commentedfixing 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.
Comment #20
tiyberius commentedSo could someone tell me how we take advantage of this feature? I don't see it anywhere in the settings (I'm looking in the "Display Fields" option for a content type that has a flickr field). If we could recap and just go over how we display all the photos from a set, that'd be great!
Comment #21
Anonymous (not verified) commentedJust had quick look at the patch and can see that your suggesting a broader
wrapper around flickr.photosets.getPhotos ..
.. as an alternative to ..
.. to accomodate $per_page and better naming for the wrapper function and that flickr_set() becomes a wrapper
around flickr_photoset_get_photos for default arguments.
Looks goods.
Would you mind rolling the patch again against the latest version in development and i'll review promptly.
Best,
Paul Booker
Appcoast
Comment #22
ccoppen commentedIt only works under the user accounts. There should be a default setup for this, but for now, it seems to only work under the user accounts.
I went to my admin account and put the default Flickr account id in there.
Then you got to http://sitename/flickr/1/sets and you'll see all the sets.
There needs to be a way to view all sets from the default flickr settings, such as http://sitename/flickr/sets/
Comment #23
lolandese commentedCleaning up the issue queue.
A quick search revealed the following that indicates that the OP's request somehow got through:
It is used by the submodules Flickr Sets, Flickr Field (if Flickr Sets is enabled) and Flickr Block for the 'Random photos from a set' block.
The output of 'git log -p' shows that the following commit implemented 'flickr.photosets.getPhotos' the first time.
It refers to a D5 issue #112438: Add full photoset functionality.
Feel free to reopen if necessary.
Thanks.