Hi,
We use a user id to create home folders and seperate these folders into 999 subfolders to save any single folder containing thousands of folders.
How this works is as follows:
user id = 8
we have a folder called home\0 [which contains all user home folders < 1000 up to 999]
so users id 8 would have a home folder of home/0/8
and userid 122 would have a home folder of home/0/122 and userid 2432 would have a folder 2/432 etc
so our config.php file looks like this:-
$config['Thumbnails'] = Array(
'url' => $baseUrl.'/data/images/_thumbs',
'directory' => $baseDir.'/data/images/_thumbs',
'enabled' => true,
'directAccess' => true,
'maxWidth' => 180,
'maxHeight' => 180,
'bmpSupported' => false,
'quality' => 80);
$config['images'] = Array(
'maxWidth' => '300',
'maxHeight' => '300',
'quality' => '80');
$config['userid'] = "0/8"; //this is converted but manually set for this example
$config['AccessControl'][] = Array(
'role' => '*',
'resourceType' => $config['userid'],
'folder' => '/',
'folderView' => true,
'folderCreate' => true,
'folderRename' => true,
'folderDelete' => true,
'fileView' => true,
'fileUpload' => true,
'fileRename' => true,
'fileDelete' => true
);
$config['ResourceType'][] = Array(
'name' => $config['userid'],
'url' => $baseUrl.$config['userid'].'/images',
'directory' => $baseDir.$config['userid'].'/images',
'maxSize' => "2000K",
'allowedExtensions' => 'jpg,jpeg',
'deniedExtensions' => 'png,7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip'
);
When the script executes it automatically creates the thumbnail folders for our users like this
userid 0/8 = /data/images/_thumbs/0/8/images
userid 1/232 = /data/images/_thumbs/1/232/images
Unfortunately when I then change the resourcetype name to something more meaning like "Home Drive" (so the root folder does not show as the users id "0/8" or "1/232") it causes every users home image folder thumbnails to be created in the same location.
i.e
$config['AccessControl'][] = Array(
'resourceType' => $config['userid'],
$config['ResourceType'][] = Array(
'name' => 'Home Drive',
thumbnails now get created like this:-
userid 0/8 = /data/images/_thumbs/Home Drive/images
userid 1/232 = /data/images/_thumbs/Home Drive/images
is there a way I can make the root folder name = "Home Drive" and maintain the rosource name as as the users id?
i.e
Resource fodler is displayed like this:-
+ Home Drive
+ images
instead of:
+ 0/8
+ images
hope this makes sense?
thanks
Millzee
LOL
Sesiously, 2 million + users??? and the forum is erm....DEAD!!!
This is a community forum and
This is a community forum and yes, sometimes questions are left unanswered, unfortunately. If you have a license for CKFinder you can always send a support request where we'll answer immediately all your questions.
Regarding your question. It should be enougn to set $config['Thumbnails']['directory'] and $config['Thumbnails']['url'] based on $config['userid']. Then you will be able to set a meaningful name for the resource type, without having conflicting folder names for thumbnails.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+