Line 1: | Line 1: | ||
− | To create a new resource type you should place the section below in your config.php file. Note that the options you can use are discribed in the [[CKFinder/Users Guide/CKFinder Configuration/Resource Types/Built-in resource types|Built-in resource types]] section. | + | To create a new resource type you should place the section below in your config.php file. Note that the options you can use are discribed in the [[CKFinder/Users Guide/CKFinder Configuration/PHP/Resource Types/Built-in resource types|Built-in resource types]] section. |
Example: You want to create a resource type MSdocs which will only have doc,ppt,xls extensions and be maximum 2 megabites large. | Example: You want to create a resource type MSdocs which will only have doc,ppt,xls extensions and be maximum 2 megabites large. | ||
Line 8: | Line 8: | ||
'maxSize' => 2M, | 'maxSize' => 2M, | ||
'allowedExtensions' => 'doc,ppt,xls,', | 'allowedExtensions' => 'doc,ppt,xls,', | ||
− | 'deniedExtensions' => '');</pre> | + | 'deniedExtensions' => '');</pre> |
The CKFinder will use all the resources types including the one specifies by you. If you want to limit the CKFinder to use only your resource type you must place it in the <nowiki>$config['DefaultResourceTypes'] ='';</nowiki> field. Example'':'' | The CKFinder will use all the resources types including the one specifies by you. If you want to limit the CKFinder to use only your resource type you must place it in the <nowiki>$config['DefaultResourceTypes'] ='';</nowiki> field. Example'':'' | ||
<pre>$config['DefaultResourceTypes'] = 'MSdocs';</pre> | <pre>$config['DefaultResourceTypes'] = 'MSdocs';</pre> |
Revision as of 14:14, 21 December 2007
To create a new resource type you should place the section below in your config.php file. Note that the options you can use are discribed in the Built-in resource types section.
Example: You want to create a resource type MSdocs which will only have doc,ppt,xls extensions and be maximum 2 megabites large.
$config['ResourceType'][] = Array( 'name' => 'MSdocs', 'url' => $baseUrl . 'files', 'directory' => $baseDir . 'files', 'maxSize' => 2M, 'allowedExtensions' => 'doc,ppt,xls,', 'deniedExtensions' => '');
The CKFinder will use all the resources types including the one specifies by you. If you want to limit the CKFinder to use only your resource type you must place it in the $config['DefaultResourceTypes'] =''; field. Example:
$config['DefaultResourceTypes'] = 'MSdocs';