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, ...Skinergy DNN SkinSkinergy DNN Skin
Previous
 
Next
New Post
8/11/2006 8:44 AM
 
Anyone know if this skin works on the 4.3.4?? Nik?
 
New Post
8/11/2006 10:39 AM
 

Alright, after some research and some editing, the short answer is NO, the Sknergy skin does NOT work in DNN 4.3.4. Not sure about previous 4.xx versions as I am only looking at the latest release.

The 1st issue is with the skinprefs.ascx control located in: \controls\Speerio\Skinergy\

Right around line 35, you'll see this procedure:

Sub InjectStyleSheet(ByVal cookieId As String, ByVal suffix As String, small As Image, medium As Image, large As Image)

The Image parameters need to be fully qualified due to a clash in namespaces. Edit it to this:

Sub InjectStyleSheet(ByVal cookieId As String, ByVal suffix As String, small As System.Web.UI.WebControls.Image, medium As System.Web.UI.WebControls.Image, large As System.Web.UI.WebControls.Image)

The 2nd issue is with the adminpanel.acsx control in the same location as above. The first line contains an invalid inherits statement:

Inherits="DotNetNuke.UI.ControlPanels.IconBar"

This object does not exist, in fact I could not find it anywhere at all in any of the dlls.

The solution is to simply comment out the two AdminPanel declarations in the Default.aspx file. There is one at the top, a register statement, and another a few lines down, the actual implementation.

Also remove the line containing the ControlPanel, DNN will inject the ontrol Panel automatically on your behalf.

Basically, at this point, Nik's AdminPanel is unusable in the current version. But if you perform the above steps, you can still use this great skin or use it as the basis for your own skin to use the great LayoutSize, FontSize, and ColorPrefs controls.

I'll continue researching the IconBar issue and keep you all posted. If anyone else has any info on where the IconBar control dissappeared to, please post your findings.

Enjoy! :)

 
New Post
8/24/2006 1:13 PM
 

I've found the old IconBar class in my DNN 3 installation. I'de simply copied it in the [app_code] directory renaming the class name to SpeerioIconBar. Then i've changed the class class specified in the first line of adminpanel.acsx from:

Inherits="DotNetNuke.UI.ControlPanels.IconBar"

to:  

Inherits="DotNetNuke.UI.ControlPanels.SpeerioIconBar"

and this work on my DNN 4.3.4 installation.
It's a very stupid workaround but it work and is pretty simple

Here is the code for SpeerioIconBar.vb

'

' DotNetNuke® - http://www.dotnetnuke.com

' Copyright (c) 2002-2005

' by Perpetual Motion Interactive Systems Inc. ( http://www.perpetualmotion.ca )

'

' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated

' documentation files (the "Software"), to deal in the Software without restriction, including without limitation

' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and

' to permit persons to whom the Software is furnished to do so, subject to the following conditions:

'

' The above copyright notice and this permission notice shall be included in all copies or substantial portions

' of the Software.

'

' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED

' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL

' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF

' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER

' DEALINGS IN THE SOFTWARE.

'

Imports DotNetNuke.Entities.Modules

Imports DotNetNuke.Entities.Modules.Definitions

Imports DotNetNuke.Entities.Tabs

Imports DotNetNuke.UI.Utilities

Namespace DotNetNuke.UI.ControlPanels

''' -----------------------------------------------------------------------------

''' <summary>

''' The IconBar ControlPanel provides an icon bar based Page/Module manager

''' </summary>

''' <returns></returns>

''' <remarks>

''' </remarks>

''' <history>

''' [cnurse] 10/06/2004 Updated to reflect design changes for Help, 508 support

''' and localisation

''' </history>

''' -----------------------------------------------------------------------------

Public MustInherit Class SpeerioIconBar

Inherits ControlPanelBase

#Region "Controls"

Protected imgAddTabIcon As System.Web.UI.WebControls.Image

Protected WithEvents cmdAddTabIcon As System.Web.UI.WebControls.LinkButton

Protected imgEditTabIcon As System.Web.UI.WebControls.Image

Protected WithEvents cmdEditTabIcon As System.Web.UI.WebControls.LinkButton

Protected imgDeleteTabIcon As System.Web.UI.WebControls.Image

Protected WithEvents cmdDeleteTabIcon As System.Web.UI.WebControls.LinkButton

