Adding new resource types

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.

 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
To create a new resource type you should place the section below in your config.cfm file. Note that the options you can use are discribed in the [[CKFinder/Developers Guide/ColdFusion/Configuration/Resource Types/Built-in|Built-in resource types]] section.
+
To create a new resource type you should place the section below in your config.cfm file. Note that the options you can use are discribed in the [[CKFinder_1.x/Developers Guide/ColdFusion/Configuration/Resource Types/Built-in|Built-in resource types]] section.
  
 
Example: You want to create a resource type MSdocs which will only have files with the doc,ppt,xls extensions and be maximum 2 megabites large.
 
Example: You want to create a resource type MSdocs which will only have files with the doc,ppt,xls extensions and be maximum 2 megabites large.
Line 12: Line 12:
 
When loading CKFinder, the "type" querystring parameter can be used to display a specific type only. If "type" is omitted in the URL, the "DefaultResourceTypes" settings is used (may contain the resource type names separated by a comma). <br>If left empty, all types are loaded. If you want to limit the CKFinder to use only MSdocs resource type'','' use the following code'':''
 
When loading CKFinder, the "type" querystring parameter can be used to display a specific type only. If "type" is omitted in the URL, the "DefaultResourceTypes" settings is used (may contain the resource type names separated by a comma). <br>If left empty, all types are loaded. If you want to limit the CKFinder to use only MSdocs resource type'','' use the following code'':''
 
<pre>config.defaultResourceTypes = 'MSdocs';</pre>  
 
<pre>config.defaultResourceTypes = 'MSdocs';</pre>  
{{DISPLAYTITLE:Adding new resource types}}
+
{{#CUSTOMTITLE:Adding new resource types}}

Latest revision as of 08:29, 28 May 2010

To create a new resource type you should place the section below in your config.cfm 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 files with the 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 & 'MSdocs';
config.resourceType[1].directory = config.baseDir & 'MSdocs';
config.resourceType[1].maxSize = "2M";
config.resourceType[1].allowedExtensions = 'doc,ppt,xls';
config.resourceType[1].deniedExtensions = '';

When loading CKFinder, the "type" querystring parameter can be used to display a specific type only. If "type" is omitted in the URL, the "DefaultResourceTypes" settings is used (may contain the resource type names separated by a comma).
If left empty, all types are loaded. If you want to limit the CKFinder to use only MSdocs resource type, use the following code:

config.defaultResourceTypes = 'MSdocs';

This page was last edited on 28 May 2010, at 08:29.