The problem here is that XML request do not send Session Id cookie on explorer... (it works on firefox)... so , you cant use session vars...
I think that you should manage session manually.. using an extra parameter in every Connector request, so the editor can send session id... then, from the conector, load session vars using that Id..
I tried passing the directory along , i.e. &folder=/$userdir/Image/ on the end of the url... , through the javascript and then on to the php connector with &folder=/$userdir/Image/ on the end of the url.
I do not know enough javascript to take the variable into the javascript and pass it on to the php connector.
I would just like someone to clearly show me the code to pass the php path containing the original value of $userdir through to the php connector so I can have a different storage directory for each user.
Seems like an obvious request to make and something everyone would like to do. Why is it so hard?
Hello. (sorry for my english, i am french) I am creating a CMS (in php) for diffurents users. Each user have his own folder for images. To let the editor know the image folder of the use x, I use cookies.
1/ In a page before the one that start the editor, I create a cookie that contain the name of the website of the user.
<?
$site_name=$_GET['site_name'];
$expire = 365*24*3600; // define the duration of the cookie -> one year here
setcookie("var_name",$site_name,time()+$expire); // send the cookie
?>
These lines msut be the first of your page(before <head>..., whatever it won't work.
2/ In the file config.php, I take the site_name from the cookie.
$user_web_site=$_COOKIE['var_name'];
and then,
config['UserFilesPath']="sites/$user_web_site";
Don't forget to creater the folder before, for exemple if an user get a website called "demo", create a folder "demo" in the folder "sites".
Personnaly, for each user : sites/$user_web_site/Image
Whats about setting the path in connector.pphp manually? I put my stuff in the current session, and read this values in conector.php. I did this before the line DoResponse();
RE: FCKeditor RC3 dynamic upload path
I think that you should manage session manually.. using an extra parameter in every Connector request, so the editor can send session id... then, from the conector, load session vars using that Id..
Hernux
RE: FCKeditor RC3 dynamic upload path
I do not know enough javascript to take the variable into the javascript and pass it on to the php connector.
I would just like someone to clearly show me the code to pass the php path containing the original value of $userdir through to the php connector so I can have a different storage directory for each user.
Seems like an obvious request to make and something everyone would like to do. Why is it so hard?
RE: FCKeditor RC3 dynamic upload path
I am creating a CMS (in php) for diffurents users. Each user have his own folder for images. To let the editor know the image folder of the use x, I use cookies.
1/ In a page before the one that start the editor, I create a cookie that contain the name of the website of the user.
These lines msut be the first of your page(before <head>..., whatever it won't work.
2/ In the file config.php, I take the site_name from the cookie.
$user_web_site=$_COOKIE['var_name'];
and then,
config['UserFilesPath']="sites/$user_web_site";
Don't forget to creater the folder before, for exemple if an user get a website called "demo", create a folder "demo" in the folder "sites".
Personnaly, for each user :
sites/$user_web_site/Image
Good Luck
RE: FCKeditor RC3 dynamic upload path
$GLOBALS["UserFilesPath"] = $myUserFilePathFromSession ;
$GLOBALS["UserFilesDirectory"] = $myUserFilePathFromSession;
That works for me on OS-X Netscape.
RE: FCKeditor RC3 dynamic upload path