Protected imgCopyTabIcon As System.Web.UI.WebControls.Image

Protected WithEvents cmdCopyTabIcon As System.Web.UI.WebControls.LinkButton

Protected imgPreviewTabIcon As System.Web.UI.WebControls.Image

Protected WithEvents cmdPreviewTabIcon As System.Web.UI.WebControls.LinkButton

Protected WithEvents cmdAddTab As System.Web.UI.WebControls.LinkButton

Protected WithEvents cmdEditTab As System.Web.UI.WebControls.LinkButton

Protected WithEvents cmdDeleteTab As System.Web.UI.WebControls.LinkButton

Protected WithEvents cmdCopyTab As System.Web.UI.WebControls.LinkButton

Protected WithEvents cmdPreviewTab As System.Web.UI.WebControls.LinkButton

'Protected lblAddModule As System.Web.UI.WebControls.Label

Protected WithEvents optModuleType As System.Web.UI.WebControls.RadioButtonList

Protected lblModule As System.Web.UI.WebControls.Label

Protected WithEvents cboTabs As System.Web.UI.WebControls.DropDownList

Protected cboDesktopModules As System.Web.UI.WebControls.DropDownList

Protected lblPane As System.Web.UI.WebControls.Label

Protected cboPanes As System.Web.UI.WebControls.DropDownList

Protected lblTitle As System.Web.UI.WebControls.Label

Protected cboModules As System.Web.UI.WebControls.DropDownList

Protected txtTitle As System.Web.UI.WebControls.TextBox

Protected lblAlign As System.Web.UI.WebControls.Label

Protected cboAlign As System.Web.UI.WebControls.DropDownList

Protected imgAddModuleIcon As System.Web.UI.WebControls.Image

Protected WithEvents cmdAddModuleIcon As System.Web.UI.WebControls.LinkButton

Protected WithEvents cmdAddModule As System.Web.UI.WebControls.LinkButton

Protected lblPermission As System.Web.UI.WebControls.Label

Protected cboPermission As System.Web.UI.WebControls.DropDownList

Protected lblPosition As System.Web.UI.WebControls.Label

Protected cboPosition As System.Web.UI.WebControls.DropDownList

Protected lblCommonTasks As System.Web.UI.WebControls.Label

Protected imgWizardIcon As System.Web.UI.WebControls.Image

Protected WithEvents cmdWizardIcon As System.Web.UI.WebControls.LinkButton

Protected imgSiteIcon As System.Web.UI.WebControls.Image

Protected WithEvents cmdSiteIcon As System.Web.UI.WebControls.LinkButton

Protected imgUsersIcon As System.Web.UI.WebControls.Image

Protected WithEvents cmdUsersIcon As System.Web.UI.WebControls.LinkButton

Protected imgFilesIcon As System.Web.UI.WebControls.Image

Protected WithEvents cmdFilesIcon As System.Web.UI.WebControls.LinkButton

Protected imgHelpIcon As System.Web.UI.WebControls.Image

Protected cmdHelpIcon As System.Web.UI.WebControls.HyperLink

Protected WithEvents cmdWizard As System.Web.UI.WebControls.LinkButton

Protected WithEvents cmdSite As System.Web.UI.WebControls.LinkButton

Protected WithEvents cmdUsers As System.Web.UI.WebControls.LinkButton

Protected WithEvents cmdFiles As System.Web.UI.WebControls.LinkButton

Protected WithEvents lblPageFunctions As System.Web.UI.WebControls.Label

Protected WithEvents chkVisible As System.Web.UI.WebControls.CheckBox

Protected cmdHelp As System.Web.UI.WebControls.HyperLink

#End Region

#Region "Enums"

Private Enum ViewPermissionType

View = 0

Edit = 1

End Enum

#End Region

#Region "Private Methods"

Private Function BuildURL(ByVal PortalID As Integer, ByVal FriendlyName As String) As String

Dim strURL As String = "~/" & glbDefaultPage

Dim objModules As New ModuleController

Dim objModule As ModuleInfo = objModules.GetModuleByDefinition(PortalID, FriendlyName)

If Not objModule Is Nothing Then

strURL = NavigateURL(objModule.TabID)

End If

Return strURL

End Function

Private Sub BindData()

Select Case optModuleType.SelectedItem.Value

