Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
PNG Transparency for Internet Explorer Details »»
PNG Transparency for Internet Explorer
Mod Version: 1.0, by Oblivion Knight (Coder/Designer) Oblivion Knight is offline
Developer Last Online: Jun 2011 I like it Show Printable Version Email this Page

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 author.


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 special version
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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 Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Transparency PNG pictures with Internet Explorer 6 (server-side solution) cclaerhout vBulletin 3.5 Add-ons 41 26 Oct 2009 19:17
PNG Transparency for Internet Explorer Oblivion Knight vBulletin 3.0 Template Modifications 9 08 Jul 2005 11:26

Comments
  #2  
Old 16 Aug 2005, 18:34
Floris Floris is offline
 
Join Date: Jan 2002
Very cool to share this, many will want this and especially nice to see the pros/cons against eachother. Good job.
__________________
My community; http://wetalknation.net
Reply With Quote
  #3  
Old 16 Aug 2005, 18:46
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Thanks, works great.
Reply With Quote
  #4  
Old 16 Aug 2005, 20:32
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Originally Posted by TheSpecialist
Thanks, works great.
It doesn't seem to do anything for me. I am using rc1
Reply With Quote
  #5  
Old 16 Aug 2005, 21:09
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
I think you have to do a hard refresh for the new JS files to load.
Ctrl F5
Reply With Quote
  #6  
Old 16 Aug 2005, 21:46
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Real name: Andy
Failing that; What version of Internet Explorer are you using and do you have javascript enabled?
Reply With Quote
  #7  
Old 17 Aug 2005, 04:05
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Yeah, I restarted IE. I appreciate the work you did, and it must be good stuff. But I ended up using a different method. But thank you!
Reply With Quote
  #8  
Old 30 Aug 2005, 06:02
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
 
Join Date: Jan 2002
Real name: Wayne
Great to see a solution which doesn't require modifying the PHP or how images are called. I used it to upload all new PNG emoticons to my site and it works great. Going to replace the icons with PNG tomorrow.

Hopefully since IE7 should support this transparently, more webmasters will start using PNGs to their full potential and we can see some cool things because of it.
__________________
Wayne Luke
Get started with your own social network. Purchase and download vBulletin today.
Take vBulletin to the next level - vBCodex. Find Tips, Tutorials, and Resources.
Reply With Quote
  #9  
Old 03 Nov 2005, 19:21
Rhoads Rhoads is offline
 
Join Date: Dec 2004
Nice, installed in 5 sec and working perfectly :nervous:
Reply With Quote
  #10  
Old 06 Nov 2005, 12:42
TheFocusElf TheFocusElf is offline
 
Join Date: Mar 2005
Real name: W. Scott
sure, this mod is no catch all -- but I do like that it does address the issue.

-installed-
Reply With Quote
  #11  
Old 15 Dec 2005, 09:30
Darat Darat is offline
 
Join Date: Aug 2004
Hi - wondering if this could be made to work with a "runtime generated" png? We've just installed LaTex onto our forum and we output that as a transparent PNG, which looks fine on all browsers bar IE of course.
Reply With Quote
  #12  
Old 13 Jan 2006, 21:18
bashy bashy is offline
 
Join Date: Nov 2005
Absolutely brilliant...
I can now use the smiley maker

Thanks m8 your a star installed
__________________
Bashy

Bashys Place ~ Bashys Hosting
Reply With Quote
  #13  
Old 21 Jan 2006, 14:19
Pcparts's Avatar
Pcparts Pcparts is offline
 
Join Date: May 2005
Thanks.


*installs*
Reply With Quote
  #14  
Old 21 Jan 2006, 15:40
BaselineAce BaselineAce is offline
 
Join Date: Oct 2002
Anyone figure out a way to use background-image?
Reply With Quote
  #15  
Old 25 Jan 2006, 22:14
crash resistant crash resistant is offline
 
Join Date: Oct 2004
One of the most under-rated and under-used hacks/mods in existance.

THANK YOU

Shame on you developers for not using PNG, regardless of IE support. Remember the whole firefox shebang?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 14:57.

Layout Options | Width: Wide Color: