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, ...Same site different skins is it possible???Same site different skins is it possible???
Previous
 
Next
New Post
1/24/2008 2:37 AM
 

armand datema hmmm looks interesting enough to test it ? and logically it  is what I need.... but I ran dnn 3 and one more question where to place all this? thanks!!!

 
New Post
1/25/2008 3:43 AM
 

@Julia

Well its a normal skin so you just make one skin package, the dynamic one and all the actual real skins zip this and upload it

so 

dynskin.ascx  ( the empty skin only used for the loging of switching )

domain1,domain2,domain3.ascx ( these are the acual skins that you made for each of the 3 domains

 

Here is the code updated to reflect only what you need

dynskin.ascx

-----------------------

 <%@ Control language="vb" AutoEventWireup="false" Explicit="True" %>
<%@Import namespace="DotNetNuke.Common.Globals" %>
<asp:placeholder id="SkinPlaceholder" runat="server" />

<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim skin As String = ""

Dim mUser As DotNetNuke.Entities.Users.UserInfo = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo
If mUser.UserID < 1 Then
'User Not Logged In
skin="domain1.ascx"

Else
If mUser.IsSuperUser Or mUser.UserID = _portalSettings.AdministratorId.ToString Then
'admin or host so general error and explanation

Else
'simple domain checking could be done nicer but here it is by head

If DotNetNuke.Common.Globals.NavigateURL.IndexOf("domain1.com") > 0 Then
skin="domain1.ascx"
else
If DotNetNuke.Common.Globals.NavigateURL.IndexOf("domain2.com") > 0 Then
skin="domain2.ascx"
else
skin="domain3.ascx"
end if
end if


End If
End If

SkinPlaceholder.Controls.Add(LoadControl(skin))

End Sub

</script>

-----------------------

I dont see any dnn4 specific logic, so in theory it should work but i ont have a dnn3 install to test it on. try it out and let me now how it goes

 
New Post
1/26/2008 2:09 AM
 

what about my question?

is there any way to use one skin with 3 CSS files and add a java script code to the skin file to allow the user to switch between these three css files?

 

 
New Post
1/26/2008 2:36 AM
 

@miss-net

Wel by the looks of your code it will not work, it just wont find your css files

you have an ascx skin and try to load the css file from that location but that ust wont work, since the location f your css is calcualted from your default.aspx and not your skin.ascx

lets say your domain is mydomain.com you have installed the skin as host and yoru skin nam i dyncss skin

then the skin callsto use in your skin would be

<link rel="stylesheet" href="http://www.mydomain.com/portals/_default/dyncsss/skin.css">
<link rel="stylesheet" href="http://www.mydomain.com/portals/_default/dyncsss/style_2.css">
<link rel="stylesheet" href="http://www.mydomain.com/portals/_default/dyncsss/skin3.css">
<link rel="stylesheet" href="http://www.mydomain.com/portals/_default/dyncsss/style_4.css">
<link rel="stylesheet" href="http://www.mydomain.com/portals/_default/dyncsss/style_1.css">

I also dont see you cahcngestylesheet code, if you ahve that in external css make sure it can be found so have the full path just as the skins

 

t

 
New Post
1/26/2008 5:08 AM
 

please can u explain more becouse I did not undrerstand what do you mean?

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Same site different skins is it possible???Same site different skins is it possible???


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