Provide page to show photos for flickr_default_userid

samo - February 6, 2007 - 18:06
Project:Flickr
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

Provide a page at /flickr to show the photos for the flickr_default_userid. I can imagine some people who could just use this module to display a set of photos from Flickr without allowing the per-user flickr display.

1) refactor function flickr_photos_get to not lookup user information. flickr_photos_get should just take a user id. move the user-based functions into flickr_photos()

2) modify flickr_photos to handle the default_userid

3) add a new menu setting for just /flickr

4) tell the user why the flickr_default_userid textbox in admin settings is disabled when no valid api key is set.

AttachmentSize
flickr-default-user.patch5.22 KB

#1

andrewlevine - February 6, 2007 - 19:18

Awesome, I was planning on doing this sooner or later but now I won't have to. :)

1. I like this change a lot.
2. Good.
3. Good.
4. Great.

I'm not sure if you are aware of this but one of your other patches is include in this one as well. Could you provide a patch with just the changes for this issue? Awesome stuff though, I'm going to test this ASAP and commit after drewish/wnorrix tests as well.

#2

drewish - February 7, 2007 - 00:30

I didn't have time for a deep review but looking at the patch the one thing that jumps out at me is that I'd use $uid=NULL rather than 0 as a default parameter.

#3

samo - February 12, 2007 - 19:22

1) I removed the information from the other patch I submitted.

2) I changed uid === NULL on drewish's suggestion.

New patch attached.

--Sam

AttachmentSize
flickr-default-user_0.patch3.48 KB

#4

andrewlevine - February 15, 2007 - 03:41

Here is Samo's patch against latest head (1.29).

by the way Samo something was up with your patch I couldn't apply it to 1.27, had to manually do it.

AttachmentSize
flickr-default-user.patch.txt3.26 KB

#5

andrewlevine - February 15, 2007 - 05:20

So this patch worked fine for me. I really like the idea of getting the 'drupal user' code out of flickr_get_photos. The only thing I added to the attached patch was a page title.

I do think we could move the default user id logic into hook_menu, but I will bring that up in another issue.

If we could get one more +1 (hopefully from drewish or wnorrix?) I will commit this.

AttachmentSize
flickr-default-user.patch_0.txt3.3 KB

#6

andrewlevine - April 14, 2007 - 23:16
Status:patch (code needs review)» patch (reviewed & tested by the community)

re-rolled for current head

AttachmentSize
flickr-default-user.patch_0_0.txt3.3 KB

#7

drewish - April 15, 2007 - 05:34
Status:patch (reviewed & tested by the community)» fixed

great, i've committed this (with a few small changes). it moves us in the right direction.

#8

Anonymous - April 29, 2007 - 05:50
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.