I've got a pro account and the links for my photo sets are /photos/tom/chance/x/y/z rather than the messy ID. It would be good if the links from blocks (and anywhere else relevant) used the nicer URL pattern, either by automatically grabbing this info via the flickr API if possible or by adding a configuration option.

Comments

drewish’s picture

yeah, good feature request. it's totally possible to do, the only downside is that the first time it'll require an api request (the result of which is cacheable). i'll look at rolling a patch.

drewish’s picture

Status: Active » Needs review
StatusFileSize
new1.74 KB

here's a quick one.

note for andrewlevine: take a look at what i did in flickr_people_get_info(). i'd like to start using that style of error checking/parameter extraction. it seems silly to have so many functions wrapping api calls if they don't do any of the error checking or pull out the relevant data item from the array, it's just as much code to call flickr_request in your own function. so my vote is to either have functions call flickr_request if they want detailed error handling and use the functions to simply it for most cases.

andrewlevine’s picture

I agree that wrapper methods should return the data in the easiest-to-use possible form without discarding any data.

This would be my preferred error handling strategy:
* flickr_request calls flickr_set_error if request fails
* flickr_set_error prints error if user is admin and logs error no matter what
* flickr_wrapper returns NULL on error
* caller of flickr_wrapper prints whatever error messages necessary

drewish’s picture

StatusFileSize
new1.88 KB

here's a re-roll in the new style.

drewish’s picture

Status: Needs review » Fixed

i committed this.

telex4’s picture

Great! Thanks for the quick work :)

Anonymous’s picture

Status: Fixed » Closed (fixed)