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, ...Allow users to select skinAllow users to select skin
Previous
 
Next
New Post
2/4/2007 11:35 AM
 

It's there for the most part, and was only for reference.

Feel free to edit the post if you want.


DotNetNuke Modules from Snapsis.com
 
New Post
2/6/2007 1:05 AM
 

Hi John,

Im trying to set the cookie but it does not seems to work. I would like to see if Im missing something. I will post what I did.

1. I added a javascript file to the [js] folder and I added its definition to default.aspx . This file contains code to set cookies , see bottom Set_Cookie function.

2. I added an IMG tag as the following: <IMG onclick=" Set_Cookie('SkinSrc0','[L]Skins/DarkBlue/DarkBlue.ascx',300000,'/')">

When I click the image, the cookie is created in the temporary Internet Files folder, so the javascript code is working, however I dont know if Im missing a parameter or something because I double checked Im on Portal0, and I verified the Skin Exists but still the skins does not change when I reload pages.

Many thanks in advance

function Set_Cookie( name, value, expires, path, domain, secure )
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct
expires time, the current script below will set
it for x number of days, to make it for hours,
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}

 
New Post
2/6/2007 1:53 AM
 

The name of the cookie should have an underscore _ in front (don't ask me why).

_SkinSrc0


DotNetNuke Modules from Snapsis.com
 
New Post
2/6/2007 4:25 AM
 

Seems that Im approaching.. now I receive the error:

Could Not Load Skin: %5BL%5DSkins/DarkBlue/DarkBlue.ascx.ascx Error: The file '/~%5BL%5DSkins/DarkBlue/DarkBlue.ascx.ascx' does not exist.

I know that this is not Dotnetnuke related, its javascript, but, should I escape characters or something?

 
New Post
10/14/2014 10:38 AM
 

Emilio (this is late) but you have a double ".ascx.ascx" on your skin path.  There should be no .ascx on the skin path string for the cookie.

Here's a good example: http://www.dnnsoftware.com/forums/for...



Andrew Walker

Learn to make your own beer and wine at homeIf you enjoy making your own beer and/or wine - be sure to check out http://www.ForemostBrewing.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Allow users to select skinAllow users to select skin


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