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.


At 6:39 PM, Blogger Mark Deffenbaugh said...

Would be cool if I knew who Jeremy was so I can fully test.

At 11:41 PM, Blogger Brian said...

Just looked at it in IE. All the image heights are streached. What a crappy browser IE is!! I guess I'll have to find a work around.

At 3:03 PM, Blogger J. said...

OK, I am Jeremy and the place that I go to when I go home is not the password. Is there more than one place that I go to?

At 8:40 AM, Blogger Brian said...

The clue was an inside joke from that night. Jeremy, you can thank Jen for that one.

There is a reason the photos are not public. I'm kinda mad the feed from SmugMug even includes them.

J... Check your email.


Post a Comment

<< Home