Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...PNG Transparency support in DNN 4.5.3PNG Transparency support in DNN 4.5.3
Previous
 
Next
New Post
8/1/2007 3:22 PM
 

Thanks Nik that seems to work. I had to change the sizingMethod to 'crop' to get the image to be the correct size. I'll also ran into a problem with the rightHeader where the login link on the page didn't work anymore but I remember seeing something about that last night when I was researching the DXImageTransform. I'll see if I can find that tonight and fix it up.

 EDIT: If I wanted to package this skin up so that it could be used on other portals would the old way of doing the skins work? I think it was something like <%SkinPath%> in the .css back in the DNN 2 days.

 
New Post
8/1/2007 7:55 PM
 

You can use <%= SkinPath %> but only in the skin template control files (i.e. ascx), not in the CSS file. Since static resources such as images, stylesheets etc. are by default served directly by IIS and not processed by the ASP.NET engine, they cannot reference code. The workaround in this case is to place the #leftheader style declaration in your ascx file like this:

<style>
  #leftheader{ .... <%= SkinPath %> ... }
</style>

Nik

 


Nik Kalyani
Co-founder
DotNetNuke Corporation
Blog | Twitter | FaceBook
 
New Post
8/14/2007 2:36 PM
 

Ok. I have PNG files on my site and have for some time. I have the code in my skin to have IE 6 render them correctly and after upgrading to 4.5.3 it fails. I would like to use the PNGFIX.js from the repository mode if i can, but can't seem to get either to work now. I have stripped the skin down tothe most basic item i could in order to test. I use HTML and CSS files to create my skins. Can someone tell my why this HTML will not work?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
        <meta http-equiv="content-type" content="text/html;charset=utf-8" />
        <meta name="generator" content="Adobe GoLive" />
        <title>SimpleTest</title>

    </head>
<script type="text/javascript" src="<%= Page.ResolveUrl("DesktopModules/Repository/js/pngfix.js") %>"></script>

    <body>
        <table width="180" border="1" cellspacing="2" cellpadding="0">
            <tr>
                <td>[LOGIN]</td>
            </tr>
            <tr>
                <td>[SOLPARTMENU]</td>
            </tr>
            <tr>
                <td id="ContentPane" runat="server"></td>
            </tr>
        </table>
        <p></p>
    </body>

</html>

 

thanks, I hope I haven't pulled all my hair out before I get an answer.


 
New Post
8/14/2007 3:11 PM
 

Ok. So I have looked into this further and (IMHO) at some point between 4.3.4 and 4.5.3 something has changed in the way that HTML is converted to ASCX when uploaded to DNN. I know I had this working when I released this skin to the site it was on. Since I released the skin I have not changed it, but I have upgraded the DNN.

Now after some time I decided to upgrade the skin to freshen things up and implement some things I have learned while building other skins. So I make a new skin, using this code (which worked before):

                <!--[if lt IE 7]>
<script language="JavaScript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (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
         }
      }
   }  
}
window.attachEvent("onload", correctPNG);
</script>
<![endif]-->

 

I put it in the skin where I did last time and prepared the skin for release. I uploaded the skin and the code is stripped out and never makes it to the ASCX file.

I figured this out because, I know when i released the skin, I would not have used PNG if I couldn't get it to work. The original skin that is on the site still works. I uploaded the original skin to one of my sites that is still running 4.4.1 and I see the problem there as well. Original skin that worked when I released it still works on the site it was originally parsed on, but not on the more current DNN builds. I went and looked and on 4.4.1 and 4.5.3 the code is not in the ASCX, but on the original site (i think it was 4.3.4 when I released the skin) the code is in the ASCX. If i manually add this code to the ASCX  on 4.4.1 or 4.5.3 it works as it should.



So I would rather use the js file and reference it, if someone can help explain why the code in my previous post will not work, I think it is stripping that out as well.

I know this may sound confusing, but I think everyone here will understand.

Please help.

 
New Post
8/14/2007 9:36 PM
 

I've also just been through all this drama a couple of days ago... and I'm also keen to know how to get the external js version working. I ended up putting the script directly into the head in default.aspx. It's the only way I could make it work. I don't know if the DNN version has anything to do with it but I'm 4.5.5.

Rob

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...PNG Transparency support in DNN 4.5.3PNG Transparency support in DNN 4.5.3


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out