Case "0" ' new module

cboTabs.Visible = False

cboModules.Visible = False

cboDesktopModules.Visible = True

txtTitle.Visible = True

lblModule.Text = Services.Localization.Localization.GetString("Module", Me.LocalResourceFile)

lblTitle.Text = Services.Localization.Localization.GetString("Title", Me.LocalResourceFile)

cboPermission.Enabled = True

Dim objDesktopModules As New DesktopModuleController

cboDesktopModules.DataSource = objDesktopModules.GetDesktopModulesByPortal(PortalSettings.PortalId)

cboDesktopModules.DataBind()

cboDesktopModules.Items.Insert(0, New ListItem("<" + Services.Localization.Localization.GetString("SelectModule", Me.LocalResourceFile) + ">", "-1"))

Case "1" ' existing module

cboTabs.Visible = True

cboModules.Visible = True

cboDesktopModules.Visible = False

txtTitle.Visible = False

lblModule.Text = Services.Localization.Localization.GetString("Tab", Me.LocalResourceFile)

lblTitle.Text = Services.Localization.Localization.GetString("Module", Me.LocalResourceFile)

cboPermission.Enabled = False

Dim arrTabs As New ArrayList

Dim objTab As TabInfo

Dim arrPortalTabs As ArrayList = GetPortalTabs(PortalSettings.DesktopTabs, True, True)

For Each objTab In arrPortalTabs

If objTab.TabID = -1 Then

' <none specified>

objTab.TabName = "<" & Services.Localization.Localization.GetString("SelectPage", Me.LocalResourceFile) & ">"

arrTabs.Add(objTab)

Else

If objTab.TabID <> PortalSettings.ActiveTab.TabID Then

If PortalSecurity.IsInRoles(objTab.AuthorizedRoles) Then

arrTabs.Add(objTab)

End If

End If

End If

Next

cboTabs.DataSource = arrTabs

cboTabs.DataBind()

End Select

End Sub

#End Region

#Region "Event Handlers"

''' -----------------------------------------------------------------------------

''' <summary>

''' Page_Load runs when the control is loaded.

''' </summary>

''' <returns></returns>

''' <remarks>

''' </remarks>

''' <history>

''' [cnurse] 10/06/2004 Updated to reflect design changes for Help, 508 support

''' and localisation

''' </history>

''' -----------------------------------------------------------------------------

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Try

If Not Page.IsPostBack Then

' localization

lblPageFunctions.Text = Services.Localization.Localization.GetString("PageFunctions", Me.LocalResourceFile)

optModuleType.Items.FindByValue("0").Selected = True

lblCommonTasks.Text = Services.Localization.Localization.GetString("CommonTasks", Me.LocalResourceFile)

imgAddTabIcon.AlternateText = Services.Localization.Localization.GetString("AddTab.AlternateText", Me.LocalResourceFile)

cmdAddTab.Text = Services.Localization.Localization.GetString("AddTab", Me.LocalResourceFile)

imgEditTabIcon.AlternateText = Services.Localization.Localization.GetString("EditTab.AlternateText", Me.LocalResourceFile)

cmdEditTab.Text = Services.Localization.Localization.GetString("EditTab", Me.LocalResourceFile)

imgDeleteTabIcon.AlternateText = Services.Localization.Localization.GetString("DeleteTab.AlternateText", Me.LocalResourceFile)

cmdDeleteTab.Text = Services.Localization.Localization.GetString("DeleteTab", Me.LocalResourceFile)

imgCopyTabIcon.AlternateText = Services.Localization.Localization.GetString("CopyTab.AlternateText", Me.LocalResourceFile)

cmdCopyTab.Text = Services.Localization.Localization.GetString("CopyTab", Me.LocalResourceFile)

imgPreviewTabIcon.AlternateText = Services.Localization.Localization.GetString("PreviewTab.AlternateText", Me.LocalResourceFile)

cmdPreviewTab.Text = Services.Localization.Localization.GetString("PreviewTab", Me.LocalResourceFile)

If Not Request.Cookies("_Tab_Admin_Preview" & PortalSettings.PortalId.ToString) Is Nothing Then

Dim objPreview As HttpCookie

objPreview = Request.Cookies("_Tab_Admin_Preview" & PortalSettings.PortalId.ToString)

If objPreview.Value = "True" Then

imgPreviewTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_previewtab_on.gif"

End If

End If

lblModule.Text = Services.Localization.Localization.GetString("Module", Me.LocalResourceFile)

lblPane.Text = Services.Localization.Localization.GetString("Pane", Me.LocalResourceFile)

lblTitle.Text = Services.Localization.Localization.GetString("Title", Me.LocalResourceFile)

lblAlign.Text = Services.Localization.Localization.GetString("Align", Me.LocalResourceFile)

imgAddModuleIcon.AlternateText = Services.Localization.Localization.GetString("AddModule.AlternateText", Me.LocalResourceFile)

cmdAddModule.Text = Services.Localization.Localization.GetString("AddModule", Me.LocalResourceFile)

imgWizardIcon.AlternateText = Services.Localization.Localization.GetString("Wizard.AlternateText", Me.LocalResourceFile)

cmdWizard.Text = Services.Localization.Localization.GetString("Wizard", Me.LocalResourceFile)

imgSiteIcon.AlternateText = Services.Localization.Localization.GetString("Site.AlternateText", Me.LocalResourceFile)

cmdSite.Text = Services.Localization.Localization.GetString("Site", Me.LocalResourceFile)

imgUsersIcon.AlternateText = Services.Localization.Localization.GetString("Users.AlternateText", Me.LocalResourceFile)

cmdUsers.Text = Services.Localization.Localization.GetString("Users", Me.LocalResourceFile)

imgFilesIcon.AlternateText = Services.Localization.Localization.GetString("Files.AlternateText", Me.LocalResourceFile)

cmdFiles.Text = Services.Localization.Localization.GetString("Files", Me.LocalResourceFile)

imgHelpIcon.AlternateText = Services.Localization.Localization.GetString("Help.AlternateText", Me.LocalResourceFile)

cmdHelp.Text = Services.Localization.Localization.GetString("Help", Me.LocalResourceFile)

If PortalSettings.ActiveTab.IsAdminTab Then

imgEditTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_edittab_bw.gif"

cmdEditTab.Enabled = False

cmdEditTabIcon.Enabled = False

imgDeleteTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_deletetab_bw.gif"

cmdDeleteTab.Enabled = False

cmdDeleteTabIcon.Enabled = False

imgCopyTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_copytab_bw.gif"

cmdCopyTab.Enabled = False

cmdCopyTabIcon.Enabled = False

Else

ClientAPI.AddButtonConfirm(cmdDeleteTab, Services.Localization.Localization.GetString("DeleteTabConfirm", Me.LocalResourceFile))

ClientAPI.AddButtonConfirm(cmdDeleteTabIcon, Services.Localization.Localization.GetString("DeleteTabConfirm", Me.LocalResourceFile))

End If

If IsAdminControl() Then

cmdAddModule.Enabled = False

imgAddModuleIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_addmodule_bw.gif"

cmdAddModuleIcon.Enabled = False

End If

If PortalSecurity.IsInRole(PortalSettings.AdministratorRoleName) = False Then

imgWizardIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_wizard_bw.gif"

cmdWizard.Enabled = False

cmdWizardIcon.Enabled = False

imgSiteIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_site_bw.gif"

cmdSite.Enabled = False

cmdSiteIcon.Enabled = False

imgUsersIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_users_bw.gif"

cmdUsers.Enabled = False

cmdUsersIcon.Enabled = False

imgFilesIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_files_bw.gif"

cmdFiles.Enabled = False

cmdFilesIcon.Enabled = False

End If

BindData()

If PortalSettings.ActiveTab.IsAdminTab = False And IsAdminControl() = False Then

Dim intItem As Integer

For intItem = 0 To PortalSettings.ActiveTab.Panes.Count - 1

cboPanes.Items.Add(Convert.ToString(PortalSettings.ActiveTab.Panes(intItem)))

Next intItem

Else

cboPanes.Items.Add(glbDefaultPane)

End If

If Not cboPanes.Items.FindByValue(glbDefaultPane) Is Nothing Then

cboPanes.Items.FindByValue(glbDefaultPane).Selected = True

End If

If cboPermission.Items.Count > 0 Then

cboPermission.SelectedIndex = 0 ' view

End If

If cboAlign.Items.Count > 0 Then

cboAlign.SelectedIndex = 0 ' left

End If

