Print Page | Close Window

[MOD-RTE] Give home folder to users

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=13825
Printed Date: 28 March 2026 at 1:39pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: [MOD-RTE] Give home folder to users
Posted By: superlative
Subject: [MOD-RTE] Give home folder to users
Date Posted: 15 February 2005 at 6:20pm
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. Wink
 
Thats All
 
Kaan DOĞAN (aka superlative, F1_Häkkinen)
http://www.knowhow.gen.tr - www.knowhow.gen.tr - http://www.kaan.tk - www.kaan.tk
 


-------------
http://www.knowhow.gen.tr" rel="nofollow">



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net