>>How difficult would that be for someone who is relatively new to asp.net development?
It should be easy. You need to know how to recompile the provider project first.
Step 1: Open Providers\HtmlEditorProviders\CEHtmlEditorProvider\CEHtmlEditorProvider.vb
Step 2: Change the following code:
From:
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.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 = "Guest"
Dim Templatefolder As String = ""
If role = "Admin" Then
tempfolder = ""
ElseIf role = "Registered" Then
tempfolder = "Member"
ElseIf role <> String.Empty Then
tempfolder = role
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.SetSecurityFilesGalleryPath(tempfolder)
cntlCE.SetSecurityMediaGalleryPath(tempfolder)
cntlCE.SetSecurityFlashGalleryPath(tempfolder)
cntlCE.SetSecurityTemplateGalleryPath(Templatefolder)
End If
to:
Dim username As String = HttpContext.Current.User.Identity.Name
Dim tempfolder As String = ""
tempfolder="/uploads/" & username
If Not Directory.Exists(HttpContext.Current.Server.MapPath(tempfolder)) Then
Directory.CreateDirectory(HttpContext.Current.Server.MapPath(tempfolder))
End If
cntlCE.SetSecurityImageGalleryPath(tempfolder)
cntlCE.SetSecurityFilesGalleryPath(tempfolder)
cntlCE.SetSecurityMediaGalleryPath(tempfolder)
cntlCE.SetSecurityFlashGalleryPath(tempfolder)
cntlCE.SetSecurityTemplateGalleryPath(tempfolder)
>>Could this be done on a per module basis?
yes, just add more logics to the above code.
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