Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Ads  
Biz Modules provides professional business modules and solutions for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Make it Hot! ( ...  switch skins.
Previous Previous
 
Next Next
New Post 2/3/2008 11:00 PM
User is offline murthy123
25 posts
10th Ranked


switch skins. 

Hi all,

          I want to allow users to change / switch skin, how to make this, need directions.

murthy.

 

 
New Post 2/4/2008 1:33 AM
User is offline Bilal Al-Ghazi
112 posts
9th Ranked


Re: switch skins. 

A long time ago, a user asked this question, and someone answered the answer bellow, I took the answer and saved in a text file because I found it usefull, I do not know who wrote this answer, so I appologize to him that I am using the answer without referencing the author:

 

The core code allows you to override the DNN skin.  This is all that the DNN site skin is doing.  There are 2 ways to override the skin.  First, by a querystring.  This is the method that is used to preview the skins in the Page Settings, Site Settings, and Skin Manager.  The other way is to set a cookie.  This is the method that the DNN site is using.  Upon clicking the icon, a cookie is set.  When the page reloads, the skin in the cookie is used instead of the skin that is specified in the Page/Site Settings.

function sizeLayout(size){    setSkinCookie("DotNetNuke_Skin_Layout_Size",size, new Date("December 31, 2010 23:59:59"),"/");    location.reload();}
function setSkinCookie(name, value, expires, path, domain, secure) {  var curCookie = name + "=" + escape(value) +      ((expires) ? "; expires=" + expires.toGMTString() : "") +      ((path) ? "; path=" + path : "") +      ((domain) ? "; domain=" + domain : "") +      ((secure) ? "; secure" : "");  document.cookie = curCookie;}

 


Bilal Al-Ghazi Visit My Collection of Photos
 
New Post 2/4/2008 2:00 AM
User is offline armand datema
214 posts
9th Ranked


Re: switch skins. 

HI

I posted a solution for this in another thread, there it was differnt skins based on domain. In order to make this work for your use you only need to make a simple module that allows user to select a skins, then just set a cookie based on this cookie you change the skin in the part where I have the skin change based on domain

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/109/threadid/198606/scope/posts/Default.aspx

 

 


Armand Datema
Complex css/xhtml and unobtrosive javascript skin conversion to make you stand out from the crowd

Latest work itbuzz & nu.nl/Z

SchwingSoft

 
New Post 3/18/2008 5:49 AM
User is offline FMeyer
15 posts
10th Ranked


Re: switch skins. 

I copied the code below from the DNN site into my site, but nothing (other than a page refresh) happens when clicking the images.

Feeling a bit dense here... I am not sure how setting this cookie value is supposed to work. How does DNN know which skin to use? If I have 10 skins with different names on my site, just providing a number (e.g., 0, 1, 2) does not seem to be enough info to indicate the correct skin. Is the skin supposed to have a specific name with a numeric value appended to the end?

Thanks in advance for your wisdom!

Code copied from DNN site:
<script language="Javascript">
function setSkinCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}
</script>
<script language="Javascript">
function sizeText(size)
{
    setSkinCookie("DotNetNuke_Skin_Text_Size", size, new Date("December 31, 2010 23:59:59"),"/");
    location.reload();
}
</script>

<a href=" void(0)"><img src="/Portals/_default/Skins/DNN-Minimal/controls/images/icon_textsmall_on.gif" onClick="sizeText(0)" width="17" height="17" alt="Small text" 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>
<a href=" void(0)"><img src="/Portals/_default/Skins/DNN-Minimal/controls/images/icon_textlarge.gif" onClick="sizeText(2)" width="17" height="17" alt="Large text" border="0"></a>

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Make it Hot! ( ...  switch skins.
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Jetkey Smart Map
Smart Map is an AJAX powered Google Map module that displays driving directions, proximity search results and data from your own databases. Smart Map reads GPX (GPS data) files, GeoRSS feeds, and KML data. You can pass any querystring parameter to Smart Map and into your own custom queries to control what data displays on the map.
smartmap.jetkey.com
DNNSpired.com
Inspired to extend DotNetNuke®, everyday.
www.DNNSpired.com
TMA Resources
TMA Resources is a software company providing eBusiness solutions for the Association market.
www.tmaresources.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP