Setting ImageBrowserPath

Last post 03-10-2010, 2:02 PM by rsj. 4 replies.
Sort Posts: Previous Next
  •  03-08-2010, 4:01 PM 59246

    Setting ImageBrowserPath


    I seem to be unable to modify the paths for the ImageBrowserPath setting (and the other path settings as well).  Regardless of the my entry in the security config files, the paths remain at the root location.
     
    I've tried both relative (~UserUploads and ~/Portals/fsbPortal/UserUploads/) and absolute (C:\Inetpub\wwwroot\FSB\Portals\fsbPortal\UserUploads). I've entered the same path in all five path variables to ensure that I wasn't using the wrong one. Even with the provided default location of ~uploads, the browser path remains at the root. For each example, I've verified that the folder exists and the ASP Machine account has access, and verfied that I am using the proper config file (changed web.config so that admin, default, and guest are all referencing the default.config file).
     
    The user can navigate to the folder within the image browser dialog and save a file to it, but I cannot get the image browser dialog to use the folder as the default.
     
    We are using the DNN solution for the Cute Editor, running on DNN 4.9.2.
     
    Please advise-
    Rick
    Filed under: ,
  •  03-08-2010, 9:46 PM 59250 in reply to 59246

    Re: Setting ImageBrowserPath

    Hi rsj,
     
    try set  UseDNNRootImageDirectory="false" in web.config <htmlEditor> section.
     
    Regards,
     
    Ken
  •  03-09-2010, 2:45 PM 59278 in reply to 59250

    Re: Setting ImageBrowserPath


    Ken-
     
    Thanks - that solved my problem. I had not noticed that setting in web.config.
     
    I have a related question now. Within the Dotnetnuke environment, is there a way to define the ImageBrowserPath when DNN loads Cute Editor?
     
    We have a DNN intranet with 3 different websites (master and two child portals). As a minimum, we'd like to define a different value for each portal. But our first choice would be to define to a user-specific folder based on PortalID and DNN user account. I can see an examples of how this would be done programatically in the implementSecuritypolicy.aspx file, but we have some third party DNN modules that don't provide us with their source code.
     
    It looks like the DNN file texteditor.ascx might be the "host provider" if that's the right term, for any instance of Cute Editor in DNN. Is it possible to modify that module to programtically change the value of ImageBrowserPath based on the portalid and dnn user account? Is there any example of this?
     
    Understand that this question may be a stretch ... any help is appreciated.
     
    Rick
    Filed under: ,
  •  03-09-2010, 9:41 PM 59287 in reply to 59278

    Re: Setting ImageBrowserPath

    Hi rsj,
     
    Open solution "Provider.sln", it contains in the integrate package(nukeedit5.zip\Providers\HtmlEditorProviders\CEHtmlEditorProvider)
     
    Find section below
    1. Protected Sub cntlCE_Load(ByVal sender As ObjectByVal e As EventArgs) Handles cntlCE.Load   
    2.            Try  
    3.                AddDNNLinks()   
    4.            Catch ex As Exception   
    5.                Throw New Exception("Check your provider configuration for errors!" & Environment.NewLine & ex.Message)   
    6.            End Try  
    7.        End Sub  

    Change to
    1. Protected Sub cntlCE_Load(ByVal sender As ObjectByVal e As EventArgs) Handles cntlCE.Load   
    2.             Try  
    3.                 AddDNNLinks()   
    4.                 If PortalSettings.PortalId = 0 Then  
    5.                     'if is portal 0, set image folder to folder1   
    6.                     cntlCE.SetSecurityImageGalleryPath("~/folder1")   
    7.                 Else  
    8.                     'if is another portals, set image folder to folder2   
    9.                     cntlCE.SetSecurityImageGalleryPath("~/folder2")   
    10.                 End If  
    11.             Catch ex As Exception   
    12.                 Throw New Exception("Check your provider configuration for errors!" & Environment.NewLine & ex.Message)   
    13.             End Try  
    14.         End Sub  
    Build the solution and replace bin/DotNetNuke.CEHtmlEditorProvider.dll of your dnn site

    Note: It just an example to show you how to change the ImageGalleryPath by PortalID, you can use your own logic.
     
    Regards,
     
    Ken
  •  03-10-2010, 2:02 PM 59308 in reply to 59287

    Re: Setting ImageBrowserPath


    Thanks Ken - that's exactly what I was looking for. Sure appreciate the level of support your company provides.
     
    Regards-
    Rick
View as RSS news feed in XML