Is it possible to have a random photo from group photo?

I have a website which features pictures from several DJs. I upload photos to my own flickr account and then put them in a group. The other DJs in our collective do the same thing.

Our website has two blocks:
Random photo (which is taken from my own personal collection)
Recent Photos (which is taken from the group).

I have found that you can only display 200 photos in a free flickr account, but unlimited in a group. I have a workflow of upload 200 photos, then putting them all in the group, then uploading 200 more photos. This allows for all 400 photos to appear in the group.

It would be great if we could display random photos from the group instead of my personal account.

CommentFileSizeAuthor
#14 several_new_blocks-553170-14.patch31.55 KBlolandese

Comments

GregoryHeller’s picture

I concur that it seems pretty arbitrary that there is not a "random photos from group" block by default provided by this module, or an option in the block settings for the "flickr group photos" to display recent or random photos from the group.

Alternately, the flickr module could expose flickr content to views in the way that the twitter module does, and then a user could build their own blocks with views.

GregoryHeller’s picture

Does anyone have any thoughts on how to approach this?

pribeh’s picture

Bump.

lyle’s picture

Flickr's API supports photos from a group and random, but only does random from a "recent" collection of photos in the group. So it get's a little complicated when doing this because we would need to grab the feed of all of the group photos and then select a random collection.

I also would like this feature, I may try my hand. Not that experienced though.

Anonymous’s picture

It would be great to get the the rest of the 'group' features implemented and ..

"..expose flickr content to views in the way that the twitter module does, and then a user could build their own blocks with views."

If a client request these features i'll be sure to work on these.

Best, Paul

v8powerage’s picture

paulbrooker - It would be great if flickr module used views for recent group photos block, hope to see this implemented.

Anonymous’s picture

Assigned: Unassigned »

I think i'll have an opportunity to work on this as part of my work for the mozilla Drumbeat project.

pribeh’s picture

amazing. I'm looking forward to beta testing it.

30equals’s picture

i've actually modified the module so i have a page with the recent photos from a group - i assume making it random would imply using the array_shuffle function as used in the other random blocks.

making it a block wouldn't be that hard i guess. i'll see what i can do.

srobert72’s picture

Subscribing

Anonymous’s picture

Assigned: » Unassigned

I have unassigned myself so that you can assign this bug to to you.

Thanks for your help.

Best,
Paul Booker
Appcoast

mattbk’s picture

Did this happen yet? Will it?

lolandese’s picture

This feature went into D7. See http://drupalcode.org/project/flickr.git/commitdiff/8538816.

Might be possible to backport some of this code.

lolandese’s picture

Attached patch is a backport of several new blocks that went into the D7 version of the module. See related issues.

  • Flickr recent photo from photoset
  • Flickr user favorite public photos
  • Flickr random photos from a group
  • Flickr random user photos with a tag

Furthermore a Media Type filter (all, photos, videos) has been added in the Block configuration. Backport of the D7 patch at #2023103: Added Media Type (all, photos, videos) filter in Block config.

Thanks.

lolandese’s picture

TO DO: The added block variables ($delta 0-11) should be removed on uninstall. Also on D7 (to correct).

function flickr_block_uninstall() {
  foreach (range(0, 11) as $delta) {
    variable_del("flickr_block_{$delta}");
  }
}
lolandese’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.