Hi,
I'm evaluating FCK editor to insert it in my Joomla website.
I want to do this: Some users have a permission of Author and I should like to insert the FCK editor in the page where they write their own news. FCK permits to each user to send images to the server and this is very nice.
I would like to let every author to upload his own images and zip files to his own direcory and I dont want that one author to see the files of the other authors. So I'd like to give different permission to different users. Is it possible with FCK?
Otherwise I have to let every author to upload images (and zip files) and not let him to browse in the directories but this is not nice..
can someone please help me?
Thanks a lot!
Andrea
I'm evaluating FCK editor to insert it in my Joomla website.
I want to do this: Some users have a permission of Author and I should like to insert the FCK editor in the page where they write their own news. FCK permits to each user to send images to the server and this is very nice.
I would like to let every author to upload his own images and zip files to his own direcory and I dont want that one author to see the files of the other authors. So I'd like to give different permission to different users. Is it possible with FCK?
Otherwise I have to let every author to upload images (and zip files) and not let him to browse in the directories but this is not nice..
can someone please help me?
Thanks a lot!
Andrea
RE: Upload files in different directories?
fckeditor\editor\filemanager\browser\default\connectors\asp\config.asp
fckeditor\editor\filemanager\upload\asp\config.asp
If you use a different language you need to notify those files e.g. config.php
In each of the above files there is a variable called ConfigUserFilesPath, you just need to programmability set this variable. This is what I did:
ConfigUserFilesPath = "/cmsfiles/" & session("username")
and in the page that creates the FCK Editor object I set session("username") = username before I create the FCK Editor object
The end result is that
ConfigUserFilesPath = "/cmsfiles/username1" - when username1 is logged in
ConfigUserFilesPath = "/cmsfiles/username2" - when username2 is logged in
This means that username1 can only see the files in the username1 directory. If you need to make it more secure generate a random directory name for each user and append or prepend that to the ConfigUserFilesPath variable. As long as username1 always has the same random name then there should be no problems.
RE: Upload files in different directories?
RE: Upload files in different directories?
RE: Upload files in different directories?
--------- FCK Editor Page -------------------------
if session("username") <> null
session("username") = cookie("username")
end if
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = sBasePath
oFCKeditor.height = 400
oFCKeditor.width = 528
oFCKeditor.Value = pagecontent
oFCKeditor.Create "pagecontent"
set oFCKeditor = nothing
---------------------------------------------------
------------ Config.php or Config.asp etc ---------
ConfigUserFilesPath = "/cmsfiles/" & session("username")
RE: Upload files in different directories?
I have a SESSION that keeps track of users, but have the same problem with trying to upload to different directories by setting the UserFilesPath depending on SESSION variable settings.
)
The SESSION variables are NOT preserved from the page where the FCK Editor is created, to the config.php file in the
editor\filemanager\browser\default\connectors\php directory. I am testing this by clicking on insert/edit image button in the editor and then the window that pops up has no access to the SESSION, perhaps due to it being a javascript.
If I have a variable $_SESSION['storeuser'] working fine in the main PHP file, how can I preserve it for use in the config.php files? Would be very glad to hear of a solution that works
Thanks,
Tomas
RE: Upload files in different directories?
My Edit page is 'edit.php'
at the top
and then in connector.php
at the start
session_start();
$somepath = $_SESSION["somepath"];
and
if ( isset( $Config['UserFilesPath'] ) )
$GLOBALS["UserFilesPath"] = $Config['UserFilesPath'] ;
else if ( isset( $_GET['ServerPath'] ) )
$GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ;
else {
$GLOBALS["UserFilesPath"] = $somepath;
}