New"

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

Line 3: Line 3:
 
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.
 
<pre>config.resourceType[1] = structNew();
 
<pre>config.resourceType[1] = structNew();
config.resourceType[1].name = 'IMSdocs';
+
config.resourceType[1].name = 'MSdocs';
 
config.resourceType[1].url = config.baseUrl &amp; 'images';
 
config.resourceType[1].url = config.baseUrl &amp; 'images';
 
config.resourceType[1].directory = config.baseDir &amp; 'images';
 
config.resourceType[1].directory = config.baseDir &amp; 'images';

Revision as of 11:36, 3 January 2008

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[1] = structNew();
config.resourceType[1].name = 'MSdocs';
config.resourceType[1].url = config.baseUrl & 'images';
config.resourceType[1].directory = config.baseDir & 'images';
config.resourceType[1].maxSize = "2M";
config.resourceType[1].allowedExtensions = 'doc,ppt,xls';
config.resourceType[1].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';