Hi All;
I wrote an article managment system. I use modifed WWF DB and RTE v3.0 Beta 2. This Tutorial about RTE.
Purpose
If you use RTE v3.0 Beta 2 behind an authentication pages, you can give special folders to users (editors) for the save and open or insert image options.
How To
First you can keep username at the session parameter. For example :
You have got an editor enter page. Editor (user) write his/her username and password and login to system. At this time, when username and password match, you can declare this :
Session("username") = recordset("username")
Second, you must modify following lines and pages on the RTE :
RTE_Setup.asp :
You search the line 51 :
Dim blnAbout
Change this line to :
Dim blnAbout, strOpenFileFolderPath, strSaveFileFolderPath, strFileUploadPath, strImageUploadPath
You Search the line 118 :
Const strOpenFileFolderPath = "my_documents"
Change this line to :
strOpenFileFolderPath = "my_documents\" & session("username") & "_documents"
You Search the line 122:
Const strSaveFileFolderPath = "my_documents\my_files"
Change this line to :
strSaveFileFolderPath = "my_documents\" & session("username") & "_documents\" & session("username") & "_files"
You Search the line 148 :
Const strFileUploadPath = "my_documents\my_files"
Change this line to :
strFileUploadPath = "my_documents\" & session("username") & "_documents\" & session("username") & "_attachments"
You Search the line 155 :
Const strImageUploadPath = "my_documents\my_pictures"
Change this line to :
strImageUploadPath = "my_documents\" & session("username") & "_documents\" & session("username") & "_pictures"
RTE_file_browser.asp :
You can add following lines to between 144 - 146 :
'Check and Create user folders MOD by Kaan DOGAN
If session("username")="" then Response.Redirect("editor_enter.asp")
If objFSO.FolderExists(Server.MapPath(strOpenFileFolderPath)) = False Then
'If the user dosen't have a folder create them one
objFSO.CreateFolder(Server.MapPath(strOpenFileFolderPath))
End If
If objFSO.FolderExists(Server.MapPath(strFolderPath)) = False Then
'If the user dosen't have a folder create them one
objFSO.CreateFolder(Server.MapPath(strFolderPath))
End If
|
So, every users acces only their home folder and sub folders. And each users have got separate folder. For example : my username superlative
My Open Folder (Home Folder) : my_documents\superlative_documents
My Save File Folder : my_documents\superlative_documents\superlative_files
My Upload Folder : my_documents\superlative_documents\superlative_attachments
My Image Folder : my_documents\superlative_documents\superlative_pictures
I hope useful for developers, webmasters
Note : Sorry for my bad english grammar, Borg or other english mods can edit these tutorial for grammar fix. But I made very simple sentences, I think non-english and english users can understand this article.

Thats All
Kaan DOĞAN (aka superlative, F1_Häkkinen)
Edited by superlative - 16 February 2005 at 5:56am