I've been messing around with this for quite a while now and I NEED to get this working for a rather large implementation. I'm trying to set the config.baseUrl and config.baseDir using the following code.
The structure is as follows.
/admin - Session variables set here
/admin/fckeditor_new/ - fckeditor director
/admin/fckeditor_new/ckfinder - ckfinder directory
No matter how many tricky ways I try, the variable "Session" is never accessible in config.cfm, making it impossible to set those directories dynamically, which absolutely critical for this implementation. "Session" show up just fine in ckfinder.cfm (renamed ckfinder.html). Is there a way to set a javascript variable dynamically on THAT page and THEN feed it to the configuration?
if (isDefined("Session.ckBaseUrl")) config.baseUrl = Session.ckBaseUrl; else config.baseUrl = "/admin/fckeditor_new/ckfinder/userfiles/"; if (isDefined("Session.ckBaseDir")) config.baseDir = Session.ckBaseDir; else config.baseDir = "/admin/fckeditor_new/ckfinder/userfiles/";
The structure is as follows.
/admin - Session variables set here
/admin/fckeditor_new/ - fckeditor director
/admin/fckeditor_new/ckfinder - ckfinder directory
No matter how many tricky ways I try, the variable "Session" is never accessible in config.cfm, making it impossible to set those directories dynamically, which absolutely critical for this implementation. "Session" show up just fine in ckfinder.cfm (renamed ckfinder.html). Is there a way to set a javascript variable dynamically on THAT page and THEN feed it to the configuration?
Re: Cannot access Coldfusion session variables in config.cfm
Take a look at CKFinder documentation: http://docs.fckeditor.net/CKFinder/Deve ... n/Sessions
I guess that the problem comes from different names for applications. There is a separate Application.cfc located in ckfinder/core/connector/cfm directory.
Make sure that in ckfinder/core/connector/cfm/Application.cfc(cfm) you are assigning the same Name as your main application have.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Cannot access Coldfusion session variables in config.cfm
Re: Cannot access Coldfusion session variables in config.cfm
Dear ltgPete,
I'm having the same problems, but can't figure out a way to make it work.
The solution provided is not fully clear to me. Since I'm not a wizard like you are I could need some more help.
I have an application, with an application.cfm file which contain:
<CFAPPLICATION NAME="AtkNet">
In this file I have put a variable: <cfset session.folder="cherob">
I have downloaded and installed CKEditor & CKFinder.
At it best I would like to pass on the foldername dynamically since the foldername is everytime a companyname. They need to store theire images in seperate folders, and not being able to see each others files.
In the Application.cfc of ckfinder I have used the same appl name:
<cfscript>
// Set up the application.
THIS.Name = "AtkNet";
When I go to config.cfm I put:
config.baseUrl = '/ckfinder/userfiles/#session.foldernaam#/';
but I get errors all the time!
What should I change? I have read the documentation on http://docs.cksource.com/CKFinder_2.x/D ... n/Sessions but I coulddn't find the solution myself.
many thanks for helping me out.
kind regards
Re: Cannot access Coldfusion session variables in config.cfm
ckfinder/Application.cfc
ckfinder/core/connector/cfm/Application.cfc
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Cannot access Coldfusion session variables in config.cfm
I'm having a similar issue but with the CheckAuthentication function.
This is my site structure:
/admin
/ckfinder
/ckeditor
I have an application.cfm in my admin folder and have set:
Also, there is a login.cfm within that folder that set Session.UsersName.
In the ckfinder folder, I've updated both the 2 application.cfc (in /ckfinder/ and /ckfinder/core/connector/cfm/) by changing THIS.Name :
And then in my ckfinder/config.cfm, I have:
And it seems like the session never get detected from this page. Did I miss anything? Thanks in advance!
Re: Cannot access Coldfusion session variables in config.cfm
If you are still trying to figure out this issue, I might be able to help you. If an Application.cfc file specifies a new name the scope changes. So, if in your root Application.cfc you have something like the following: