Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Preview Post
NickE
New
Preview Post
0
Comments
Posted: Thursday, 5 April 2007 at 7:34AM
so simply converting all PNG to GIFs? (and changing the according links)
If you make a GIF with a white mask and place it over a pale blue background it will have a white halo around it - ugly.
If there are many background colors to take into account, PNGs are better because they have true transparency, except for Exploder of course.
Posted: Thursday, 5 April 2007 at 7:42AM
Then put this into the head section of each page...
<script type="text/javascript" src="http://www.yourdomain/forum/pngfix.js"></script>
// Correctly handle PNG transparency in Win IE 5.5 or higher. // http://www.infolink.net.au function correctPNG() { for(var i=0; i<document.images.length; i++) { var img = document.images[i] var imgName = img.src.toUpperCase() if (imgName.substring(imgName.length-3, imgName.length) == "PNG") { var imgID = (img.id) ? "id='" + img.id + "' " : "" var imgClass = (img.className) ? "class='" + img.className + "' " : "" var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " var imgStyle = "display:inline-block;" + img.style.cssText if (img.align == "left") imgStyle = "float:left;" + imgStyle if (img.align == "right") imgStyle = "float:right;" + imgStyle if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" img.outerHTML = strNewHTML i = i-1 } } } window.attachEvent("onload", correctPNG);
It works well but may take a few seconds on each page depending on how many PNGs it has to fix and how big they are.
Posted: Thursday, 5 April 2007 at 7:58AM
Thanks so long
Posted: Thursday, 5 April 2007 at 6:54PM
try this. provided this code actually works.??
<script type="text/javascript">function correctPNG() { for(var i=0; i<document.images.length; i++) { var img = document.images[i] var imgName = img.src.toUpperCase() if (imgName.substring(imgName.length-3, imgName.length) == "PNG") { var imgID = (img.id) ? "id='" + img.id + "' " : "" var imgClass = (img.className) ? "class='" + img.className + "' " : "" var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " var imgStyle = "display:inline-block;" + img.style.cssText if (img.align == "left") imgStyle = "float:left;" + imgStyle if (img.align == "right") imgStyle = "float:right;" + imgStyle if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src='" + img.src + "', sizingMethod='scale');\"></span>" img.outerHTML = strNewHTML i = i-1 } } } if (window.attachEvent) window.attachEvent("onload", correctPNG); else window.onload=correctPNG; </script>
and where is the png image
<script type="text/javascript" src="/wherever.it.lives/pngfix.js"></script>
Posted: Thursday, 5 April 2007 at 10:15PM
@MySchizoBuddy - the png image is also in the Head tag (1) with the script there as (0) (now it is with the Wanderer's option):
here
PS: Ooops.. just found out that it doesn't work in Opera (mac)
<!--[if IE]><script type="text/javascript" src="/wherever.it.lives/pngfix.js"></script><![endif]-->