Cause alls the PNG Files (such as the Smileys from the Smiley ext.) such ugly borders? I also recognized it, but instructed my users, to use firefox :P
so simply converting all PNG to GIFs? (and changing the according links)
well, this doesn't work for me. This way the script-nugget kills off an image one also located in the Head tag. Whereas that wasn't the case with Wanderer's option.
@Wanderer - I know that :) @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):
u shouldn't need png fix for opera. so just wrap the script around <!--[if IE]><script type="text/javascript" src="/wherever.it.lives/pngfix.js"></script><![endif]-->
hmm, recently moved to a new server - along with spellchecker - preview post is not working - I tried version 2.5 - then i reverted to version 2.1. No luck, the message I'm getting is:
Line: 55
Char: 4
Error: Unknown runtime error
Code: 0
Just a random thought related to IE6, now that IE7 is out and gaining ground, would it be worth changing the preview graphic back to being an alpha blended PNG and adding the GIF one just for IE6 and lower via a conditional style sheet? It's just that the preview graphic looks a little rough now when it was smooth before (I understand the reasons for changing it at the time).
I started trying to hack the preview.js file to output code that would work with the tabled theme, but I'm absolute rubbish with Javascript. Anyone else willing to help out and take a stab at it?
Comments
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Posted: Thursday, 5 April 2007 at 7:34AM
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •so simply converting all PNG to GIFs? (and changing the according links)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Thanks so long
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Posted: Thursday, 5 April 2007 at 6:54PM
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •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>
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •and where is the png image
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •<script type="text/javascript" src="/wherever.it.lives/pngfix.js"></script>
Posted: Thursday, 5 April 2007 at 10:15PM
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@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)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •<!--[if IE]><script type="text/javascript" src="/wherever.it.lives/pngfix.js"></script><![endif]-->- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Any chance of getting this patch into preview post? It seemed to work just fine for me with and without FCK enabled.
mattucf, yes, I think it does. If you have any ideas on stopping it conflicting, please let me know in the AutoP discussion.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Just a random thought related to IE6, now that IE7 is out and gaining ground, would it be worth changing the preview graphic back to being an alpha blended PNG and adding the GIF one just for IE6 and lower via a conditional style sheet? It's just that the preview graphic looks a little rough now when it was smooth before (I understand the reasons for changing it at the time).
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •It's working in my Vanilla test forums. You will need to be signed up and logged in to try it out.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •