ARCHIVE: April, 2008

Some time ago I wrote an article about CSS PNG Fix for IE by Rogie King, from Komodo Media, which is a great fix. But whether you realized it or not, there are some issues with the script if you monitor it closely, and some observant people have also notified me about it.

The problem is it will make repeated background ‘none’ call to your server, which probably shown as page not found or server error message in your access log, though the transparency fix stilll works. And here are some possible scenarios that may trigger that problem:

  • <img> tag linking to other image types other than PNG, e.g. JPEG or GIF images. This can be quite problematic if you use css selector to automatically fix all * html img tags found, you may get a lot of redundant background ‘none’ calls to your server if there are many tags which link to GIF or JPEG images.
  • If you accidentally put 'png' class name from some your elements without stylesheet background image.

So I took closer look at the code, re-formatted so I knew what was going on. There two types of fixes, one for <img> tag, while the other for background images. And it seems background image fix are still called for some of the scenarios above, and calling this.runtimeStyle.backgroundImage="none" was triggering the “none” request to the server. And two fixes that I did:

  • If it is <img> tag and it does not link to a PNG image file, do not perform background image fix, instead just ignore it.
  • If it is a background image fix, and the background image is not a PNG file, ignore it as well.

Here are the updated codes:

* html img,
* html .png {
  azimuth: expression(
    this.pngSet?
      this.pngSet=true : 
        (this.nodeName == "IMG" ? 
          (this.src.toLowerCase().indexOf('.png')>-1 ? 
            (this.runtimeStyle.backgroundImage = "none", this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')",
                this.src = "/images/blank.gif") :
            '') :          
          (this.currentStyle.backgroundImage.toLowerCase().indexOf('.png')>-1) ?
            (this.origBg = (this.origBg) ? 
              this.origBg :             
              this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
              this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')",
              this.runtimeStyle.backgroundImage = "none") :
            ''
        ), this.pngSet=true
  );
}

Since Prof. Schubert Foo mentioned about BookJetty in VALA conference, there have been quite a number of requests from BookJetty users and librarians to link up their libraries with BookJetty.

And BookJetty welcomes the 10 most recent libraries that BookJetty links up with:

Australia

Singapore

United States

So special thanks especially to Prof. Schubert Foo to create the awareness, and to people like Hazman Aziz, Anne Holmes, Elaine Hopper, John Ruddle, Caroline Ramsden, John Edstrom, Lianne Gee, Stuart Lutzenhiser, Neredowell, Jessica Goodman, and others I could have inadvertently missed, for their suggestions and help with the link-up.

There are a few libraries suggested by some users could not be linked up because their z39.50 gateway is not active. I’m really sorry for that, while there are a few others are pending their verifications on the availability of the gateway with their librarians.

I’ve also worked on a simple XML spec which libraries can implement to link up with BookJetty, but the spec I think still need improvement, and I’ve yet to find more time to do that. The idea is so that libraries that do not support z39.50 gateway, with their internal IT staff support, can help to build that simple XML interface. While on my side, I’ll need to create the adapter.

In all, I’m really glad to see people around the world are seeing the value of BookJetty, which was started off merely as my pet project and to solve my own problems. It has encouraged me a lot in my long and tiring journey for the last few months, relentlessly days and nights, to work on the new release of BookJetty.

I hope with the new release, BookJetty will help to make our life more fun as a reader, a book lover, and people who know that there are tonnes of knowledge and pleasures, hidden down there in piles of writings binded as books.

And it’s definitely gonna be more fun if you can link up with your friends and family bookshelves, on top of your reviews, libraries, and online bookstores, all put under one roof with simple and user friendly interface. That is what I hope to achieve for the next release.

And the good news, I’m almost done, so, stay tuned for the new BookJetty this April.