Can't get absolute path to stick

Last post 08-03-2005, 4:07 PM by mthompson07. 24 replies.
Page 1 of 2 (25 items)   1 2 Next >
Sort Posts: Previous Next
  •  06-13-2005, 11:31 AM 7540

    Can't get absolute path to stick

    We're trying to use the editor to creat e-mails to be sent.  We need the image paths to be absolute, but the path always inserts as "/Portals/0/apples.jpg" instead of http://localhost/Portals/0/apples.jpg.  RemoveServerNamesFromUrl="false".
     
    When we tested this on Friday, changing the view to HTML would insert the absolute path.  Then we added the RemoveServerNamesFromUrl attribute, and removed it, and readded it and tried added UseRelativeLinks="false", but all to no avail.  And now, we can't even get the absolute paths to show when we go to HTML view.  What's the deal?  What do we need to do?
     
    Thanks,
    Drew
  •  06-13-2005, 11:47 AM 7541 in reply to 7540

    Re: Can't get absolute path to stick

    This is an online demo showing you how the absolute URLs work:

    http://cutesoft.net/example/Relative-or-Absolute-URLs.aspx
     
    If you are using the DNN portal, please download the latest provider from the server again.
     
    We updated the provider in the last Friday.
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-13-2005, 2:07 PM 7545 in reply to 7541

    Re: Can't get absolute path to stick

    I'm now using the latest provider, and when I go to my dnn tab, the control no longer shows all the toolbars.  The only toolbar I see is has save, bold, ital, underline and alignment buttons.  I've set Registered_AutoConfigure="Full" for all security levels as well as assigning admin.config to all security levels.  What am I missing?
     
    Thanks,
    Drew
  •  06-13-2005, 2:16 PM 7546 in reply to 7545

    Re: Can't get absolute path to stick

    Drew,
     
    Have you logged in your site?
     
    If not, please check your web.config file.

    Change the following code:
    ....       
    Guest_AutoConfigure = "Minimal"
    ....

    to 
    ....       
    Guest_AutoConfigure = "Full"
    ....
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-13-2005, 2:47 PM 7548 in reply to 7546

    Can't get absolute path to stick

    uhmmm

    This seems cool
     
    http://cutesoft.net/example/Relative-or-Absolute-URLs.aspx
     
    Where Can I get the source code
     
     
    Salu2s
    AAP
  •  06-13-2005, 2:56 PM 7549 in reply to 7546

    Re: Can't get absolute path to stick

    yes I'm logged in, and I've already set Guest_AutoConfigure = "Full".  both register and guest settings match Admin, but it's still not working.  What next?
  •  06-13-2005, 3:00 PM 7550 in reply to 7548

    Re: Can't get absolute path to stick

    Here it is:
     
    With Cute Editor, you have the choice of using either a relative or absolute URL.
    switch(UrlsList.SelectedItem.Value)
    {
         case "UseRelativeUrls":
             Editor1.UseRelativeLinks  = true;
             Editor1.RemoveServerNamesFromUrl = true;
             break;
         case "UseAbsoluteUrls":
             Editor1.UseRelativeLinks  = false;
             Editor1.RemoveServerNamesFromUrl = false;
             break;
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-14-2005, 1:12 PM 7590 in reply to 7546

    Re: Can't get absolute path to stick

    I am logged in as the admin user, and I've configured both Registered and Guest users to match Admin.  Any ideas what I should try next?
  •  06-14-2005, 2:52 PM 7592 in reply to 7590

    Re: Can't get absolute path to stick

  •  06-14-2005, 4:38 PM 7600 in reply to 7592

    Re: Can't get absolute path to stick

    I downloaded, but it's the same as the one I downloaded yesterday.  What next?
  •  06-14-2005, 4:41 PM 7602 in reply to 7600

    Re: Can't get absolute path to stick

    It's strange.
     
    Is your site online so you can send the FTP access information to me through PM or email?
     
    I'll check your site tonight if possible.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-15-2005, 11:39 AM 7639 in reply to 7602

    Re: Can't get absolute path to stick

    Adam, thanks for the continued help.  The site is confidential and internal, so there's no way for me to get you access to review.  What should I be looking for?  I can post cutesoft config info here if that will help.  And this is a DNN 2.1.2 site I'm working on.
     
    Thanks,
    Drew
  •  06-15-2005, 12:28 PM 7643 in reply to 7639

    Re: Can't get absolute path to stick

    Drew,
     
    >>What should I be looking for? 

    I believe for some reasons you are still using the old provider.

    I can confirm we fixed this problem.

    You can test it here:

    http://dnn212.cutesoft.net/test

    username: test
    password:test

     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-15-2005, 1:06 PM 7647 in reply to 7643

    Re: Can't get absolute path to stick

    I'm using the most current provider.  The only modification is to include an additional role as admin. {If Not Isadmin Then Isadmin = IsCurrentUserInRole("EmailBlast")}. I'll include web.config settings in the next post.  When I compare this code to the provider I downloaded yesterday (using winmerge), the only difference is the line I added.

    I've gone through the documentation again
     
    Imports System.IO
    Imports System.Web
    Imports DotNetNuke
    Imports CuteEditor
    Namespace DotNetNuke.HtmlEditor
        Public Class CEHtmlEditorProvider
            Inherits HtmlEditorProvider
            Dim cntlCE As New CuteEditor.Editor
            Private Const ProviderType As String = "htmlEditor"
            Private _providerConfiguration As ProviderConfiguration = ProviderConfiguration.GetProviderConfiguration(ProviderType)
            Private _providerPath As String

            Private _editorbodystyle As String = ""
            Private _usednnrootimagedirectory As Boolean = True
            Private _removeservernamesfromurl As Boolean = False
            Private _enablestripscripttags As Boolean = False
            Private _removetbodytag As Boolean = False
            Private _showcodeviewtoolbar As Boolean = True
            Private _userelativelinks As Boolean = False
            Private _usesimpleampersand As Boolean = False
            Private _renderrichdropdown As Boolean = True
            Private _maxhtmllength As Integer = 0
            Private _maxtextlength As Integer = 0
            Private _customculture As String = ""
            Private _disableautoformatting As Boolean = False
            Private _disableclasslist As String = ""
            Private _helpurl As String = ""
            Private _themetype As String = "Office2003_BlueTheme"
            Private _breakelement As String = "div"
            Private _admin_autoconfigure As String = ""
            Private _admin_securitypolicyfile As String = ""
            Private _admin_templateitemlist As String = ""
            Private _admin_disableitemlist As String = ""
            Private _admin_allowpastehtml As Boolean = True
            Private _admin_editoronpaste As String = ""
            Private _admin_readonly As Boolean = True
            Private _admin_showbottombar As Boolean = True
            Private _admin_showhtmlmode As Boolean = True
            Private _admin_showpreviewmode As Boolean
            Private _registered_autoconfigure As String = ""
            Private _registered_securitypolicyfile As String = ""
            Private _registered_templateitemlist As String = ""
            Private _registered_disableitemlist As String = ""
            Private _registered_allowpastehtml As Boolean = True
            Private _registered_editoronpaste As String = ""
            Private _registered_readonly As Boolean = True
            Private _registered_showbottombar As Boolean = True
            Private _registered_showhtmlmode As Boolean = True
            Private _registered_showpreviewmode As Boolean = True
            Private _guest_autoconfigure As String = ""
            Private _guest_securitypolicyfile As String = ""
            Private _guest_templateitemlist As String = ""
            Private _guest_disableitemlist As String = ""
            Private _guest_allowpastehtml As Boolean = True
            Private _guest_editoronpaste As String = ""
            Private _guest_readonly As Boolean = True
            Private _guest_showbottombar As Boolean = True
            Private _guest_showhtmlmode As Boolean = True
            Private _guest_showpreviewmode As Boolean = True

            Private _temp_autoconfigure As String = ""
            Private _temp_securitypolicyfile As String = ""
            Private _temp_templateitemlist As String = ""
            Private _temp_disableitemlist As String = ""
            Private _temp_allowpastehtml As Boolean = True
            Private _temp_editoronpaste As String = "ConfirmWord"
            Private _temp_readonly As Boolean = True
            Private _temp_showbottombar As Boolean = True
            Private _temp_showhtmlmode As Boolean = True
            Private _temp_showpreviewmode As Boolean = True
     
            Public Sub New()
                Dim _portalSettings As PortalSettings = CType(HttpContext.Current.Items("PortalSettings"), PortalSettings)
                ' Read the configuration specific information for this provider
                Dim objProvider As Provider = CType(_providerConfiguration.Providers(_providerConfiguration.DefaultProvider), Provider)
                _providerPath = objProvider.Attributes("providerPath")
                If Not IsNull(objProvider.Attributes("UseDNNRootImageDirectory")) Then
                    _usednnrootimagedirectory = Boolean.Parse(objProvider.Attributes("UseDNNRootImageDirectory"))
                End If
                If Not IsNull(objProvider.Attributes("RemoveServerNamesFromUrl")) Then
                    _removeservernamesfromurl = Boolean.Parse(objProvider.Attributes("RemoveServerNamesFromUrl"))
                End If
                If Not IsNull(objProvider.Attributes("EnableStripScriptTags")) Then
                    _enablestripscripttags = Boolean.Parse(objProvider.Attributes("EnableStripScriptTags"))
                End If
                If Not IsNull(objProvider.Attributes("RemoveTBODYTag")) Then
                    _removetbodytag = Boolean.Parse(objProvider.Attributes("RemoveTBODYTag"))
                End If
                If Not IsNull(objProvider.Attributes("ShowCodeViewToolBar")) Then
                    _showcodeviewtoolbar = Boolean.Parse(objProvider.Attributes("ShowCodeViewToolBar"))
                End If
                If Not IsNull(objProvider.Attributes("UseRelativeLinks")) Then
                    _userelativelinks = Boolean.Parse(objProvider.Attributes("UseRelativeLinks"))
                End If
                If Not IsNull(objProvider.Attributes("UseSimpleAmpersand")) Then
                    _usesimpleampersand = Boolean.Parse(objProvider.Attributes("UseSimpleAmpersand"))
                End If
                If Not IsNull(objProvider.Attributes("RenderRichDropDown")) Then
                    _renderrichdropdown = Boolean.Parse(objProvider.Attributes("RenderRichDropDown"))
                End If
                If Not IsNull(objProvider.Attributes("MaxHTMLLength")) Then
                    _maxhtmllength = Integer.Parse(objProvider.Attributes("MaxHTMLLength"))
                End If
                If Not IsNull(objProvider.Attributes("MaxTextLength")) Then
                    _maxtextlength = Integer.Parse(objProvider.Attributes("MaxTextLength"))
                End If
                If Not IsNull(objProvider.Attributes("CustomCulture")) Then
                    _customculture = objProvider.Attributes("CustomCulture")
                End If
                If Not IsNull(objProvider.Attributes("EditorBodyStyle")) Then
                    _editorbodystyle = objProvider.Attributes("EditorBodyStyle")
                End If
                If Not IsNull(objProvider.Attributes("DisableAutoFormatting")) Then
                    _disableautoformatting = Boolean.Parse(objProvider.Attributes("DisableAutoFormatting"))
                End If
                If Not IsNull(objProvider.Attributes("DisableClassList")) Then
                    _disableclasslist = objProvider.Attributes("DisableClassList")
                End If
                If Not IsNull(objProvider.Attributes("HelpUrl")) Then
                    _helpurl = objProvider.Attributes("HelpUrl")
                End If
                If Not IsNull(objProvider.Attributes("ThemeType")) Then
                    _themetype = objProvider.Attributes("ThemeType")
                End If
                If Not IsNull(objProvider.Attributes("BreakElement")) Then
                    _breakelement = objProvider.Attributes("BreakElement")
                End If
                If Not IsNull(objProvider.Attributes("Admin_AutoConfigure")) Then
                    _admin_autoconfigure = objProvider.Attributes("Admin_AutoConfigure")
                End If
                If Not IsNull(objProvider.Attributes("Admin_SecurityPolicyFile")) Then
                    _admin_securitypolicyfile = objProvider.Attributes("Admin_SecurityPolicyFile")
                End If
                If Not IsNull(objProvider.Attributes("Admin_TemplateItemList")) Then
                    _admin_templateitemlist = objProvider.Attributes("Admin_TemplateItemList")
                End If
                If Not IsNull(objProvider.Attributes("Admin_DisableItemList")) Then
                    _admin_disableitemlist = objProvider.Attributes("Admin_DisableItemList")
                End If
                If Not IsNull(objProvider.Attributes("Admin_AllowPasteHtml")) Then
                    _admin_allowpastehtml = Boolean.Parse(objProvider.Attributes("Admin_AllowPasteHtml"))
                End If
                If Not IsNull(objProvider.Attributes("Admin_EditorOnPaste")) Then
                    _admin_editoronpaste = objProvider.Attributes("Admin_EditorOnPaste")
                End If
                If Not IsNull(objProvider.Attributes("Admin_ReadOnly")) Then
                    _admin_readonly = Boolean.Parse(objProvider.Attributes("Admin_ReadOnly"))
                End If
                If Not IsNull(objProvider.Attributes("Admin_ShowBottomBar")) Then
                    _admin_showbottombar = Boolean.Parse(objProvider.Attributes("Admin_ShowBottomBar"))
                End If
                If Not IsNull(objProvider.Attributes("Admin_ShowHtmlMode")) Then
                    _admin_showbottombar = Boolean.Parse(objProvider.Attributes("Admin_ShowHtmlMode"))
                End If
                If Not IsNull(objProvider.Attributes("Admin_ShowPreviewMode")) Then
                    _admin_showpreviewmode = Boolean.Parse(objProvider.Attributes("Admin_ShowPreviewMode"))
                End If
                If Not IsNull(objProvider.Attributes("Registered_AutoConfigure")) Then
                    _registered_autoconfigure = objProvider.Attributes("Registered_AutoConfigure")
                End If
                If Not IsNull(objProvider.Attributes("Registered_SecurityPolicyFile")) Then
                    _registered_securitypolicyfile = objProvider.Attributes("Registered_SecurityPolicyFile")
                End If
                If Not IsNull(objProvider.Attributes("Registered_TemplateItemList")) Then
                    _registered_templateitemlist = objProvider.Attributes("Registered_TemplateItemList")
                End If
                If Not IsNull(objProvider.Attributes("Registered_DisableItemList")) Then
                    _registered_disableitemlist = objProvider.Attributes("Registered_DisableItemList")
                End If
                If Not IsNull(objProvider.Attributes("Registered_AllowPasteHtml")) Then
                    _registered_allowpastehtml = Boolean.Parse(objProvider.Attributes("Registered_AllowPasteHtml"))
                End If
                If Not IsNull(objProvider.Attributes("Registered_EditorOnPaste")) Then
                    _registered_editoronpaste = objProvider.Attributes("Registered_EditorOnPaste")
                End If
                If Not IsNull(objProvider.Attributes("Registered_ReadOnly")) Then
                    _registered_readonly = Boolean.Parse(objProvider.Attributes("Registered_ReadOnly"))
                End If
                If Not IsNull(objProvider.Attributes("Registered_ShowBottomBar")) Then
                    _registered_showbottombar = Boolean.Parse(objProvider.Attributes("Registered_ShowBottomBar"))
                End If
                If Not IsNull(objProvider.Attributes("Registered_ShowHtmlMode")) Then
                    _registered_showbottombar = Boolean.Parse(objProvider.Attributes("Registered_ShowHtmlMode"))
                End If
                If Not IsNull(objProvider.Attributes("Registered_ShowPreviewMode")) Then
                    _registered_showpreviewmode = Boolean.Parse(objProvider.Attributes("Registered_ShowPreviewMode"))
                End If
                If Not IsNull(objProvider.Attributes("Guest_AutoConfigure")) Then
                    _guest_autoconfigure = objProvider.Attributes("Guest_AutoConfigure")
                End If
                If Not IsNull(objProvider.Attributes("Guest_SecurityPolicyFile")) Then
                    _guest_securitypolicyfile = objProvider.Attributes("Guest_SecurityPolicyFile")
                End If
                If Not IsNull(objProvider.Attributes("Guest_TemplateItemList")) Then
                    _guest_templateitemlist = objProvider.Attributes("Guest_TemplateItemList")
                End If
                If Not IsNull(objProvider.Attributes("Guest_DisableItemList")) Then
                    _guest_disableitemlist = objProvider.Attributes("Guest_DisableItemList")
                End If
                If Not IsNull(objProvider.Attributes("Guest_AllowPasteHtml")) Then
                    _guest_allowpastehtml = Boolean.Parse(objProvider.Attributes("Guest_AllowPasteHtml"))
                End If
                If Not IsNull(objProvider.Attributes("Guest_EditorOnPaste")) Then
                    _guest_editoronpaste = objProvider.Attributes("Guest_EditorOnPaste")
                End If
                If Not IsNull(objProvider.Attributes("Guest_ReadOnly")) Then
                    _guest_readonly = Boolean.Parse(objProvider.Attributes("Guest_ReadOnly"))
                End If
                If Not IsNull(objProvider.Attributes("Guest_ShowBottomBar")) Then
                    _guest_showbottombar = Boolean.Parse(objProvider.Attributes("Guest_ShowBottomBar"))
                End If
                If Not IsNull(objProvider.Attributes("Guest_ShowHtmlMode")) Then
                    _guest_showbottombar = Boolean.Parse(objProvider.Attributes("Guest_ShowHtmlMode"))
                End If
                If Not IsNull(objProvider.Attributes("Guest_ShowPreviewMode")) Then
                    _guest_showpreviewmode = Boolean.Parse(objProvider.Attributes("Guest_ShowPreviewMode"))
                End If
                    cntlCE.UseRelativeLinks = _userelativelinks
                    cntlCE.UseSimpleAmpersand = _usesimpleampersand
                    cntlCE.RenderRichDropDown = _renderrichdropdown
                    cntlCE.MaxHTMLLength = _maxhtmllength
                    cntlCE.MaxTextLength = _maxtextlength
                    cntlCE.CustomCulture = _customculture
                    cntlCE.EditorBodyStyle = _editorbodystyle
                    cntlCE.RemoveServerNamesFromUrl = _removeservernamesfromurl
                    cntlCE.DisableAutoFormatting = _disableautoformatting
                    cntlCE.EnableStripScriptTags = _enablestripscripttags
                    cntlCE.RemoveTBODYTag = _removetbodytag
                    cntlCE.HelpUrl = _helpurl
                    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
                    End Select
                    Select Case _breakelement
                        Case "div"
                            cntlCE.BreakElement = BreakElement.Div
                        Case "br"
                            cntlCE.BreakElement = BreakElement.Br
                        Case "paragraph"
                            cntlCE.BreakElement = BreakElement.P
                    End Select
                Dim Isadmin, Isregistered As Boolean
                '  Isadmin = PortalSecurity.IsInRoles("Administrators")
                '  Isregistered = PortalSecurity.IsInRoles("Registered Users")
                Isadmin = IsCurrentUserInRole("Administrators")
                If Not Isadmin Then Isadmin = IsCurrentUserInRole("EmailBlast")
                Isregistered = IsCurrentUserInRole("Registered Users")
                If Isadmin Then
                    _temp_templateitemlist = _admin_templateitemlist
                    _temp_disableitemlist = _admin_disableitemlist
                    _temp_allowpastehtml = _admin_allowpastehtml
                    _temp_securitypolicyfile = _admin_securitypolicyfile
                    _temp_readonly = _admin_readonly
                    _temp_showbottombar = _admin_showbottombar
                    _temp_showhtmlmode = _admin_showhtmlmode
                    _temp_showpreviewmode = _admin_showpreviewmode
                    _temp_editoronpaste = _admin_editoronpaste
                ElseIf Isregistered Then
                    _temp_templateitemlist = _registered_templateitemlist
                    _temp_disableitemlist = _registered_disableitemlist
                    _temp_allowpastehtml = _registered_allowpastehtml
                    _temp_securitypolicyfile = _registered_securitypolicyfile
                    _temp_readonly = _registered_readonly
                    _temp_showbottombar = _registered_showbottombar
                    _temp_showhtmlmode = _registered_showhtmlmode
                    _temp_showpreviewmode = _registered_showpreviewmode
                    _temp_editoronpaste = _registered_editoronpaste
                    _temp_autoconfigure = _registered_autoconfigure
                Else
                    _temp_templateitemlist = _guest_templateitemlist
                    _temp_disableitemlist = _guest_disableitemlist
                    _temp_allowpastehtml = _guest_allowpastehtml
                    _temp_securitypolicyfile = _guest_securitypolicyfile
                    _temp_readonly = _guest_readonly
                    _temp_showbottombar = _guest_showbottombar
                    _temp_showhtmlmode = _guest_showhtmlmode
                    _temp_showpreviewmode = _guest_showpreviewmode
                    _temp_editoronpaste = _guest_editoronpaste
                    _temp_autoconfigure = _guest_autoconfigure
                End If

                If cntlCE.DisableItemList = "" Then
                    cntlCE.DisableItemList = "Save"
                End If
                cntlCE.SecurityPolicyFile = _temp_securitypolicyfile
                cntlCE.TemplateItemList = _temp_templateitemlist
                cntlCE.DisableItemList = _temp_disableitemlist
                cntlCE.AllowPasteHtml = _temp_allowpastehtml
                cntlCE.SecurityPolicyFile = _temp_securitypolicyfile
                cntlCE.ReadOnly = _temp_readonly
                    cntlCE.ShowBottomBar = _temp_showbottombar
                    cntlCE.ShowHtmlMode = _temp_showhtmlmode
                    cntlCE.ShowPreviewMode = _temp_showpreviewmode
                    Select Case _temp_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
                    Select Case _temp_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
                If _usednnrootimagedirectory = True Then
                    Dim trim(1) As Char
                    trim(0) = "/"c
                    Dim tempfolder As String = "Guest"
                    If Isadmin Then
                        tempfolder = ""
                    ElseIf Isregistered Then
                        tempfolder = "Member"
                    End If
                    tempfolder = _portalSettings.UploadDirectory.TrimEnd(trim) & "/" & tempfolder
                    Dim phyfolder As String
                    phyfolder = HttpContext.Current.Server.MapPath(tempfolder)
                    If Isadmin Then
                        phyfolder = HttpContext.Current.Server.MapPath(_portalSettings.UploadDirectory.TrimEnd(trim) & "/Admin")
                    End If
                    If Not Directory.Exists(phyfolder) Then
                        Directory.CreateDirectory(phyfolder)
                    End If
                    cntlCE.SetSecurityImageGalleryPath(tempfolder)
                    cntlCE.SetSecurityFilesGalleryPath(tempfolder)
                    cntlCE.SetSecurityMediaGalleryPath(tempfolder)
                    cntlCE.SetSecurityFlashGalleryPath(tempfolder)
                    cntlCE.SetSecurityTemplateGalleryPath(tempfolder)
                End If
                ' If IsCurrentUserInRole("Administrators") = True Then
                '     cntlCE.AutoConfigure = AutoConfigure.Full
                ' ElseIf IsCurrentUserInRole("Registered Users") = True Then
                '     cntlCE.AutoConfigure = AutoConfigure.Full_noform
                ' Else
                '     cntlCE.AutoConfigure = AutoConfigure.Simple
                ' End If
                'assign the initialized control as the HtmlEditorControl
                Me.HtmlEditorControl = cntlCE
                cntlCE.EditorWysiwygModeCss = "~/portal.css"
                If cntlCE.DisableClassList = "" Then
                    cntlCE.DisableClassList = "TabBg,SelectedTab,OtherTabs,ModuleTitle_MenuArrow,ModuleTitle_RootMenuArrow,MainMenu_MenuContainer,MainMenu_MenuIcon,MainMenu_SubMenu,MainMenu_MenuArrow,MainMenu_RootMenuArrow"
                End If
                cntlCE.FilesPath = ResolveUrl(_providerPath)
                cntlCE.DNN_Arg = "portalid=" & _portalSettings.PortalId
            End Sub
            'Detect the DNN Role the current user is in
            Public Shared Function IsCurrentUserInRole(ByRef roleName As String) As Boolean
                If (roleName = "" Or System.Web.HttpContext.Current.User.Identity.Name = "") Then
                    Return False
                End If
                Dim _portalSettings As PortalSettings = CType(System.Web.HttpContext.Current.Items("PortalSettings"), PortalSettings)
                Dim objUsers As UserController = New UserController
                Dim objUser As UserInfo = objUsers.GetUser(_portalSettings.PortalId, Int32.Parse(HttpContext.Current.User.Identity.Name))
                Dim _roleController As RoleController = New RoleController
                Dim _roleinfo As RoleInfo = New RoleInfo
                Dim str As String() = _roleController.GetRolesByUser(objUser.UserID, _portalSettings.PortalId)
                Dim isInRole As Boolean = False
                Dim strInfo As String
                For Each strInfo In str
                    _roleinfo = _roleController.GetRole(Int32.Parse(strInfo))
                    If (_roleinfo.RoleName = roleName) Then
                        isInRole = True
                        Exit For
                    End If
                Next
                Return isInRole
            End Function
            Public ReadOnly Property ProviderPath() As String
                Get
                    Return _providerPath
                End Get
            End Property

            'The Text, Width, and Height properties are retrieved and set by
            'typing the HtmlEditorControl Web.UI.Control to CuteEditor.Editor
            'and accessing the FreeTextBox properties Text, Width, and Height
            Public Overrides Property Text() As String
                Get
                    Text = CType(Me.HtmlEditorControl, CuteEditor.Editor).Text
                End Get
                Set(ByVal Value As String)
                    CType(Me.HtmlEditorControl, CuteEditor.Editor).Text = Value
                End Set
            End Property
            Public Overrides Property Width() As System.Web.UI.WebControls.Unit
                Get
                    Width = CType(Me.HtmlEditorControl, CuteEditor.Editor).Width
                End Get
                Set(ByVal Value As System.Web.UI.WebControls.Unit)
                    '            CType(Me.HtmlEditorControl, CuteEditor.Editor).Width = Value
                End Set
            End Property
            Public Overrides Property Height() As System.Web.UI.WebControls.Unit
                Get
                    Width = CType(Me.HtmlEditorControl, CuteEditor.Editor).Height
                End Get
                Set(ByVal Value As System.Web.UI.WebControls.Unit)
                    CType(Me.HtmlEditorControl, CuteEditor.Editor).Height = Value
                End Set
            End Property
            Public Function ResolveUrl(ByVal url As String) As String
                ' String is Empty, just return Url
                If (url.Length = 0) Then
                    Return url
                End If
                ' String does not contain a ~, so just return Url
                If (url.StartsWith("~") = False) Then
                    Return url
                End If
                ' There is just the ~ in the Url, return the appPath
                If (url.Length = 1) Then
                    Return Global.ApplicationPath
                End If
                If (url.ToCharArray()(1) = "/" Or url.ToCharArray()(1) = "\") Then
                    ' Url looks like ~/ or ~\
                    If (Global.ApplicationPath.Length > 1) Then
                        Return Global.ApplicationPath + "/" & url.Substring(2)
                    Else
                        Return "/" & url.Substring(2)
                    End If
                Else
                    ' Url look like ~something
                    If (Global.ApplicationPath.Length > 1) Then
                        Return Global.ApplicationPath & "/" & url.Substring(1)
                    Else
                        Return Global.ApplicationPath & url.Substring(1)
                    End If
                End If
            End Function
            Public Function IsNull(ByVal objField As Object) As Boolean
                If Not objField Is Nothing Then
                    If TypeOf objField Is Integer Then
                        IsNull = objField.Equals(-1)
                    ElseIf TypeOf objField Is Single Then
                        IsNull = objField.Equals(Single.MinValue)
                    ElseIf TypeOf objField Is Double Then
                        IsNull = objField.Equals(Double.MinValue)
                    ElseIf TypeOf objField Is Decimal Then
                        IsNull = objField.Equals(Decimal.MinValue)
                    ElseIf TypeOf objField Is Date Then
                        Dim objDate As DateTime = CType(objField, DateTime)
                        IsNull = objDate.Date.Equals(Null.NullDate.Date)
                    ElseIf TypeOf objField Is String Then
                        IsNull = objField.Equals(Null.NullString)
                    ElseIf TypeOf objField Is Boolean Then
                        IsNull = objField.Equals(Null.NullBoolean)
                    ElseIf TypeOf objField Is Guid Then
                        IsNull = objField.Equals(Null.NullGuid)
                    Else ' complex object
                        IsNull = False
                    End If
                Else
                    IsNull = True
                End If
            End Function

        End Class
    End Namespace

     
  •  06-15-2005, 1:08 PM 7648 in reply to 7643

    Re: Can't get absolute path to stick


      <appSettings>
        <add key="DictionaryFolder" value="bin"/>
      </appSettings>

        <htmlEditor defaultProvider="CEHtmlEditorProvider" >
                <providers>
           <clear/>
                    <add name = "FtbHtmlEditorProvider"
               type = "DotNetNuke.HtmlEditor.FtbHtmlEditorProvider, DotNetNuke.FtbHtmlEditorProvider"                   
               providerPath = "~\Providers\HtmlEditorProviders\FtbHtmlEditorProvider\"
                    />
                    <add name="CEHtmlEditorProvider"
               type="DotNetNuke.HtmlEditor.CEHtmlEditorProvider, DotNetNuke.CEHtmlEditorProvider"   
               providerPath="~\Providers\HtmlEditorProviders\CEHtmlEditorProvider\CuteSoft_Client\CuteEditor\"
               UseDNNRootImageDirectory="true"
               RemoveServerNamesFromUrl="false"
               UseRelativeLinks="false"
               RenderRichDropDown="true"
               EnableStripScriptTags="true"
               RemoveTBODYTag="false"
               ShowCodeViewToolBar="true"
               ShowBottomBar="false"
               UseSimpleAmpersand="false"
               MaxHTMLLength="0"
               MaxTextLength="0"
               CustomCulture=""
               ThemeType="Office2003_BlueTheme"
               DisableAutoFormatting="false"
               DisableClassList=""
               HelpUrl=""
               BreakElement="div"
               EditorBodyStyle=""
               Admin_AutoConfigure = "Full"
               Admin_SecurityPolicyFile = "admin.config"
               Admin_DisableItemList = ""
               Admin_AllowPasteHtml = "true"
               Admin_EditorOnPaste  = "default"
               Admin_ReadOnly = "false"
               Admin_ShowBottomBar ="true"
               Admin_ShowHtmlMode = "true"
               Admin_ShowPreviewMode = "true" 
               Registered_AutoConfigure = "Full"
               Registered_SecurityPolicyFile = "admin.config"
               Registered_DisableItemList = ""
               Registered_AllowPasteHtml = "true"
               Registered_EditorOnPaste  = "default"
               Registered_ReadOnly = "false"
               Registered_ShowBottomBar ="true"
               Registered_ShowHtmlMode = "true"
               Registered_ShowPreviewMode = "true"
               Guest_AutoConfigure = "Full"
               Guest_SecurityPolicyFile = "admin.config"
               Guest_DisableItemList = "Save"
               Guest_AllowPasteHtml = "true"
               Guest_EditorOnPaste  = "default"
               Guest_ReadOnly = "false"
               Guest_ShowBottomBar ="true"
               Guest_ShowHtmlMode = "true"
               Guest_ShowPreviewMode = "true"
             />
                </providers>
            </htmlEditor>
  •  06-17-2005, 11:34 AM 7722 in reply to 7643

    Re: Can't get absolute path to stick

    Adam,
     
    We really need to get this running or my client will have us go back to using the FreeTextBox and ask for his money back.  What do we need to do to get this running.  I can do a NetMeeting or something of the like if you need.  I've pasted the code for the provider as well as the web.config file info for the editor.  I have not modified any of the files in the Provider folder.
     
    Thanks,
    Drew
  •  06-17-2005, 11:53 AM 7725 in reply to 7722

    Re: Can't get absolute path to stick

  •  06-17-2005, 2:11 PM 7732 in reply to 7725

    Re: Can't get absolute path to stick

    Great Job Adam.  All is good in the world again.  Thanks for your help.
  •  06-30-2005, 6:19 PM 8237 in reply to 7541

    Re: Can't get absolute path to stick

    Adam, no offense but you should stop showing that silly example.  its no example at all.

    Clicking both radio buttons, then viewing source shows the source is still /uploads/xxxxxx.gif

    What we need is a REAL answer

    Heres my problem.

    I am calling the control from an EditHTML.aspx file in /admin/CMS to edit a file that is lets say /index.html

    Now, the image links in index.html are referenced with relative paths aka "images/home.gif"

    When editing the file, the images do not show up in the edit window.

    How do I fix this?
  •  07-01-2005, 3:12 AM 8253 in reply to 8237

    Re: Can't get absolute path to stick

    WebsiteRepairGuys,
     
    Sorry for the frustration.
     
    To resolve this problem, please set editor DisableAutoFormatting property to true.
     
    Keep me posted.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

Page 1 of 2 (25 items)   1 2 Next >
View as RSS news feed in XML