Back to vBulletin 3.5 Template Modifications

PNG Transparency for Internet Explorer
Mod Version: 1.0, by Oblivion Knight

This modification is in the archives.
vB Version: 3.5.5 Rating: (12 votes - 5.00 average) Installs: 198
Released: 16 Aug 2005 Last Update: Never Downloads: 784
Not Supported Template Edits Additional Files  

Ever wanted to allow your users to see transparent PNG images using Internet Explorer? Now you can!

Note: I did NOT create this script, it remains the sole property of it's http://homepage.ntlworld.com/bobosola/.

Pros & Cons

Pros:
  • Ignored as a comment in other browsers, so no browser-sniffing code is required
  • Works with (X)HTML Strict & Transitional Doctypes
  • Does not break W3C validation
  • Lightweight and very easily deployed
  • Works with existing in-line or external CSS rules based on class or ID selectors
  • Works with old-style img align="left" or align="right" attributes
  • Adds itself to the end of any existing Body Onload code
  • Works with imagemaps and input images using a http://homepage.ntlworld.com/bobosola/imagemap.htm
Cons:
  • Doesn't work in IE versions earlier than 5.5
  • Requires JavaScript to be enabled - the estimations for how many people choose not to use JS vary wildly.
  • CSS backround PNGs not supported - experimentation revealed I could traverse the Stylesheets collection and use the AlphaImageLoader trick to replace all background-image attributes containing PNGs, but then background-repeat would not work, and anchors placed over non-transparent parts of the image were not clickable :-(
  • CSS rules for the PNG images based on the img selector are lost, but this is easily rectified by adding a class selector to your img rule such that img{..} becomes img,.png{..} - then add the attribute class="png" to each of your PNGs.

To install, simply upload the attached .js file to your /forums/clientscript/ directory.

Then edit your headinclude template, and add the following:
HTML Code:
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="clientscript/vbulletin_pngfix.js?v=$vboptions[simpleversion]"></script>
<![endif]-->
You're all set.!
Note: Updated to reflect changes by the author, and 3.5.x javascript handling changes. This template modification works fine with 3.6.x as it is, and therefore won't be posted in the 3.6.x forum!

Download

This modification is archived and cannot be downloaded.

Similar Mods

Transparency PNG pictures with Internet Explorer 6 (server-side solution) vBulletin 3.5 Add-ons
PNG Transparency for Internet Explorer vBulletin 3.0 Template Modifications

vblts.ru supports vBulletin®, 2022-2024