Brian's Blog

I’m not sure what you will find here; general musings and maybe some technical stuff spattered here and there.

Tuesday, January 17, 2006


SmugMug Badge?

I've always wanted a way to get my recent smugmug images to appear on my blog. Flickr has had this capability for some time now with the Flickr badge.

I've attempted to create my own solution, but with blogger, the tool I'm using to host this blog, I only have access to client side code (ie javascript). Trying to access smugmug from blogger with javascript just won't work. Its blocked because cross site scripting is a security hole.

Enter feed2js. They create javascripts on the server side, where its possible to pull information together from more than one domain. They host these scripts for you, and by filling out a simple form you can place any rss feed from any domain on your blog.

Using the rss feed from my smugmug page, I've created a feed2js script that will display my recent galleries. Now that I have a script on my page, I'm free to do whatever I want. I've added my own script that overrides the one from feed2js and displays the information how I want it to be displayed. The result is what you see to the right under "Recent Galleries". Click an image and you will be taken to that gallery on my smugmug page.

Cool eh?

UPDATE: Image heights are messed up in IE. Working on it. In the mean time get a real browser!

UPDATE: Well my script broke, something changed in feed2js. I've removed it for now.