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, ...Assign skin to portal aliasAssign skin to portal alias
Previous
 
Next
New Post
4/12/2007 9:00 AM
 

This can actually be done without changing the core.

What you can do is create a SmartSkin™ which has logic in it to load other skins based on the Portal Alias.

I have created these kinds of skins for the SkinCovered.com subscribers that allowschanging the whole skin based on the time of day, and based on the Role of the user.

I'll go ahead and do one for this task and release it for free.


DotNetNuke Modules from Snapsis.com
 
New Post
4/12/2007 10:05 AM
 

You don't have to change anything to the core at all.

Just us a combination of the two techniques I mentioned before.

The Skin:

    <div id="Portal<%=PortalSettings.PortalAlias.PortalAliasID%">

    "Put your skin here"

    </div>

 

CSS:

    #Portal0{

    "css for portal 0"

    }

    #Portal1{

    "css for portal 1"

    }

 
New Post
4/12/2007 1:04 PM
 

We forked from the core at 3.2 using the subportal module originally developed by Tom Mahoney / ezcam (Available on snowcovered).  The module not only allowed us to skin at the portal alias level but also extended some of  the core modules allowing for alias specific content. and subportal admins.  (Limited to just the modules and content we designate)

ie. Sub Contacts, Sub html, Sub image, Sub faq's, Sub feedback, Sub registration.  Relatively simple concept: Associate subportal ID to a portal alias and use the subportalid to identify the module content to be delivered.  In effect we have global and subportal versions of modules.  Global shows on all aliases and subportaled delivers content specific to a portal alias.  Very fast and very slick application. 

What this provided us was a managed content application engine that we utilized to build industry specific portal applications.  ie. computer reseller store sites, branded affiliate sites.  Each with their own look and feel but with professionally managed content.

Our fork allowed us to install multiple hosts in a single DB each with  multiple portal applications  and  with branded  sub sites in a single DB.    We actually setup a proof of concept test site on a $10 / month wh4l account with a single DB running 5 DNN host installations each with 10 portal applications and 10,000 dynamically branded subportals.  The performance was amazing since the framework was really only serving 50 optimized portals with managed content.   There were some minor mods made to the core and admin through hosts - portals was painful (Portals and aliases have no paging.... try pulling 100,000 records ;).  But it worked very well for us  if the site is still up I'll post a link.

The current revision of the framework has changed dramatically and we are trying to update the engine for this style of functionality.  Beyond portal alias skinning we need the ability to deliver alias specific content and allow for alias specific administration.  This really should be part of the core framework...  Look at Cafepress, Community Zero, myspace etc.

Fully Managed content applications is a huge value add that end users have no problem paying $$$ for especially when it reflects their brand!

 

 
New Post
4/13/2007 10:55 AM
 

Timo Breumelhof wrote

You don't have to change anything to the core at all.

Just us a combination of the two techniques I mentioned before.



I like John's idea  of a SmartSkin that loads the skin and container for the portal alias as specified in the subportal alias table.  This way we can simply apply the skin as the portal default for subportal'ed applications.  

We already have a subportaltable specifying the SubPortal Alias ID, Subportal Skin,Subportal Container , Subportal CSS SubPortal Site Name, Slogan, Logo Image, Address, Phone and user defined fields.  Name space is SubPortal and a Skin Object was created tokenizing the insertion of alias specific information into existing skins.

  < %= SubPortalName %>    
  < %= SubPortalSlogan %>   
  < %= SubPortalSkinSel %>
  < %= SubPortalContainerSel %>
  < %= SubPortalColor %>
  < %= SubPortalImage %>

So... How do you suggest having this SmartSkin call the skin and container specified in the DB for the portal alias?
I see the preview logic ?SkinSrc=[G]Skins/DNN-Blue/Vertical Menu Full Width&ContainerSrc=[G]Containers/DNN-Blue/ Text Header - White Background.

For 3.x  we made core changes to skin.vb and default.aspx.vb listed below. Trying  to do the same again without modifying the core:   

Core changes to default.aspx.vb

[CODE]

        '**********************************
            'Begin Sub Portal Addtional Logic *
            '**********************************
            If Not Session("SubPortalID") Is Nothing Then
                'Debugging Logic
                Dim objEventLog As New Logging.EventLogController
                Dim objEventLogInfo As New Logging.EventLogInfo

                objEventLogInfo.AddProperty("SubPortal ID Found.  Number is:", CType(Session("SubPortalID"), String))

                If Not Session("SubPortalObject|Skin") Is Nothing Then

                    objEventLogInfo.AddProperty("SubPortal Skin Found.  Skin is:", CType(Session("SubPortalObject|Skin"), String))

                    If Not CType(Session("SubPortalObject|Skin"), String) = "||" Then ' None Selected
                        'Override Skin
                        Dim SubPortalSkin() As String = Split(CType(Session("SubPortalObject|Skin"), String), "|")
                        'Defintions
                        '(0) - Skin Location; G-Global or L-Local
                        '(1) - Skin Name
                        '(2) - Skin ASCX file name
                        Select Case SubPortalSkin(0)
                            Case "G" ' global
                                _portalSettings.ActiveTab.SkinPath = Global.HostPath & SkinInfo.RootSkin & "/" & SubPortalSkin(1) & "/"
                            Case "L" ' local
                                _portalSettings.ActiveTab.SkinPath = _portalSettings.UploadDirectory & SkinInfo.RootSkin & "/" & SubPortalSkin(1) & "/"
                        End Select
                        _portalSettings.ActiveTab.SkinSrc = SubPortalSkin(2)
                        ctlSkin = LoadSkin("~" & _portalSettings.ActiveTab.SkinPath.Remove(0, Len(Global.ApplicationPath)) & _portalSettings.ActiveTab.SkinSrc)
                    End If
                End If

                objEventLogInfo.LogPortalID = _portalSettings.PortalId
                objEventLogInfo.LogPortalName = _portalSettings.PortalName
                objEventLogInfo.LogTypeKey = "ADMIN_ container preview

[/CODE]

 
New Post
4/13/2007 12:08 PM
 

This is how I do it. All you need is the following code pasted into a file by itself.  Then you can name it something like "PortalAliasSwitcher.ascx" and put it in a skin folder along with the skins that you want it to load based based on the Urls.  Then go in and assign this file to the page, site, or host settings like you would normally do an individual skin.

[Code]

<%@ Control language="vb" AutoEventWireup="false" Explicit="True" %>

<div id="ControlPanel" runat="server" />

<asp:placeholder id="SkinPlaceholder" runat="server" />

< s c r i p t runat="server">
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    '**  Skincovered.com Portal Alias based skin switcher
    '**  Switches the skin depending on the Url used to access the site
    '**  Select this skin (PortalAliasSwitcher) as would any other skin in DotNetNuke
    '**  The code below will load a skin from the same folder depending on the Url
   
        Dim skin As String = ""
        Select CType(HttpContext.Current.Items("PortalSettings"),PortalSettings).PortalAlias.HTTPAlias.ToLower()
            Case "hr.mydomain.com":
                skin = "HumanResources.ascx"
            Case "it.mydomain.com":
                skin = "InformationServices.ascx"
            Case Else:
            'this skin will be loaded if no matches were made to the portal aliases above
                skin = "default.ascx"
        End Select
       
        'this line loads the actual skin.
        SkinPlaceholder.Controls.Add(LoadControl(skin))
    End Sub
</ s c r i p t>
[/Code]


DotNetNuke Modules from Snapsis.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Assign skin to portal aliasAssign skin to portal alias


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