I've seen a few professional (read - costs money) mods that allow users to select thier own skin. It is something I've been looking for a solution to for a while. Getting better with the DNN code makes it more likely I can get something done up myself.
That chunk of code does work, unfortunately it sets it for the entire site. I'm looking for a solution that just changes per user.
I have found a way to change the skin per user with a cookie, that is built into DNN, in the Default.aspx. (Didn't 'find' it in the default,aspx, found it mentioned somewhere)
One of the pro ones uses a cookie, not the same as the DNN cookie name, but I think, with a little creativity using the DNN cookie would work just fine.
My general idea behind this is to store the selection in a DB, and if the cookie says something else (shared computer) re-write the cookie with the users stored preference, or delete the cookie if the user hasn't selected. If you have mod on the 'Home' page write the cookie after they log in (no Expire date for session only) then the cookie will only be for that user. Of course, you can have it have an expire date to that it is always on for that computer.
It's nice that the ability to set the skin with a cookie is here, makes this much easier to do. :)
Here's the simple code I have to make the cookie. I have hard set the skin, as I was just testing it out. The Cookie name needs to be _SkinSrc# where # s the PortalID.
HttpCookie httpCookie = new HttpCookie("_SkinSrc" + PortalId.ToString());
httpCookie.Value = "[G]/Skins/SmoothTech/skin";
httpCookie.Path = "/";
//httpCookie.Expires = DateTime.Now.AddYears(30); <-- Taken out to make it session only
Response.SetCookie(httpCookie);
Even with all my rambling and broken thoughts, I hope this can help someone else with user selectable skinning.