If cboPosition.Items.Count > 0 Then

cboPosition.SelectedIndex = 1 ' bottom

End If

If Convert.ToString(PortalSettings.HostSettings("HelpURL")) <> "" Then

cmdHelp.NavigateUrl = FormatHelpUrl(Convert.ToString(PortalSettings.HostSettings("HelpURL")), PortalSettings, "")

cmdHelpIcon.NavigateUrl = cmdHelp.NavigateUrl

cmdHelp.Enabled = True

cmdHelpIcon.Enabled = True

Else

cmdHelp.Enabled = False

cmdHelpIcon.Enabled = False

End If

End If

Catch exc As Exception 'Module failed to load

ProcessModuleLoadException(Me, exc)

End Try

End Sub

''' -----------------------------------------------------------------------------

''' <summary>

''' PageFunctions_Click runs when any button in the Page toolbar is clicked

''' </summary>

''' <returns></returns>

''' <remarks>

''' </remarks>

''' <history>

''' [cnurse] 10/06/2004 Updated to reflect design changes for Help, 508 support

''' and localisation

''' </history>

''' -----------------------------------------------------------------------------

Private Sub PageFunctions_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdAddTab.Click, cmdAddTabIcon.Click, cmdEditTab.Click, cmdEditTabIcon.Click, cmdDeleteTab.Click, cmdDeleteTabIcon.Click, cmdCopyTab.Click, cmdCopyTabIcon.Click, cmdPreviewTab.Click, cmdPreviewTabIcon.Click

Try

Dim URL As String = Request.RawUrl

Select Case CType(sender, LinkButton).ID

Case "cmdAddTab", "cmdAddTabIcon"

URL = NavigateURL("Tab")

Case "cmdEditTab", "cmdEditTabIcon"

URL = NavigateURL(PortalSettings.ActiveTab.TabID, "Tab", "action=edit")

Case "cmdDeleteTab", "cmdDeleteTabIcon"

URL = NavigateURL(PortalSettings.ActiveTab.TabID, "Tab", "action=delete")

Case "cmdCopyTab", "cmdCopyTabIcon"

URL = NavigateURL(PortalSettings.ActiveTab.TabID, "Tab", "action=copy")

Case "cmdPreviewTab", "cmdPreviewTabIcon"

Dim objPreview As HttpCookie

If Request.Cookies("_Tab_Admin_Preview" & PortalSettings.PortalId.ToString) Is Nothing Then

objPreview = New HttpCookie("_Tab_Admin_Preview" & PortalSettings.PortalId.ToString)

objPreview.Value = "False"

Response.AppendCookie(objPreview)

End If

objPreview = Request.Cookies("_Tab_Admin_Preview" & PortalSettings.PortalId.ToString)

If objPreview.Value = "True" Then

objPreview.Value = "False"

Else

objPreview.Value = "True"

End If

Response.SetCookie(objPreview)

End Select

Response.Redirect(URL, True)

Catch exc As Exception 'Module failed to load

ProcessModuleLoadException(Me, exc)

End Try

End Sub

''' -----------------------------------------------------------------------------

''' <summary>

''' CommonTasks_Click runs when any button in the Common Tasks toolbar is clicked

''' </summary>

''' <returns></returns>

''' <remarks>

''' </remarks>

''' <history>

''' [cnurse] 10/06/2004 Updated to reflect design changes for Help, 508 support

''' and localisation

''' </history>

''' -----------------------------------------------------------------------------

Private Sub CommonTasks_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdWizard.Click, cmdWizardIcon.Click, cmdSite.Click, cmdSiteIcon.Click, cmdUsers.Click, cmdUsersIcon.Click, cmdFiles.Click, cmdFilesIcon.Click

Try

Dim URL As String = Request.RawUrl

Select Case CType(sender, LinkButton).ID

Case "cmdWizard", "cmdWizardIcon"

URL = BuildURL(PortalSettings.PortalId, "Site Wizard")

Case "cmdSite", "cmdSiteIcon"

URL = BuildURL(PortalSettings.PortalId, "Site Settings")

Case "cmdUsers", "cmdUsersIcon"

URL = BuildURL(PortalSettings.PortalId, "User Accounts")

Case "cmdFiles", "cmdFilesIcon"

URL = BuildURL(PortalSettings.PortalId, "File Manager")

End Select

Response.Redirect(URL, True)

Catch exc As Exception 'Module failed to load

ProcessModuleLoadException(Me, exc)

End Try

End Sub

''' -----------------------------------------------------------------------------

''' <summary>

''' AddModule_Click runs when the Add Module Icon or text button is clicked

''' </summary>

''' <returns></returns>

''' <remarks>

''' </remarks>

''' <history>

''' [cnurse] 10/06/2004 Updated to reflect design changes for Help, 508 support

''' and localisation

''' [vmasanas] 01/07/2005 Modified to add view perm. to all roles with edit perm.

''' </history>

''' -----------------------------------------------------------------------------

Private Sub AddModule_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdAddModule.Click, cmdAddModuleIcon.Click

Try

Dim objTabPermissions As Security.Permissions.TabPermissionCollection

objTabPermissions = PortalSettings.ActiveTab.TabPermissions

Dim objPermissionController As New Security.Permissions.PermissionController

Dim objEventLog As New Services.Log.EventLog.EventLogController

Dim objRoles As New Security.Roles.RoleController

Dim objRole As Security.Roles.RoleInfo

Dim UserId As Integer = -1

If Request.IsAuthenticated Then

Dim objUserInfo As UserInfo = UserController.GetCurrentUserInfo

UserId = objUserInfo.UserID

End If

Select Case optModuleType.SelectedItem.Value

Case "0" ' new module

If cboDesktopModules.SelectedIndex > 0 Then

Dim objModuleDefinitions As New ModuleDefinitionController

Dim objModuleDefinition As ModuleDefinitionInfo

Dim intIndex As Integer

Dim arrModuleDefinitions As ArrayList = objModuleDefinitions.GetModuleDefinitions(Integer.Parse(cboDesktopModules.SelectedItem.Value))

For intIndex = 0 To arrModuleDefinitions.Count - 1

objModuleDefinition = CType(arrModuleDefinitions(intIndex), ModuleDefinitionInfo)

Dim objModule As New ModuleInfo

objModule.Initialize(PortalSettings.PortalId)

objModule.PortalID = PortalSettings.PortalId

objModule.TabID = PortalSettings.ActiveTab.TabID

If Not cboPosition.SelectedItem Is Nothing Then

objModule.ModuleOrder = Integer.Parse(cboPosition.SelectedItem.Value)

Else

objModule.ModuleOrder = -1 ' bottom

End If

If txtTitle.Text <> "" Then

objModule.ModuleTitle = txtTitle.Text

Else

objModule.ModuleTitle = objModuleDefinition.FriendlyName

End If

objModule.PaneName = cboPanes.SelectedItem.Text

objModule.ModuleDefID = objModuleDefinition.ModuleDefID

objModule.CacheTime = objModuleDefinition.DefaultCacheTime

' initialize module permissions

Dim objModulePermissions As New Security.Permissions.ModulePermissionCollection

objModule.ModulePermissions = objModulePermissions

objModule.InheritViewPermissions = False

' get the default module view permissions

Dim arrSystemModuleViewPermissions As ArrayList = objPermissionController.GetPermissionByCodeAndKey("SYSTEM_MODULE_DEFINITION", "VIEW")

' get the permissions from the page

Dim objTabPermission As Security.Permissions.TabPermissionInfo

For Each objTabPermission In objTabPermissions

' get the system module permissions for the permissionkey

Dim arrSystemModulePermissions As ArrayList = objPermissionController.GetPermissionByCodeAndKey("SYSTEM_MODULE_DEFINITION", objTabPermission.PermissionKey)

Dim j As Integer

' loop through the system module permissions

For j = 0 To arrSystemModulePermissions.Count - 1

' create the module permission

Dim objModulePermission As New Security.Permissions.ModulePermissionInfo

Dim objSystemModulePermission As Security.Permissions.PermissionInfo

objSystemModulePermission = CType(arrSystemModulePermissions(j), Security.Permissions.PermissionInfo)

objModulePermission.ModuleID = objModule.ModuleID

objModulePermission.PermissionID = objSystemModulePermission.PermissionID

objModulePermission.RoleID = objTabPermission.RoleID

objModulePermission.PermissionKey = objSystemModulePermission.PermissionKey

objModulePermission.AllowAccess = False

' allow access to the permission if the role is in the list of administrator roles for the page

objRole = objRoles.GetRole(objModulePermission.RoleID, PortalSettings.PortalId)

If Not objRole Is Nothing Then

If PortalSettings.ActiveTab.AdministratorRoles.IndexOf(objRole.RoleName) <> -1 Then

objModulePermission.AllowAccess = True

End If

End If

' add the permission to the collection

If Not objModulePermissions.Contains(objModulePermission) And objModulePermission.AllowAccess Then

objModulePermissions.Add(objModulePermission)

End If

' ensure that every EDIT permission which allows access also provides VIEW permission

If objModulePermission.PermissionKey = "EDIT" And objModulePermission.AllowAccess Then

Dim objModuleViewperm As New Security.Permissions.ModulePermissionInfo

objModuleViewperm.ModuleID = objModulePermission.ModuleID

objModuleViewperm.PermissionID = CType(arrSystemModuleViewPermissions(0), Security.Permissions.PermissionInfo).PermissionID

objModuleViewperm.RoleID = objModulePermission.RoleID

objModuleViewperm.PermissionKey = "VIEW"

objModuleViewperm.AllowAccess = True

If Not objModulePermissions.Contains(objModuleViewperm) Then

objModulePermissions.Add(objModuleViewperm)

End If

End If

Next

Next

If Not cboPermission.SelectedItem Is Nothing Then

Select Case Integer.Parse(cboPermission.SelectedItem.Value)

Case ViewPermissionType.View

objModule.InheritViewPermissions = True

Case ViewPermissionType.Edit

objModule.ModulePermissions = objModulePermissions

End Select

Else

objModule.InheritViewPermissions = True

End If

objModule.AllTabs = False

objModule.Alignment = cboAlign.SelectedItem.Value

Dim objModules As New ModuleController

objModules.AddModule(objModule)

objEventLog.AddLog(objModule, PortalSettings, UserId, "", Services.Log.EventLog.EventLogController.EventLogType.MODULE_CREATED)

Next

' Redirect to the same page to pick up changes

Response.Redirect(Request.RawUrl, True)

End If

Case "1" ' existing module

If Not cboModules.SelectedItem Is Nothing Then

Dim objModules As New ModuleController

Dim objModule As ModuleInfo = objModules.GetModule(Integer.Parse(cboModules.SelectedItem.Value), Integer.Parse(cboTabs.SelectedItem.Value))

If Not objModule Is Nothing Then

objModule.TabID = PortalSettings.ActiveTab.TabID

If Not cboPosition.SelectedItem Is Nothing Then

objModule.ModuleOrder = Integer.Parse(cboPosition.SelectedItem.Value)

Else

objModule.ModuleOrder = -1 ' bottom

End If

objModule.PaneName = cboPanes.SelectedItem.Text

objModule.Alignment = cboAlign.SelectedItem.Value

objModules.AddModule(objModule)

objEventLog.AddLog(objModule, PortalSettings, UserId, "", Services.Log.EventLog.EventLogController.EventLogType.MODULE_CREATED)

End If

' Redirect to the same page to pick up changes

Response.Redirect(Request.RawUrl, True)

End If

End Select

Catch exc As Exception 'Module failed to load

ProcessModuleLoadException(Me, exc)

End Try

End Sub

Private Sub optModuleType_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles optModuleType.SelectedIndexChanged

BindData()

End Sub

Private Sub cboTabs_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboTabs.SelectedIndexChanged

Dim objModules As New ModuleController

Dim arrModules As New ArrayList

Dim objModule As ModuleInfo

Dim arrPortalModules As ArrayList = objModules.GetPortalTabModules(PortalSettings.PortalId, Integer.Parse(cboTabs.SelectedItem.Value))

For Each objModule In arrPortalModules

If PortalSecurity.IsInRoles(objModule.AuthorizedEditRoles) = True And objModule.IsDeleted = False Then

arrModules.Add(objModule)

End If

Next

cboModules.DataSource = arrModules

cboModules.DataBind()

End Sub

#End Region

#Region " Web Form Designer Generated Code "

 

<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init

'CODEGEN: This method call is required by the Web Form Designer

'Do not modify it using the code editor.

InitializeComponent()

Me.ID = "IconBar.ascx"

End Sub

#End Region

End Class

End Namespace

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Skinergy DNN SkinSkinergy DNN 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