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/20/2008 1:29 PM
 

am also facing same thing but I think my issue is easier than you....

what i need is to make 3 different skins and we will allow the user to chose what ever he needs?

I need your suggestion as long as I need to use the dot net nuke for its Content Managments but also changing the skin is very important part in my projrect....

your help please.

thanks.

 
New Post
1/20/2008 10:17 PM
 

I'm not I'm getting you correctly. You said that you will allow the user to choose skins. Are you running DotNetNuke hosting and your user is admin for their portal? Or Are you running a DNN Portal and your user is regular user?

If you're in the 1st case, it's kinda easier because DNN allows it by default, as long as your user is an admin. But if you're in the 2nd case, it's kinda hard. It involves Skin/Theme Personalization. You might wanna check this.

 
New Post
1/21/2008 2:04 AM
 

Ok here it goes, its based on a skin i did for an early 4.x version and i modified this by head, its not tested but it should work

this is for the doomain based one, the user based on is simple, set a cookie and then read out the cookie and set the skin

 <%@ 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="skin.ascx"

Else
If mUser.IsSuperUser Or mUser.UserID = _portalSettings.AdministratorId.ToString Then
'admin or host so general error and explanation
skin="admin.ascx"
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>

 
New Post
1/21/2008 2:19 AM
 

armand datema wrote:

mm you could make a skinobject that reads out domain name and then returns it to page as

[div id ="domainname1"]

then in you skin.css you can define everything as #domainname1 body {}

Good idea! But I think you don't even need a skinobject - you can do it with JavaScript.

Wrap your whole skin in a <div id="skinwrapper">...</div>, and change the div's class attribute with document.getElementById("skinwrapper").className = "...". In your CSS, define your classes as armand suggested.

You can change the class attribute depending on the host name:

if (window.location.hostname == "domain1") ...

or depending on the user selection in a selectbox:

if (document.getElementById("UserSkinSelection").selectedIndex == 0) ...

Hope that helps!

 
New Post
1/23/2008 6:42 AM
 

ok I have another idea but I need your help:

what I need is just to change the back ground color so I don't need to chaneg the skin itself, insted of that I need to chang the css file so her is my idea.

i have to put a javascript snippet in my skin file and this code will change css and here is my code

<%@ Control language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
<%@ Register TagPrefix="dnn" TagName="LOGO" Src="~/Admin/Skins/Logo.ascx" %>
<%@ Register TagPrefix="dnn" TagName="SOLPARTMENU" Src="~/Admin/Skins/SolPartMenu.ascx" %>
<%@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" %>
<%@ Register TagPrefix="dnn" TagName="USER" Src="~/Admin/Skins/User.ascx" %>
<%@ Register TagPrefix="dnn" TagName="COPYRIGHT" Src="~/Admin/Skins/Copyright.ascx" %>
<%@ Register TagPrefix="dnn" TagName="CurrentDate" Src="~/Admin/Skins/CurrentDate.ascx" %>
<%@ Register TagPrefix="dnn" TagName="SEARCH" Src="~/Admin/Skins/Search.ascx" %>
<%@ Register TagPrefix="dnn" TagName="LINKS" Src="~/Admin/Skins/Links.ascx" %>
<%@ Register TagPrefix="dnn" TagName="BREADCRUMB" Src="~/Admin/Skins/BreadCrumb.ascx" %>
<br>

<html>

<head>

<!--
====================================================
Copyright 2001 by www.CodeLifter.com
Free for all users, but please leave in this header.
====================================================
Subsequent comments may be removed.
//-->

<!-- Setting up the Style Sheets...

Make up your style sheets and set the link rel='s
up to load them, as shown below. These belong in
the <head> of the page.

What you name the style sheet files does not matter
(so long as the extension is .css) since the script
references them only by a number, not the file name.

We show four different style sheets used; but you
can use fewer or more as needed.  The script will
automatically detect the number of style sheets in
use.

Note the order of the style sheets. The *last* sheet
loaded is the one the browser will use initially.
One trick to avoid confusion is shown below, where
we load the first sheet an additional time at the
end of the list.

//-->

<link rel="stylesheet" href="skin.css">
<link rel="stylesheet" href="style_2.css">
<link rel="stylesheet" href="skin3.css">
<link rel="stylesheet" href="style_4.css">
<link rel="stylesheet" href="style_1.css">

<!-- Setting Up the JavaScript...

Insert the follwing script in the <head> of the page,
usually right after the link rel='s. Set do s above.

//-->
<a href=" changeSheets(1)">Style One</a>
<a href=" changeSheets(2)">Style Two</a>
<a href=" changeSheets(3)">Style Three</a>
<a href=" changeSheets(4)">Style Four</a>
<!-- The following is just junk content so you can see the script function. //-->
<p>Hi this is Lamah Alfaraj</p>
<div id="ContentPane" runat="server" > </div>
<div>&nbsp;</div>

 

<div id="ContentPane1" runat="server" > </div>
<div><dnn:LOGIN runat="server" id="dnnLogin" />
 <p> <br>
&nbsp;</div>
<div><dnn:SOLPARTMENU
runat="server"
id="dnnSOLPARTMENU"
usearrows="true"
userootbreadcrumbarrow="false"
usesubmenubreadcrumbarrow="false"
rootmenuitemlefthtml="<span>"
rootmenuitemrighthtml="</span>"
submenuitemlefthtml="&nbsp;&nbsp;"
submenuitemrighthtml="&nbsp;&nbsp;"
rootmenuitemcssclass="rootmenuitem"
rootmenuitemselectedcssclass="rootmenuitemselected"
submenuitemcssclass="submenuitem"
submenucssclass="submenu"
submenuitemselectedcssclass="submenuitemselected"
submenuitembreadcrumbcssclass="submenuitembreadcrumb"
CSSNodeSelectedSub="submenuitembreadcrumb"
delaysubmenuload="true"
/></div>

</body>

</html>

 

but I faced a problem when I applied this to my skin (it does not work)

what is the problem?

I think we need to name the css file with the same name of skin  file so we can not have more than 1 css for one 1 skin.

your advice please.

 
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