Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - [MOD-RTE] Give home folder to users
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum Locked[MOD-RTE] Give home folder to users

 Post Reply Post Reply
Author
superlative View Drop Down
Groupie
Groupie

Not Comparative, I m Superlative :)

Joined: 26 November 2004
Location: Turkey
Status: Offline
Points: 125
Post Options Post Options   Thanks (0) Thanks(0)   Quote superlative Quote  Post ReplyReply Direct Link To This Post Topic: [MOD-RTE] Give home folder to users
    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)
 


Edited by superlative - 16 February 2005 at 5:56am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.