I would like to "pimp" CKfinder (ColdFusion) for two things
1) I have the image base-dir set to /some/path/#cookie.mailingid#/
meaning with each new E-Mail-Mailing that is being generated through my tool there will be a separate image directory, this works a charm.
Now I would like for each user to have one additional image directory that is based on his user-data, so whenever a user is constructing a new mailing he will have
a) the mailing-specific imagedir (as works now) and
b) an imagedir which is based on his username and hence always the same for the same user
Is that possible?
2) I would like to restrict the amount of images in each /#cookie.mailingid#/-Folder to x (e.g. 5).
This would mean I'd have to somehow work a control mechanism into some template (possibly FileUpload.cfc?) that first checks the amount of images present and denies upload if x has been reached already.
Any hints? Or are there variables already existent for such behaviour?
Jan
1) I have the image base-dir set to /some/path/#cookie.mailingid#/
meaning with each new E-Mail-Mailing that is being generated through my tool there will be a separate image directory, this works a charm.
Now I would like for each user to have one additional image directory that is based on his user-data, so whenever a user is constructing a new mailing he will have
a) the mailing-specific imagedir (as works now) and
b) an imagedir which is based on his username and hence always the same for the same user
Is that possible?
2) I would like to restrict the amount of images in each /#cookie.mailingid#/-Folder to x (e.g. 5).
This would mean I'd have to somehow work a control mechanism into some template (possibly FileUpload.cfc?) that first checks the amount of images present and denies upload if x has been reached already.
Any hints? Or are there variables already existent for such behaviour?
Jan

Re: Implementing 2 Image-Directories and limiting Image-Amounts
baseUrl and baseDir are just helper variables used later in resource type definitions, so the only difference here is that you can create for example baseUrl2 and baseDir2
config.baseUrl2 = "/some/path/#userid#/"; config.baseDir2 = APPLICATION.CreateCFC("Utils.FileSystem").resolveUrl(config.baseUrl2);and use them in new resource type:
btw. I would try to avoid using values from cookies to build server path.
2) In constants.cfm add new constant, for example
constants.CKFINDER_CONNECTOR_ERROR_TOO_MANY_FILES=600;
and in core/lang add entry for code 600 in language files.
In FileUpload.cfc throw this error if you detect that user has reached limit of uploded files:
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Implementing 2 Image-Directories and limiting Image-Amounts
Hi, thanks for the heads up, so far so good, now I'm not quite clear how I get the second (User Images) directory to appear als well. Do I need to specify a second upload-Button in the fckeditor-toolbar?

Edit: I checked if I simply could duplicate the 'Image' Buttons Behaviour, but since this seems quite "embedded" in the editor, I wouldn't Knwo how to start duplicating it. Maybe I would need to create a Plugin for a second Image Browser but then also I wouldn't know where to begin linking correctly.
If I try it the primitve way (just having the Flash Toolbar-Icon point to my second image directory) this is "ok", but of course I also get the Flash-Details Dialogue... I'm Stumped
Jan
Re: Implementing 2 Image-Directories and limiting Image-Amounts
I thought that you want to use both locations inside of one CKFinder window (each resource type on the left side can point to a completely separate directory).
Let me know what exactly do you want to achieve and I'll try to help you.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Implementing 2 Image-Directories and limiting Image-Amounts
I'm perfectly content to have both the mailingID-Directory and the UserID-Directory in one instance of the CKfinder-Popup.
Jan