Re: Setting ImageBrowserPath

  •  03-09-2010, 9:41 PM

    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
View Complete Thread