Resources and Support
 Pixel Joint Forum : The Lounge : Resources and Support
Message Icon Topic: Bug: disappearing PNGs Post Reply Post New Topic
Author Message
1ucas
Commander
Commander
Avatar

Joined: 27 June 2005
Location: Brazil
Online Status: Offline
Posts: 174
Quote 1ucas Replybullet Topic: Bug: disappearing PNGs
    Posted: 16 August 2005 at 6:05am
I'm not sure what's going on, but it just happens in this website and just with PNGs.

They start loading but then POOF!, they disappear. I have to check the source code and copy their url in order to see it.

This is happening both in the forums and in the rest of the website, and it started about two/three weeks ago, I think. Not a clue of what's going on yet, but I'm studying the source code to see if notice anything;

Oh yeah, it seems to be an Opera-only issue as well. Damn. [ I refuse to change browser, so don't even dare to use the "get firefox" routine ]

What a noticed:

The part of the code that makes the galleries come out as a huge clump, without any CRLF in the whole thing. Maybe Opera is unable to read these properly (still, why just pngs?). Maybe this happened after you (sedge) changed the links to the icons from "pixels/pixels/icons/icon_###" (or whatever) to ###.html.

Gotta see what's wrong with the forum yet.
IP IP Logged
sedgemonkey
Admiral
Admiral
Avatar

Joined: 07 April 2021
Online Status: Offline
Posts: 1669
Quote sedgemonkey Replybullet Posted: 16 August 2005 at 7:59am

We added a PNG transparency script for IE that might be conflicting with Opera. I'll look into it.

IP IP Logged
1ucas
Commander
Commander
Avatar

Joined: 27 June 2005
Location: Brazil
Online Status: Offline
Posts: 174
Quote 1ucas Replybullet Posted: 16 August 2005 at 9:03am
Oh, I see. I know sh*t of js, as of yet, but I tried to instinctively fix the code adding a little if:


// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004

function correctPNG()
   if (navigator.userAgent.toLowerCase() == "microsoft internet explorer") {
   {
   for(var i=0; i<document.images.length; i++)
{
var img = document.images
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);


Make a little test.

Edited by 1ucas
IP IP Logged
sedgemonkey
Admiral
Admiral
Avatar

Joined: 07 April 2021
Online Status: Offline
Posts: 1669
Quote sedgemonkey Replybullet Posted: 16 August 2005 at 1:48pm

Yeah... we have a browser check on every page (dom.js) so the last line is the only thing that changes...

if(oBw.ie){window.attachEvent("onload", correctPNG);}

IP IP Logged
1ucas
Commander
Commander
Avatar

Joined: 27 June 2005
Location: Brazil
Online Status: Offline
Posts: 174
Quote 1ucas Replybullet Posted: 16 August 2005 at 2:38pm
Well, okay then. That'll probably fix it.   

Edited by 1ucas
IP IP Logged
sedgemonkey
Admiral
Admiral
Avatar

Joined: 07 April 2021
Online Status: Offline
Posts: 1669
Quote sedgemonkey Replybullet Posted: 16 August 2005 at 5:22pm

Would you mind giving it a go now my Opera guinea pig? 

IP IP Logged
1ucas
Commander
Commander
Avatar

Joined: 27 June 2005
Location: Brazil
Online Status: Offline
Posts: 174
Quote 1ucas Replybullet Posted: 16 August 2005 at 8:45pm
Nope. Didn't seem to have worked. :|

Bleh, I gotta learn this JS stuff.

Edited by 1ucas
IP IP Logged
sedgemonkey
Admiral
Admiral
Avatar

Joined: 07 April 2021
Online Status: Offline
Posts: 1669
Quote sedgemonkey Replybullet Posted: 17 August 2005 at 8:29am

Grrrrrr.  I'll download Opera tonight and get it resolved.

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum