Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Re: need help to compile
need help to compile
Last post 07-16-2009, 4:17 AM by
greg1804
. 2 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
07-13-2009, 1:31 AM
53917
greg1804
Joined on 07-10-2009
Posts 5
need help to compile
Reply
Quote
I tried to compile a modified CEHtmlEditorProvider.vb under VS2008 Express and I get some error issue. Does somebody could try to compile that for me and tell me which version I should use ???
' ' DotNetNuke - http://www.dotnetnuke.com ' Copyright (c) 2002-2004 ' by Shaun Walker ( sales@perpetualmotion.ca ) of 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 System.IO Imports System.Web Imports DotNetNuke.Entities.Portals Imports DotNetNuke.Common Imports DotNetNuke.Common.Utilities Imports DotNetNuke.Framework.Providers Imports DotNetNuke.Security Imports System.Xml Imports CuteEditor Namespace DotNetNuke.HtmlEditor ''' ----------------------------------------------------------------------------- ''' Class: TextEditor ''' Project: Provider.CEHtmlEditorProvider ''' ----------------------------------------------------------------------------- ''' <summary> ''' CEHtmlEditorProvider implements an Html Editor Provider for CE (CuteEditor) ''' </summary> ''' <remarks> ''' </remarks> ''' <history> ''' [cnurse] 12/13/2004 Documented ''' </history> ''' ----------------------------------------------------------------------------- Public Class CEHtmlEditorProvider Inherits DotNetNuke.Modules.HTMLEditorProvider.HtmlEditorProvider Private WithEvents cntlCE As New CuteEditor.Editor Private Const ProviderType As String = "htmlEditor" Private _AdditionalToolbars As ArrayList Private _RootImageDirectory As String = String.Empty Private _ControlID As String Private _providerConfiguration As ProviderConfiguration = ProviderConfiguration.GetProviderConfiguration(ProviderType) Private _portalSettings As PortalSettings = DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings Private objProvider As Provider = CType(_providerConfiguration.Providers(_providerConfiguration.DefaultProvider), Provider) Private _providerPath As String = objProvider.Attributes("providerPath") Private _styles As ArrayList 'Shared Properties Private _AccessKey As String = "" Private _ActiveTab As String = "" Private _AutoParseClasses As Boolean = True Private _BackColor As System.Drawing.Color = System.Drawing.Color.Empty Private _BorderColor As System.Drawing.Color = System.Drawing.Color.Empty Private _BorderWidth As System.Web.UI.WebControls.Unit = System.Web.UI.WebControls.Unit.Empty Private _BorderStyle As System.Web.UI.WebControls.BorderStyle = System.Web.UI.WebControls.BorderStyle.Solid Private _BreakElement As String = "div" Private _CodeViewTemplateItemList As String = "" Private _ConfigurationPath As String = "" Private _CultureType As String = "" Private _CustomCulture As String = "" Private _DisableAutoFormatting As Boolean = False Private _DisableClassList As String = "ControlPanel,FileManager,FileManager_Header,Wizard,WizardBody,WizardHelpText,ModuleTitle_MenuArrow,ModuleTitle_RootMenuArrow,MainMenu_MenuArrow,MainMenu_RootMenuArrow,WizardHelp" Private _EditorBodyStyle As String = "" Private _EditorOnPaste As String = "ConfirmWord" Private _EditorWysiwygModeCss As String = "" Private _EncodeHiddenValue As Boolean = True Private _FullPage As Boolean = False Private _maxhtmllength As Integer = 0 Private _maxtextlength As Integer = 0 Private _PrintFullWebPage As Boolean = False Private _RemoveTBODYTag As Boolean = False Private _RenderRichDropDown As Boolean = True Private _ShowCodeViewToolBar As Boolean = True Private _EnableObjectResizing As Boolean = True Private _ShowDecreaseButton As Boolean = True Private _ShowEnlargeButton As Boolean = True Private _ShowToolBar As Boolean = True Private _TabIndex As System.Int16 = 0 Private _ToggleBorder As Boolean = True Private _EnableClientScript As Boolean = True Private _EnableAntiSpamEmailEncoder As Boolean = False Private _UseHTMLEntities As Boolean = True Private _userelativelinks As Boolean = True Private _UseSimpleAmpersand As Boolean = False Private _UseFontTags As Boolean = False Private _HelpUrl As String = "" Private _usednnrootimagedirectory As Boolean = True Private _SeparateFoldersByRole As Boolean = False Private _UseDNNRoleASFileNamePrefix As Boolean = True Private _UseDNNDefaultWidth As Boolean = False Private _URLType As String = "" Private _ShowTagSelector As Boolean = True 'Properties by role Private _AllowPasteHtml As Boolean = True Private _AutoConfigure As String = "" Private _DisableItemList As String = "" Private _EnableContextMenu As Boolean = True Private _EnableStripScriptTags As Boolean = True Private _ConvertHTMLTagstoLowercase As Boolean = True Private _ReadOnly As Boolean = False Private _ShowHtmlMode As Boolean = True Private _ShowPreviewMode As Boolean = True Private _ThemeType As String = "Office2003_BlueTheme" Private _SecurityPolicyFile As String = "" Private _TemplateItemList As String = "" Private _ShowBottomBar As Boolean = True #Region " Provider " Private Sub SetCEGeneralProperties() If Not objProvider.Attributes("AccessKey") Is Nothing Then _AccessKey = objProvider.Attributes("AccessKey") cntlCE.AccessKey = _AccessKey End If If Not objProvider.Attributes("ActiveTab") Is Nothing Then _ActiveTab = objProvider.Attributes("ActiveTab") Select Case _ActiveTab Case "Code" cntlCE.ActiveTab = TabType.Code Case "Edit" cntlCE.ActiveTab = TabType.Edit Case "View" cntlCE.ActiveTab = TabType.View End Select End If If Not Null.IsNull(objProvider.Attributes("AutoParseClasses")) Then _AutoParseClasses = Boolean.Parse(objProvider.Attributes("AutoParseClasses")) cntlCE.AutoParseClasses = _AutoParseClasses End If If Not Null.IsNull(objProvider.Attributes("BackColor")) Then _BackColor = System.Drawing.Color.FromName(objProvider.Attributes("BackColor")) cntlCE.BackColor = _BackColor End If If Not Null.IsNull(objProvider.Attributes("BorderColor")) Then _BorderColor = System.Drawing.Color.FromName(objProvider.Attributes("BorderColor")) cntlCE.BorderColor = _BorderColor End If If Not Null.IsNull(objProvider.Attributes("BorderWidth")) Then _BorderWidth = System.Web.UI.WebControls.Unit.Parse(objProvider.Attributes("BorderWidth")) cntlCE.BorderWidth = _BorderWidth End If If Not Null.IsNull(objProvider.Attributes("BreakElement")) Then _BreakElement = objProvider.Attributes("BreakElement") Select Case _BreakElement Case "div" cntlCE.BreakElement = BreakElement.Div Case "br" cntlCE.BreakElement = BreakElement.Br Case "p" cntlCE.BreakElement = BreakElement.P End Select End If If Not Null.IsNull(objProvider.Attributes("CodeViewTemplateItemList")) Then _CodeViewTemplateItemList = objProvider.Attributes("CodeViewTemplateItemList") cntlCE.CodeViewTemplateItemList = _CodeViewTemplateItemList End If If Not objProvider.Attributes("CultureType") Is Nothing Then _CultureType = objProvider.Attributes("CultureType") Select Case _CultureType Case "Server" cntlCE.CultureType = CultureType.Server Case "Client" cntlCE.CultureType = CultureType.Client End Select End If If Not Null.IsNull(objProvider.Attributes("CustomCulture")) Then _CustomCulture = objProvider.Attributes("CustomCulture") cntlCE.CustomCulture = _CustomCulture End If If Not Null.IsNull(objProvider.Attributes("DisableAutoFormatting")) Then _DisableAutoFormatting = Boolean.Parse(objProvider.Attributes("DisableAutoFormatting")) cntlCE.DisableAutoFormatting = _DisableAutoFormatting End If If Not Null.IsNull(objProvider.Attributes("DisableClassList")) Then _DisableClassList = objProvider.Attributes("DisableClassList") End If cntlCE.DisableClassList = _DisableClassList If Not Null.IsNull(objProvider.Attributes("EditorBodyStyle")) Then _EditorBodyStyle = objProvider.Attributes("EditorBodyStyle") cntlCE.EditorBodyStyle = _EditorBodyStyle End If If Not Null.IsNull(objProvider.Attributes("EditorWysiwygModeCss")) Then _EditorWysiwygModeCss = objProvider.Attributes("EditorWysiwygModeCss") End If 'initialize the control If _EditorWysiwygModeCss = "" Then Dim s1, s2, s3, s4 As String s1 = Common.Globals.HostPath & "default.css" 'default css s2 = PortalSettings.ActiveTab.SkinPath & "skin.css" 'skin css s3 = (PortalSettings.ActiveTab.SkinSrc).Substring(0, PortalSettings.ActiveTab.SkinSrc.LastIndexOf("/")) & "/skin.css" s4 = PortalSettings.HomeDirectory & "portal.css" 'portal stylesheet If File.Exists(HttpContext.Current.Server.MapPath(s1)) Then _EditorWysiwygModeCss = s1 End If If File.Exists(HttpContext.Current.Server.MapPath(s2)) Then _EditorWysiwygModeCss = _EditorWysiwygModeCss & "," & s2 End If If File.Exists(HttpContext.Current.Server.MapPath(s3)) Then _EditorWysiwygModeCss = _EditorWysiwygModeCss & "," & s3 End If If File.Exists(HttpContext.Current.Server.MapPath(s4)) Then _EditorWysiwygModeCss = _EditorWysiwygModeCss & "," & s4 End If End If cntlCE.EditorWysiwygModeCss = _EditorWysiwygModeCss If Not Null.IsNull(objProvider.Attributes("EncodeHiddenValue")) Then _EncodeHiddenValue = Boolean.Parse(objProvider.Attributes("EncodeHiddenValue")) cntlCE.EncodeHiddenValue = _EncodeHiddenValue End If If Not Null.IsNull(objProvider.Attributes("FullPage")) Then _FullPage = Boolean.Parse(objProvider.Attributes("FullPage")) cntlCE.FullPage = _FullPage End If If Not Null.IsNull(objProvider.Attributes("MaxHTMLLength")) Then _maxhtmllength = Integer.Parse(objProvider.Attributes("MaxHTMLLength")) cntlCE.MaxHTMLLength = _maxhtmllength End If If Not Null.IsNull(objProvider.Attributes("MaxTextLength")) Then _maxtextlength = Integer.Parse(objProvider.Attributes("MaxTextLength")) cntlCE.MaxTextLength = _maxtextlength End If If Not Null.IsNull(objProvider.Attributes("PrintFullWebPage")) Then _PrintFullWebPage = Boolean.Parse(objProvider.Attributes("PrintFullWebPage")) cntlCE.PrintFullWebPage = _PrintFullWebPage End If If Not Null.IsNull(objProvider.Attributes("RemoveTBODYTag")) Then _RemoveTBODYTag = Boolean.Parse(objProvider.Attributes("RemoveTBODYTag")) cntlCE.RemoveTBODYTag = _RemoveTBODYTag End If If Not Null.IsNull(objProvider.Attributes("RenderRichDropDown")) Then _RenderRichDropDown = Boolean.Parse(objProvider.Attributes("RenderRichDropDown")) cntlCE.RenderRichDropDown = _RenderRichDropDown End If If Not Null.IsNull(objProvider.Attributes("ShowCodeViewToolBar")) Then _ShowCodeViewToolBar = Boolean.Parse(objProvider.Attributes("ShowCodeViewToolBar")) cntlCE.ShowCodeViewToolBar = _ShowCodeViewToolBar End If If Not objProvider.Attributes("EnableObjectResizing") Is Nothing Then _EnableObjectResizing = Boolean.Parse(objProvider.Attributes("EnableObjectResizing")) cntlCE.EnableObjectResizing = _EnableObjectResizing End If If Not Null.IsNull(objProvider.Attributes("ShowDecreaseButton")) Then _ShowDecreaseButton = Boolean.Parse(objProvider.Attributes("ShowDecreaseButton")) cntlCE.ShowDecreaseButton = _ShowDecreaseButton End If If Not Null.IsNull(objProvider.Attributes("ShowEnlargeButton")) Then _ShowEnlargeButton = Boolean.Parse(objProvider.Attributes("ShowEnlargeButton")) cntlCE.ShowEnlargeButton = _ShowEnlargeButton End If If Not Null.IsNull(objProvider.Attributes("ShowToolBar")) Then _ShowToolBar = Boolean.Parse(objProvider.Attributes("ShowToolBar")) cntlCE.ShowToolBar = _ShowToolBar End If If Not Null.IsNull(objProvider.Attributes("TabIndex")) Then _TabIndex = Short.Parse(objProvider.Attributes("TabIndex")) cntlCE.TabIndex = _TabIndex End If If Not Null.IsNull(objProvider.Attributes("ThemeType")) Then _ThemeType = objProvider.Attributes("ThemeType") Select Case _ThemeType Case "Office2003_BlueTheme" cntlCE.ThemeType = ThemeType.Office2003_BlueTheme Case "Office2003" cntlCE.ThemeType = ThemeType.Office2003 Case "OfficeXP" cntlCE.ThemeType = ThemeType.OfficeXP Case "Office2000" cntlCE.ThemeType = ThemeType.Office2000 Case Else cntlCE.ThemeType = ThemeType.Custom End Select End If If Not Null.IsNull(objProvider.Attributes("ToggleBorder")) Then _ToggleBorder = Boolean.Parse(objProvider.Attributes("ToggleBorder")) cntlCE.ToggleBorder = _ToggleBorder End If If Not Null.IsNull(objProvider.Attributes("EnableAntiSpamEmailEncoder")) Then _EnableAntiSpamEmailEncoder = Boolean.Parse(objProvider.Attributes("EnableAntiSpamEmailEncoder")) cntlCE.EnableAntiSpamEmailEncoder = _EnableAntiSpamEmailEncoder End If If Not Null.IsNull(objProvider.Attributes("UseHTMLEntities")) Then _UseHTMLEntities = Boolean.Parse(objProvider.Attributes("UseHTMLEntities")) cntlCE.UseHTMLEntities = _UseHTMLEntities End If If Not Null.IsNull(objProvider.Attributes("UseFontTags")) Then _UseFontTags = Boolean.Parse(objProvider.Attributes("UseFontTags")) cntlCE.UseFontTags = _UseFontTags End If If Not Null.IsNull(objProvider.Attributes("UseSimpleAmpersand")) Then _UseSimpleAmpersand = Boolean.Parse(objProvider.Attributes("UseSimpleAmpersand")) cntlCE.UseSimpleAmpersand = _UseSimpleAmpersand End If If Not Null.IsNull(objProvider.Attributes("HelpUrl")) Then _HelpUrl = objProvider.Attributes("HelpUrl") cntlCE.HelpUrl = _HelpUrl End If If Not Null.IsNull(objProvider.Attributes("URLType")) Then _URLType = objProvider.Attributes("URLType") Select Case _URLType Case "Default" cntlCE.URLType = URLType.Default Case "SiteRelative" cntlCE.URLType = URLType.SiteRelative Case "Absolute" cntlCE.URLType = URLType.Absolute Case Else cntlCE.URLType = URLType.Default End Select End If End Sub Private Sub SetCEPropertiesByRole() cntlCE.AllowPasteHtml = _AllowPasteHtml cntlCE.EnableClientScript = _EnableClientScript Select Case _AutoConfigure Case "Full" cntlCE.AutoConfigure = AutoConfigure.Full Case "Full_noform" cntlCE.AutoConfigure = AutoConfigure.Full_noform Case "Simple" cntlCE.AutoConfigure = AutoConfigure.Simple Case "Minimal" cntlCE.AutoConfigure = AutoConfigure.Minimal Case "None" cntlCE.AutoConfigure = AutoConfigure.None Case Else cntlCE.AutoConfigure = AutoConfigure.Minimal End Select cntlCE.MaxHTMLLength = _maxhtmllength cntlCE.MaxTextLength = _maxtextlength If _DisableItemList = "" Then _DisableItemList = "Save,CssStyle" End If cntlCE.DisableItemList = _DisableItemList Select Case _EditorOnPaste Case "ConfirmWord" cntlCE.EditorOnPaste = PasteBehavior.ConfirmWord Case "PasteWord" cntlCE.EditorOnPaste = PasteBehavior.PasteWord Case "PasteText" cntlCE.EditorOnPaste = PasteBehavior.PasteText Case "Disabled" cntlCE.EditorOnPaste = PasteBehavior.Disabled Case Else cntlCE.EditorOnPaste = PasteBehavior.Default End Select If _ConfigurationPath <> "" Then cntlCE.ConfigurationPath = _ConfigurationPath End If If (_EnableContextMenu = False) Then cntlCE.EnableContextMenu = False End If cntlCE.EnableStripScriptTags = _EnableStripScriptTags cntlCE.ConvertHTMLTagstoLowercase = _ConvertHTMLTagstoLowercase cntlCE.ReadOnly = _ReadOnly cntlCE.ShowBottomBar = _ShowBottomBar cntlCE.ShowTagSelector = _ShowTagSelector cntlCE.ShowHtmlMode = _ShowHtmlMode cntlCE.ShowPreviewMode = _ShowPreviewMode cntlCE.TemplateItemList = _TemplateItemList cntlCE.SecurityPolicyFile = _SecurityPolicyFile End Sub Public Sub getSettingByRole(ByVal role As String) If Not Null.IsNull(objProvider.Attributes(role & "_MaxHTMLLength")) Then _maxhtmllength = Integer.Parse(objProvider.Attributes(role & "_MaxHTMLLength")) End If If Not Null.IsNull(objProvider.Attributes(role & "_MaxTextLength")) Then _maxtextlength = Integer.Parse(objProvider.Attributes(role & "_MaxTextLength")) End If If Not Null.IsNull(objProvider.Attributes(role & "_AutoConfigure")) Then _AutoConfigure = objProvider.Attributes(role & "_AutoConfigure") End If If Not Null.IsNull(objProvider.Attributes(role & "_SecurityPolicyFile")) Then _SecurityPolicyFile = objProvider.Attributes(role & "_SecurityPolicyFile") End If If Not Null.IsNull(objProvider.Attributes(role & "_TemplateItemList")) Then _TemplateItemList = objProvider.Attributes(role & "_TemplateItemList") End If If Not Null.IsNull(objProvider.Attributes(role & "_DisableItemList")) Then _DisableItemList = objProvider.Attributes(role & "_DisableItemList") End If If Not Null.IsNull(objProvider.Attributes(role & "_AllowPasteHtml")) Then _AllowPasteHtml = Boolean.Parse(objProvider.Attributes(role & "_AllowPasteHtml")) End If If Not Null.IsNull(objProvider.Attributes(role & "_EnableClientScript")) Then _EnableClientScript = Boolean.Parse(objProvider.Attributes(role & "_EnableClientScript")) End If If Not Null.IsNull(objProvider.Attributes(role & "_EnableContextMenu")) Then _EnableContextMenu = Boolean.Parse(objProvider.Attributes(role & "_EnableContextMenu")) End If If Not Null.IsNull(objProvider.Attributes(role & "_EnableStripScriptTags")) Then _EnableStripScriptTags = Boolean.Parse(objProvider.Attributes(role & "_EnableStripScriptTags")) End If If Not Null.IsNull(objProvider.Attributes(role & "_ConvertHTMLTagstoLowercase")) Then _ConvertHTMLTagstoLowercase = Boolean.Parse(objProvider.Attributes(role & "_ConvertHTMLTagstoLowercase")) End If If Not Null.IsNull(objProvider.Attributes(role & "_EditorOnPaste")) Then _EditorOnPaste = objProvider.Attributes(role & "_EditorOnPaste") End If If Not Null.IsNull(objProvider.Attributes(role & "_ReadOnly")) Then _ReadOnly = Boolean.Parse(objProvider.Attributes(role & "_ReadOnly")) End If If Not Null.IsNull(objProvider.Attributes(role & "_ShowBottomBar")) Then _ShowBottomBar = Boolean.Parse(objProvider.Attributes(role & "_ShowBottomBar")) End If If Not Null.IsNull(objProvider.Attributes(role & "_ShowTagSelector")) Then _ShowTagSelector = Boolean.Parse(objProvider.Attributes(role & "_ShowTagSelector")) End If If Not Null.IsNull(objProvider.Attributes(role & "_ShowHtmlMode")) Then _ShowHtmlMode = Boolean.Parse(objProvider.Attributes(role & "_ShowHtmlMode")) End If If Not Null.IsNull(objProvider.Attributes(role & "_ShowPreviewMode")) Then _ShowPreviewMode = Boolean.Parse(objProvider.Attributes(role & "_ShowPreviewMode")) End If If Not Null.IsNull(objProvider.Attributes(role & "_ConfigurationPath")) Then _ConfigurationPath = objProvider.Attributes(role & "_ConfigurationPath") End If If Not Null.IsNull(objProvider.Attributes("SeparateFoldersByRole")) Then _SeparateFoldersByRole = Boolean.Parse(objProvider.Attributes("SeparateFoldersByRole")) End If If Not Null.IsNull(objProvider.Attributes("UseDNNRootImageDirectory")) Then _usednnrootimagedirectory = Boolean.Parse(objProvider.Attributes("UseDNNRootImageDirectory")) End If If Not Null.IsNull(objProvider.Attributes("UseDNNRoleASFileNamePrefix")) Then _UseDNNRoleASFileNamePrefix = Boolean.Parse(objProvider.Attributes("UseDNNRoleASFileNamePrefix")) End If If Not Null.IsNull(objProvider.Attributes("UseDNNDefaultWidth")) Then _UseDNNDefaultWidth = Boolean.Parse(objProvider.Attributes("UseDNNDefaultWidth")) End If If _usednnrootimagedirectory = True Then If _UseDNNRoleASFileNamePrefix Then Dim trim(1) As Char trim(0) = "/"c Dim tempfolder As String = "" Dim Templatefolder As String = "" tempfolder = RootImageDirectory Templatefolder = RootImageDirectory.TrimEnd(trim) & "/templates" cntlCE.SetSecurityImageGalleryPath(tempfolder) cntlCE.SetSecurityImageBrowserPath(tempfolder) cntlCE.SetSecurityFilesGalleryPath(tempfolder) cntlCE.SetSecurityMediaGalleryPath(tempfolder) cntlCE.SetSecurityFlashGalleryPath(tempfolder) cntlCE.SetSecurityTemplateGalleryPath(Templatefolder) Dim tempsecurity As String = "" If role = "Admin" Then tempsecurity = "" ElseIf role = "Registered" Then cntlCE.SetSecurityFileNamePrefix("Member_") ElseIf role <> String.Empty Then cntlCE.SetSecurityFileNamePrefix(role & "_") End If Else Dim trim(1) As Char trim(0) = "/"c Dim tempfolder As String = "" Dim Templatefolder As String = "" If _SeparateFoldersByRole Then If role = "Admin" Then tempfolder = "content" ElseIf role = "Registered" Then tempfolder = "content/member" ElseIf role <> String.Empty Then tempfolder = "content/"& role End If Else tempfolder = "" End If tempfolder = RootImageDirectory.TrimEnd(trim) & "/" & tempfolder Templatefolder = RootImageDirectory.TrimEnd(trim) & "/templates" Dim phyfolder As String phyfolder = HttpContext.Current.Server.MapPath(tempfolder) If role = "Administrators" Then phyfolder = HttpContext.Current.Server.MapPath(RootImageDirectory.TrimEnd(trim) & "/Admin") End If If Not Directory.Exists(phyfolder) Then Directory.CreateDirectory(phyfolder) End If If Not Directory.Exists(HttpContext.Current.Server.MapPath(Templatefolder)) Then Directory.CreateDirectory(HttpContext.Current.Server.MapPath(Templatefolder)) End If cntlCE.SetSecurityImageGalleryPath(tempfolder) cntlCE.SetSecurityImageBrowserPath(tempfolder) cntlCE.SetSecurityFilesGalleryPath(tempfolder) cntlCE.SetSecurityMediaGalleryPath(tempfolder) cntlCE.SetSecurityFlashGalleryPath(tempfolder) cntlCE.SetSecurityTemplateGalleryPath(Templatefolder) End If End If End Sub Public Sub New() End Sub Private Sub AddDNNLinks() If Not cntlCE.ToolControls("LinkTree") Is Nothing Then Dim tdd As CuteEditor.TreeDropDownList tdd = DirectCast(cntlCE.ToolControls("LinkTree").Control, CuteEditor.TreeDropDownList) 'clear the items from configuration files 'see Configuration/Shared/Common.config tdd.Items.Clear() Dim rootitem As CuteEditor.TreeListItem rootitem = New CuteEditor.TreeListItem(_portalSettings.PortalName & " Links") rootitem.Selectable = False tdd.Items.Add(rootitem) Dim objTab As DotNetNuke.Entities.Tabs.TabInfo For Each objTab In _portalSettings.DesktopTabs ' If (DotNetNuke.Security.PortalSecurity.IsInRoles(objTab.AuthorizedRoles) = True) AndAlso (objTab.IsVisible = True) AndAlso (objTab.IsDeleted = False) AndAlso (objTab.IsAdminTab = False And objTab.IsSuperTab = False) Then If (DotNetNuke.Security.PortalSecurity.IsInRoles(objTab.AuthorizedRoles) = True) AndAlso (objTab.IsDeleted = False) AndAlso (objTab.IsAdminTab = False And objTab.IsSuperTab = False) Then If objTab.HasChildren AndAlso objTab.ParentId = -1 Then ''Skip empty root tab AddItems(rootitem.Items, objTab.TabID, objTab.TabName, objTab.FullUrl) ElseIf objTab.ParentId = -1 Then rootitem.Items.Add(New CuteEditor.TreeListItem(objTab.TabName, objTab.TabName, objTab.FullUrl)) End If End If Next Dim objUrls As New DotNetNuke.Common.Utilities.UrlController Dim Urls As ArrayList = objUrls.GetUrls(_portalSettings.PortalId) If Urls.Count > 0 Then Dim url As DotNetNuke.Common.Utilities.UrlInfo rootitem = New CuteEditor.TreeListItem(_portalSettings.PortalName & " URL Store") rootitem.Selectable = False For Each url In Urls rootitem.Items.Add(url.Url, url.Url, Globals.LinkClickURL(url.Url)) Next End If End If End Sub Public Sub AddItems(ByVal items As CuteEditor.TreeListItemCollection, ByVal TabId As Integer, ByVal Tabname As String, ByVal FullUrl As String) Dim listitem As CuteEditor.TreeListItem listitem = New CuteEditor.TreeListItem(Tabname) listitem.Selectable = False listitem.Items.Add(New CuteEditor.TreeListItem(Tabname & " Home", Tabname, FullUrl)) items.Add(listitem) Dim objTab As DotNetNuke.Entities.Tabs.TabInfo For Each objTab In _portalSettings.DesktopTabs ' If objTab.ParentId = TabId AndAlso (DotNetNuke.Security.PortalSecurity.IsInRoles(objTab.AuthorizedRoles) = True) AndAlso (objTab.IsVisible = True) AndAlso (objTab.IsDeleted = False) AndAlso (objTab.IsAdminTab = False And objTab.IsSuperTab = False) Then If objTab.ParentId = TabId AndAlso (DotNetNuke.Security.PortalSecurity.IsInRoles(objTab.AuthorizedRoles) = True) AndAlso (objTab.IsDeleted = False) AndAlso (objTab.IsAdminTab = False And objTab.IsSuperTab = False) Then If objTab.HasChildren = True Then 'has more children AddItems(listitem.Items, objTab.TabID, objTab.TabName, objTab.FullUrl) Else listitem.Items.Add(New CuteEditor.TreeListItem(objTab.TabName, objTab.TabName, objTab.FullUrl)) End If End If Next End Sub Public ReadOnly Property ProviderPath() As String Get Return _providerPath End Get End Property #End Region #Region "Properties " Public Overrides ReadOnly Property HtmlEditorControl() As System.Web.UI.Control Get Return cntlCE End Get End Property Public Overrides Property Text() As String Get Text = cntlCE.Text End Get Set(ByVal Value As String) cntlCE.Text = Value End Set End Property Public Overrides Property ControlID() As String Get ControlID = _ControlID End Get Set(ByVal Value As String) _ControlID = Value End Set End Property Public Overrides Property AdditionalToolbars() As ArrayList Get Return _AdditionalToolbars End Get Set(ByVal Value As ArrayList) _AdditionalToolbars = Value End Set End Property Public Overrides Property RootImageDirectory() As String Get If _RootImageDirectory = "" Then RootImageDirectory = "~" & _portalSettings.HomeDirectory.Substring(_portalSettings.HomeDirectory.IndexOf("/Portals/")) Else RootImageDirectory = _RootImageDirectory End If End Get Set(ByVal Value As String) _RootImageDirectory = Value End Set End Property Public Overrides Property Width() As System.Web.UI.WebControls.Unit Get Width = cntlCE.Width End Get Set(ByVal Value As System.Web.UI.WebControls.Unit) If _UseDNNDefaultWidth = True Then cntlCE.Width = Value End If End Set End Property Public Overrides Property Height() As System.Web.UI.WebControls.Unit Get Height = cntlCE.Height End Get Set(ByVal Value As System.Web.UI.WebControls.Unit) cntlCE.Height = Value End Set End Property #End Region #Region "Private Helper Methods" #End Region #Region "Public Methods" Public Overrides Sub AddToolbar() End Sub ''' ----------------------------------------------------------------------------- ''' <summary> ''' Initialises the control ''' </summary> ''' <remarks> ''' </remarks> ''' <history> ''' [cnurse] 12/13/2004 Documented ''' </history> ''' ----------------------------------------------------------------------------- Public Overrides Sub Initialize() cntlCE.FilesPath = DotNetNuke.Common.Globals.ResolveUrl(_providerPath) cntlCE.DNN_Arg = "portalid=" & PortalSettings.PortalId & "&tabid=" & _portalSettings.ActiveTab.TabID Dim Isadmin, Isregistered, IsSubscribers As Boolean Isadmin = PortalSecurity.IsInRoles("Administrators") Isregistered = PortalSecurity.IsInRoles("Registered Users") IsSubscribers = PortalSecurity.IsInRoles("Subscribers") Dim role, test As String test = "" Dim IsgetSettingFromRole As Boolean = False Dim objRoles As New DotNetNuke.Security.Roles.RoleController Dim objRole As DotNetNuke.Security.Roles.RoleInfo Dim arrRoleInfo As ArrayList = objRoles.GetPortalRoles(_portalSettings.PortalId) For Each objRole In arrRoleInfo role = objRole.RoleName() If role <> "Registered Users" And role <> "Subscribers" Then If PortalSecurity.IsInRoles(role) Then If role = "All Users" Then role = "Guest" End If If role = "Administrators" Then role = "Admin" End If role = role.Replace(" ", "_") If Not Null.IsNull(objProvider.Attributes(role & "_AutoConfigure")) Then getSettingByRole(role) IsgetSettingFromRole = True Exit For End If End If End If Next If Not IsgetSettingFromRole Then If Isregistered Then getSettingByRole("Registered") Else getSettingByRole("Guest") End If End If 'set CE general properties Try SetCEGeneralProperties() Catch e As Exception Throw New Exception("Check your provider configuration for errors!" & Environment.NewLine & e.Message) End Try 'set CE properties by role Try SetCEPropertiesByRole() Catch e As Exception Throw New Exception("Check your provider configuration for errors!" & Environment.NewLine & e.Message) End Try End Sub Protected Sub cntlCE_Load(ByVal sender As Object, ByVal e As EventArgs) Handles cntlCE.Load Try AddDNNLinks() Catch ex As Exception Throw New Exception("Check your provider configuration for errors!" & Environment.NewLine & ex.Message) End Try End Sub #End Region End Class End Namespace
Thanks a lot !!!
07-13-2009, 3:17 AM
53923
in reply to
53917
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: need help to compile
Reply
Quote
Hi greg1804,
Please post the full error messages here.
Regards,
ken
07-16-2009, 4:17 AM
54022
in reply to
53923
greg1804
Joined on 07-10-2009
Posts 5
Re: need help to compile
Reply
Quote
It seems that DNN required Visual Studio 2005 and I work with a 2008 version. I tried to reinstall 2005 but that doesn't work. If U can just compile the code for me, it should be great.
Thanks,
Greg