In my use of CKFinder, each user has access to image files they have uploaded into their own file area, so they have read/write access to that area, and that's all working fine.
In addition to this, I'd like to provide access to a shared file area that's read-only and common to all users. Ideally this would appear as a second folder in the left-hand column.
How can I do that?
[SOLVED]
Answering my own question by reading the docs in config.php!
First I added a Library resource type:
Then I added an AccessControl entry for it with read-only settings:
and finally added it to the front of my DefaultResources setting:
And it's all happy.
Ah, not quite...
The above works fine for a standalone instance of ckfinder, but when it's loaded from ckeditor, the resources are set by ckeditor config, which in my case includes this line:
This only includes access to a single resource type. It works if I set it to 'Library', but I can't see how to make it show both at once. I tried setting it to 'Library,Images'. I tried making up a property name, but this doesn't work either:
How do I tell it to show both? What's the equivalent of '$config['DefaultResourceTypes'] = 'Library,Images';' from the PHP side?
I found a duplicate of this
I found a duplicate of this question here. Unfortunately that was not answered clearly - although multiple resource types work fine when CKFinder is used standalone, it doesn't work from within CKEditor. I don't see why it should render differently when it's the same config. Is this supposed to be possible?
Workaround found!
I figured that the reson CKEditor only specifies a single resource type is to provide selection for specific media types, hence the different settings for Images and Flash. Since I only have two resource types defined, and both are images, setting this as the image browser URL allowed it to show both types in the CKEditor image selector:
Clearly this won't work if you have non-image resource types defined, but it's a workable solution for me.