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
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