Line 1: | Line 1: | ||
− | To create a new resource type you should place the section below in your config.asp file. Note that the options you can use are | + | To create a new resource type you should place the section below in your config.asp file. Note that the options you can use are described in the [[CKFinder/Developers Guide/ASP/Configuration/Resource Types/Built-in|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. | ||
− | <pre>Set ResourceTypes( | + | <pre>Set ResourceTypes(3) = DefineResourceType( _ |
"MSdocs", _ | "MSdocs", _ | ||
baseUrl & "MSdocs", _ | baseUrl & "MSdocs", _ | ||
Line 11: | Line 11: | ||
) | ) | ||
</pre> | </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>CKFinder_Config.Add "DefaultResourceTypes", ""</nowiki> field. Example'':'' | + | The CKFinder will use all the resources types including the one specifies by you. <br> |
+ | |||
+ | You must adjust the array definition to include your new resources:<br> | ||
+ | <pre>Dim ResourceTypes(3) | ||
+ | </pre> | ||
+ | If you want to limit the CKFinder to use only your resource type you must place it in the <nowiki>CKFinder_Config.Add "DefaultResourceTypes", ""</nowiki> field. Example'':'' | ||
<pre>CKFinder_Config.Add "DefaultResourceTypes", "MSdocs"</pre> | <pre>CKFinder_Config.Add "DefaultResourceTypes", "MSdocs"</pre> | ||
{{DISPLAYTITLE:Adding new resource types}} | {{DISPLAYTITLE:Adding new resource types}} |
Revision as of 00:06, 11 January 2008
To create a new resource type you should place the section below in your config.asp file. Note that the options you can use are described 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.
Set ResourceTypes(3) = DefineResourceType( _ "MSdocs", _ baseUrl & "MSdocs", _ baseDir & "MSdocs", _ 2M, _ "doc,ppt,xls", _ "" _ )
The CKFinder will use all the resources types including the one specifies by you.
You must adjust the array definition to include your new resources:
Dim ResourceTypes(3)
If you want to limit the CKFinder to use only your resource type you must place it in the CKFinder_Config.Add "DefaultResourceTypes", "" field. Example:
CKFinder_Config.Add "DefaultResourceTypes", "MSdocs"