PNG Behave! for Drupal 5
Today I backported PNG Behave! 6.x-1.3 to what I'm calling PNG Behave! 5.x-1.0-dev. This module uses the work of TwinHelix to fix the PNG transparency problems with Internet Explorer 5.5 and 6.
The power of this module is that it can handle CSS backround images, which is something so desperately needed for Drupal. I'm sure others have done this with there Drupal sites, but they haven't contributed how they did, or posted it anywhere that I can find. Most of the modules we need for our current projects haven't yet been updated to Drupal 6, so we still have a great need for Drupal 5. Unfornately, PNG Behave! was created only for Drupal 6.
I haven't yet tested it for all my Drupal-PNG problems, but so far it has solved all of the big ones that I've tested.
This is my first contribution back to the Drupal Community since learning Drupal. I don't know how to use the CVS yet, so that's added to my long to-do list. I need to find a good, detailed tutorial on how to set that up and participate and maintain this module properly. Also, it's motivated me to comeback and work on our site a little.
I hope you find it helpful!
| Preview | Attachment | Size |
|---|---|---|
| pngbehave-5.x-1.0-dev.zip | 15.94 KB |

Comments
Fixed! Both the stupid mistake and the true problem.
So do I feel stupid. The reason my CSS repeating backgrounds were failing in some cases, actually only one case, is because I forgot to include the selector in the list on the admin page. So remember to check this first if it appears to be failing.
However, I was also having the problem of PNGs being transparent but having a funny border and/or red "X" icon on pages other than the homepage. According to the references at TwinHelix, this was because I was not properly referencing the blank.gif on line 16 of the iepngfix.htc file.
By adding a line of javascript code in pngbehave.module to create a variable to reference the Drupal Base Path, I was able to fix this and simplify the installation since the blank.gif can be stored in the modules directory now.
I made some other code clean-up changes as well, and noted everything in the CHANGELOG.txt file.
Next, I'll work on getting my CVS up and running so that I can properly submit any additional changes.
Once again I thank Chris Paul, a.k.a. MrJeeves, of drupal.tomadoh.com for creating this module for Drupal 6. I was going nuts with these PNGs, and now they Behave!
Problem with CSS Repeating Backgrounds...
I seem to have a problem with the CSS repeating backgrounds with my module. Not sure as to why or under which conditions it fails, but it doesn't work 100%. I'm sure the bugs I have is a matter of properly referencing the blank pic.