Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: pngfix.js

Parašė House· 2009 Kov. 3 17:03:30
#1

sveiki, tai vat radau pngfix.js

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

if ((version >= 7) && (document.body.filters))
{
   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
      }
   }
}





bandziau taip iterpt :

function render_header($header_content) {
   echo "<script src='".THEME."/pngfix.js' language='Javascript'></script>";
global $theme_width;

echo "<table align='center' cellspacing='0' cellpadding='0' width='806' >
<tr>
<td>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='full-header' >
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td>
<img src='".THEME."images/3.png' /></td>
</tr>
</table>
</td>
</tr>
</table>\n";






niekas nesigavo ten raso tipo reikia : If you wish to use the code on multiples of pages, you may prefer to use a JS include file. First, download the JS file here: pngfix.js. Place the file in your webpage directory, then add the following construct on each of your pages somewhere in the <head> section:

<!--[if lt IE 7.]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->

taip daryt.. bet taip nemoku.. padekit .. aciu