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, ...Dynamically Changing Skin and FontDynamically Changing Skin and Font
Previous
 
Next
New Post
4/26/2007 1:05 AM
 

I'm looking to implement something simular to what this site has on the left of the search box, up on the top right of this web page. The 6 icon that allow you to change the site width and font size. I inspected the HTML and saw that it was somehow swapping of overridding the css file. Thats my guess. This is what I found so far. There is some javascript that is setting a cookie. My guess is that the cookie is checked on the server and then some how setting the new .css file to change the skin size and font. It's been while since I developed web apps so I could be wrong. Ive been stuck in on desktop app for about 4 years now. Could some one help me with the code/logic that is required to check the cookie and set the css? Or if its not working this way then can you help do accomplish this same functionality? Thank you!

I'm using Firefox Firebug to inspect the page activity.

When you click on full width icon is see the browser downloading this in addition to the default css:
http://www.dotnetnuke.com/Portals/_default/Skins/DNN-Minimal/fullwidth.css
The source shows this addition link:
<LINK id="dnnLAYOUT" rel="stylesheet" type="text/css" href="/Portals/_default/Skins/DNN-Minimal/fullwidth.css"></LINK>

When you click on medium width icon is see the browser downloading this in addition to the default css:
http://www.dotnetnuke.com/Portals/_default/Skins/DNN-Minimal/mediumwidth.css
The source shows this addition link:
<LINK id="dnnLAYOUT" rel="stylesheet" type="text/css" href="/Portals/_default/Skins/DNN-Minimal/mediumwidth.css"></LINK>


When you click on small width icon the browser just downloads the default .css files


If you right click and do a "View source" you will find this:

HTML:

<a href=" void(0)"><img src="/Portals/_default/Skins/DNN-Minimal/controls/images/icon_widthlarge.gif" onClick="sizeLayout(2)" width="16" height="11" alt="Maximum width layout" border="0"></a>
<a href=" void(0)"><img src="/Portals/_default/Skins/DNN-Minimal/controls/images/icon_textmedium.gif" onClick="sizeText(1)" width="17" height="17" alt="Medium text" border="0"></a>



function sizeLayout(size)
{
    setSkinCookie("DotNetNuke_Skin_Layout_Size",size, new Date("December 31, 2010 23:59:59"),"/");
    location.reload();
}

function sizeText(size)
{
    setSkinCookie("DotNetNuke_Skin_Text_Size",size, new Date("December 31, 2010 23:59:59"),"/");
    location.reload();
}

- Christopher

 
New Post
4/26/2007 1:58 PM
 

This site uses SPEERIO SKINEGY I think.

You should be able to change the CSS with javascript and th Cokie is just written by the javascript and not a server scriot I think.

It's only used to set the textsize if the user returns to the site I guess.

There are also some other possiblites to set the skin, read this

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Dynamically Changing Skin and FontDynamically Changing Skin and Font


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