A week ago, I had finally decided on what I wanted in my online photo albums. I wanted a design that was simple to use and simple to look at, a design that would show off my photographs rather than distract from them. In html terms, to me, this meant a single page with controls to view the thumbnails and navigate between photographs, a single page without the flashes of multiple page reloads. I knew exactly what I wanted.
So I sat down and began on the design. Structure first; i.e., html, or in my case, xhtml. There was no style information in the structure. It was pure structure, the way xhtml is supposed to be. It looked good and straight forward. Then the style. CSS. I've done a lot of css work over the past year while I've worked on my blog, changing, improving and developing the blog's design. I've become quite familiar with css but I refuse to bow down to tweaking my css for the sake of arrogant egotistic non-compliant browsers. Writing the css for the photo album was not a piece of cake, but it wasn't difficult either.
Finally, there was the data. Each photograph would have a title and perhaps a caption to describe it. There would be a cover page photograph and there would also be one thumbnail for each photograph in the album. That was a lot of data. Writing that data each time I create a new album would be a lot of work, and I'd need a straight mind to remember to keep the html clean and valid while writing the data. It wouldn't be easy.
So I wrote an AppleScript application (i.e., 'Create blog album'). Whenever I needed to create an album, I would simply drag the photographs onto the application which would then launch, ask me for album information, ask me for the titles and captions for each of the photographs and then proceed to write the complete html file for the album. It worked great and didn't take all that long to write.
But there was a potential problem. What would happen if I wanted to add another photograph or two to the album? The Indonesia 2005 Day 1 album I was working on would not change over time but other albums I have planned would definitely change, albums like "Backyard Wildlife" and "Yesterday Hong Kong". How would I deal with that? It finally occurred to me that I could store the photographs together with titles and captions in Apple's iPhoto application and access the information via AppleScript.
I then edited the script application (i.e., 'Create blog album from iPhoto v1') to ask the user to choose from a list of iPhoto albums and then automatically glean the titles and captions from iPhoto before building the html file. It was wonderful.
I then reworked the whole process so that the person viewing the albums could choose from two sizes: smaller and larger. This meant creating another complete set of photographs and thumbnails, and it required another edit of the script application (i.e., 'Create blog album from iPhoto v2') .
The result was beautiful considering that I'm a relative beginner (admittedly an advanced AppleScript programmer but a novice at everything else). The application worked and it worked well…
until people began to access the album from my blog. Some people, including my wife at work, reported not being able to see the contents of the album. Most of them were using I.E. which unfortunately is the most prominent of the arrogant non-compliant browsers. I was going to ignore the I.E. browser problem but my conscience got to me and I decided to see what I could do.
document.all), I still wasn't able to get the code to work.
In the meantime, I discovered another problem, something which to me was completely illogical. The css style code I wrote for the blog albums 'turned off' (i.e.,
display='none') any part of the web page which was not supposed to be seen. For example, when the Introduction section was shown, the thumbnail and photograph sections were turned off, and all of the photographs were turned off until the person viewing the album chose to view those photographs, one at a time. To my logic, if the photograph was not 'turned on', then the browser shouldn't download it. After all, the person wasn't going to see that photograph so why download it? Unfortunately, I.E., Mozilla and possibly one other modern browser I tried insisted on downloading every single photograph referenced within the album as soon as the album was loaded. With 22 photographs in thumbnail, smaller and larger sizes, that came to a total of 90 image files for the Indonesia 2005 Day 1 album. Sorry. To me, that was totally unacceptable.
Just when I thought all of my problems had been solved, I discovered that there was no way to upload multiple html pages to my blog server (TypePad, admittedly designed for bloggers, not web developers). All in all, there were 48 html files for the Indonesia 2005 Day 1 album. Uploading them one at a time would take a lot of mouse clicks and a long time. Consequently, the album is not being stored on the blog server. It's on Apple's .mac server instead although just as easily accessible from my blog.
This would have been so much easier if everybody supported the standards, but there's always somebody who has to make it hard for everyone else.