Thursday, March 15, 2007

Everyone's A Critic!

Sheesh, you try to post something neat and someone (usually named John Carmichael) has to complain! Combine that with a case of insomnia, and you end up with v2 of Brian's Photo Rotator. So what's changed?

There's now some specialty logic to detect SmugMug and Flickr photos and munge the URLs to get more appropriately sized pictures. So instead of downloading Scott's 6.5MB, full-size photo and then resizing it down to a teeny-weeny little square, it gets the 143KB version and resizes THAT down into a teeny-weeny little square.

Another improvement: the old rotator would just look for enclosures and use those, which meant it only worked with certain feeds. For instance, in Flickr the Atom feed worked but the RSS 2.0 feed didn't (or was it the other way around?), and things like the Yahoo News feeds would never show anything. Now it parses through MediaRSS extensions looking for thumbnails and image content, and tries to make an intelligent decision based on the reported sizes of those images. In the future I'd like to maybe try rifling through the description text to find likely looking images in the event that there are no pictures available through MediaRSS or enclosures, but that'll have to wait for another day.

A pretty good early-morning's work, if I may say so. Which brings up a nifty side-effect of the single-script-block deployment model: I didn't have to change my blog at all. All the improvements were done in the admin site, and they just took effect on my blog as soon as I hit "Save". If anyone else had grabbed a copy of it (yeah, right) their sites would have likewise been updated without any action on their part. Which is pretty neat, especially from a maintenance standpoint.

2 comments:

Anonymous said...

At least I'm paying attention...

And its looking very cool now!

BKR said...

Actually I appreciate the feedback, but that won't keep me from complaining.