Archive for September, 2006

Playpen #2 – Lightbox JS

Saturday, September 23rd, 2006 at 11:09pm

The d.Construct Backnewtwork has a neat feature which hooks into the Flickr API and pulls out all suitably-tagged images of the conference. Then when you click an image, it appears in a rather sexy overlay window.

I’ve been looking for some time, for an unobtrusive javascript method of displaying a photo + caption in a popup, as I have several sites which require this feature, without needing to go for the overhead of dynamic pages or a page per image. Trouble is, most of the methods I’ve found haven’t been friendly if you turn off JavaScript!

The latest issue of .Net magazine (#154) also has a tutorial on Lightboxes (Javascript Image gallery widgets), so I thought I’d give Lightbox JS a try.

It works great straight out of the box, is dead easy to inplement, and will let you customise quite a few features. If users have Javascript disabled, they still get to see the content (the larger image when you click on the thumbnail, albeit in a boring vanilla window), so it’s fine from an accessibility standpoint. And I’m pretty sure it’s the very same method the backnetwork uses.

I knocked a quick gallery together, which you can see at the Playpen #2 page.

Beta Blockers?

Thursday, September 21st, 2006 at 10:47am

Blogger has a new beta version out and is inviting bloggers to move over from their existing account. This involves signing in with a Google account – either using an existing one, or signing up for a new account.

Using systems in beta can be a “fun” experience – you might be the person to come across that little-known bug which completely ruins your day! Or you might find that all the new features are worth the little rough patches while everything gets ironed out.

I’ll admit I’m dithering over whether I should jump ship and go for the beta release. There are certainly some great new features like the ability to restrict read access and add “labels” (tags to you and me) for searching and categorising your blog posts. OK, these two are features which other publishing systems like WordPress have had for some time (and I know of folks who have defected to WordPress from Blogger in the past due to these deficiencies).

One “hidden” benefit is their new dynamic serving of pages. In the past, you had to “Publish” each new entry or the whole blog when you made changes, to give the static HTML pages which made up your blog. If you forgot to republish, the changes weren’t seen until the next time you republished. This was pretty tedious and took quite a while if you had large blog. In the new version, changes are made to the database immediately and each page is served dynamically on the fly at each request. No more waiting for the spinning logo to finish its whirling!

My ideal scenario would be to move just one blog (probably the RugbyMad one) and play with it for a bit to see if I have any problems, before moving this blog too. But it’s not clear from the support info if I can do this – effectivley, both blogs are linked from one account, and I think it’s the account I’m moving and not the blog specifically.

Anyway, if you’re interested in what new features are in the beta release, here are a few links for you to digest:

Playpen #1 – Google Maps

Wednesday, September 20th, 2006 at 10:18pm

Inspired by Jeremy Keith’s piece at d.Construct the other week, I’ve finally dipped my toe in the water of fiddling with APIs – and like many, I decided to go for a Google Map.

It helped that there was a tutorial about that very subject in .Net magazine (issue #153), but when I tried it out, it wasn’t working properly. I checked my typing repeatedly for spelling errors, but couldn’t find why the map was rendering OK but the overlay bubble was not. Firefox’s JavaScript debugger kept coming up with some weird error message about XML mismatches on a line which didn’t even exist in the file!

So I turned to my newly acquired tome by Chris Heilemann (see, Chris, after your earlier teasing, I did go out and buy it!): Beginning JavaScript with DOM Scripting and AJAX. Sure enough, in the AJAX-based chapter at the end, I found Chris’ take on Google Maps.

Between that, and the Google Maps documentation, I finally figured out how to make a map, add custom marker, and have the info bubble pop up when the marker is clicked. You can see my bit of fun on the Playpen #1 page