Dan Vega wrote:
> Well application1 and 2 are client websites for example so nobody will ever
> cross applications. The problem lies here.
>
> Application 1
>   --application.cfm
> /cmsFolderMapping
>    --application.cfm
>    --fckeditor
>      --application.cfm
>
>
> I can not just set a variable that will transfer across apps.
>   

(Taking this off list so we don't pester people :D)

Here's some code out of my app:

<cfset request.FCKeditor = structNew()>
<cfset request.FCKeditor.userFilesPath = "#(a session var)#">

<cfscript>
    fckEditor = createObject("component", "/_app/cms/FCKEditor/fckeditor");
    fckEditor.instanceName    = 'bleh';
    fckEditor.value            = 'bleh';
    fckEditor.basePath        = '/_app/cms/FCKEditor/';
    fckEditor.width            = '600';
    fckEditor.height        = '600';
    fckEditor.create(); // create the editor.
</cfscript>

Note the first two lines: I'm setting a struct called 
'request.FCKEditor' and tossing in 'userFilesPath' into that. FCK's file 
manager is already built to look for the presence of 'request.FCKEditor' 
and to use it if it's present. (See the file:
/editor/filemanager/browser/default/connectors/cfm/config.cfm, around 
line 65.)

And the variable I'm tossing into 'userFilesPath' is a session var that 
was set when the user logged into the app.

Now surely - you have some way of detecting what users are logging into 
which applications, right? So when they log in, you simply set a session 
var to reflect what the directory path is that you want them to be able 
to pop around in within FCK's file manager. Pull that session var's 
value out just before firing up FCK.

Like:

(User logs into app1) <cfset session.FCK_UserFilesPath = "/app1/file/path">
(User logs into app1) <cfset session.FCK_UserFilesPath = "/app2/file/path">

The code to actually fire up FCK is generic; just use the same session 
var name in each application, and in the code just prior to calling FCK, 
and you should be set.





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286611
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to