Code Index

Namespaces

Classes


Namespace CKFinder.config

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Holds the default configuration settings.
Field Summary
Field Attributes Field Name and Description
<static>  
CKFinder.config.baseFloatZIndex
The base Z-index for floating dialogs and popups.
<static>  
CKFinder.config.callback
A function to be called when CKFinder will load (after receiving the result of the "Init" command, before loading files/folders from the server).
<static>  
CKFinder.config.connectorInfo
Additional (GET) parameters to send to the server with each request.
<static>  
CKFinder.config.connectorPath
Path to the server connector.
<static>  
CKFinder.config.customConfig
The URL path for the custom configuration file to be loaded.
<static>  
CKFinder.config.defaultDisplayDate
Whether to display the modification time in the files pane.
<static>  
CKFinder.config.defaultDisplayFilename
Whether to display file names in the files pane.
<static>  
CKFinder.config.defaultDisplayFilesize
Whether to display the size of a file in the files pane.
<static>  
CKFinder.config.defaultLanguage
The language to be used if CKFinder.config.language is left empty and it's not possible to localize the application to the user language.
<static>  
CKFinder.config.defaultSortBy
The default sort order of listed files.
<static>  
CKFinder.config.defaultViewType
The default file view.
<static>  
CKFinder.config.directDownload
How the "Download" command should work.
<static>  
CKFinder.config.disableHelpButton
If true, disables Help button in the toolbar.
<static>  
CKFinder.config.disableThumbnailSelection
Whether selecting thumbnails automatically created by CKFinder should be possible.
<static>  
CKFinder.config.extraPlugins
List of additional plugins to be loaded.
<static>  
CKFinder.config.fileIcons
List of available file icons, separated by a pipe.
<static>  
CKFinder.config.gallery_autoLoad
When this configuration is set to true, and there is no supported lightbox plugin already loaded in the page, the Gallery plugin will load Colorbox to present the images in the current folder when executing the View command.
<static>  
CKFinder.config.gallery_config
Configuration options for the lightbox library used by the Gallery plugin.
<static>  
CKFinder.config.height
The height of CKFinder application, in relative or absolute, e.g.
<static>  
CKFinder.config.id
The id of CKFinder instance.
<static>  
CKFinder.config.language
The user interface language localization to use.
<static>  
CKFinder.config.logStackTrace
Whether CKFinder should log stack trace when an exception occurs.
<static>  
CKFinder.config.maxSimultaneousUploads
Maximum number of files that will be sent to the server at the same time This is just the maximum number of uploads that will be requested by CKFinder, but the browser will limit anyhow the maximum number of connections to the server.
<static>  
CKFinder.config.readOnly
If this configuration is set to true, CKFinder will work in read-only mode, so the user will be able to browse the files but will not be able to introduce any changes.
<static>  
CKFinder.config.rememberLastFolder
Whether CKFinder should remember the last used folder in a cookie and open it automatically next time.
<static>  
CKFinder.config.removePlugins
List of plugins that must not be loaded.
<static>  
CKFinder.config.resourceType
Resource type to display.
<static>  
CKFinder.config.selectActionData
Additional data that should be passed to the CKFinder.config.selectActionFunction in the second argument.
<static>  
CKFinder.config.selectActionFunction
Function to be executed when file is selected.
<static>  
CKFinder.config.selectMultiple
If this configuration is set to true, the user will be able to select multiple files and perform actions with them, and not just a single file.
<static>  
CKFinder.config.selectThumbnailActionData
Additional data that should be passed to the CKFinder.config.selectThumbnailActionFunction in the second argument.
<static>  
Function to be executed when thumbnail is selected.
<static>  
CKFinder.config.showContextMenuArrow
Whether to show the arrow to launch the context menu for all browsers.
<static>  
CKFinder.config.sidebarWidth
Initial width for the sidebar (where the folders pane is located).
<static>  
CKFinder.config.skin
The skin to load.
<static>  
CKFinder.config.startupFolderExpanded
Used only when CKFinder.config.startupPath is set.
<static>  
CKFinder.config.startupPath
Resource Type and the name of the startup folder, separated with a colon If defined, CKFinder will open the selected folder automatically.
<static>  
CKFinder.config.tabIndex
The CKFinder tabindex value.
<static>  
CKFinder.config.thumbnailDelay
The number of miliseconds before requesting another thumbnail.
<static>  
CKFinder.config.uiColor
The base user interface color to be used by the editor.
<static>  
CKFinder.config.useNativeIcons
Use the icon in thumbnails views for non-pictures from the user's OS.
<static>  
CKFinder.config.width
The application width in CSS size format or pixel integer.
Namespace Detail
CKFinder.config
Since: 2.0
Holds the default configuration settings. Changes to this object are reflected in all CKFinder instances, if not specificaly specified for those instances.
// All applications created after the following setting will not load custom
// configuration files.
CKFinder.config.customConfig = '';
Field Detail
<static> {Number} CKFinder.config.baseFloatZIndex
Since: 2.0
The base Z-index for floating dialogs and popups.
config.baseFloatZIndex = 2000
Default Value:
10000

<static> {Function} CKFinder.config.callback
Since: 2.0
A function to be called when CKFinder will load (after receiving the result of the "Init" command, before loading files/folders from the server).
var finder = new CKFinder();
finder.basePath = "/ckfinder/";
finder.callback = function( api ) {
	api.openMsgDialog( "", "Almost ready to go!" );
};
finder.create();

<static> {String} CKFinder.config.connectorInfo
Since: 2.1.1
Additional (GET) parameters to send to the server with each request. The value of this configuration is appended to the query string of each server request.
config.connectorInfo = 'scale=300x300&page=Animals';
Default Value:
''

<static> {String} CKFinder.config.connectorPath
Since: 2.0
Path to the server connector. The default valued is different between various server side version of CKFinder.
config.connectorPath = '/path/to/custom/server/connector.php';
Default Value:
'core/connector/php/connector.php'

<static> {String} CKFinder.config.customConfig
Since: 2.0
The URL path for the custom configuration file to be loaded. If not overloaded with inline configurations, it defaults to the "config.js" file present in the root of the CKFinder installation directory.

CKFinder will recursively load custom configuration files defined inside other custom configuration files.
// Load a specific configuration file.
CKFinder.create( { basePath : '/ckfinder/', customConfig : '/myconfig.js' } );
// Do not load any custom configuration file.
CKFinder.create( { basePath : '/ckfinder/', customConfig : '' } );
Default Value:
'<CKFinder folder>/config.js'

<static> {Boolean} CKFinder.config.defaultDisplayDate
Since: 2.0.1
Whether to display the modification time in the files pane.
config.defaultDisplayDate = false;
Default Value:
true

<static> {Boolean} CKFinder.config.defaultDisplayFilename
Since: 2.0.1
Whether to display file names in the files pane.
config.defaultDisplayFilename = false;
Default Value:
true

<static> {Boolean} CKFinder.config.defaultDisplayFilesize
Since: 2.0.1
Whether to display the size of a file in the files pane.
config.defaultDisplayFilesize = false;

// Enable for "Images" resource type
config.defaultDisplayFilesize_Images = true;
Default Value:
true

<static> {String} CKFinder.config.defaultLanguage
Since: 2.0
The language to be used if CKFinder.config.language is left empty and it's not possible to localize the application to the user language.
config.defaultLanguage = 'it';
Default Value:
'en'

<static> {String} CKFinder.config.defaultSortBy
Since: 2.0.1
The default sort order of listed files.
config.defaultSortBy = 'date';

// It is possible to specify sort order for selected resource type.
// For example to specify sort order type for "Images" resource type:
config.defaultSortBy_Images = 'size';
Default Value:
filename

<static> {String} CKFinder.config.defaultViewType
Since: 2.0.1
The default file view.
config.defaultViewType = 'thumbnails';

// It is possible to specify view mode for selected resource type.
// For example to specify view type for "Files" resource type:
config.defaultViewType_Files = 'list';
Default Value:
thumbnails

<static> {Boolean} CKFinder.config.directDownload
Since: 2.0
How the "Download" command should work. If set to true, CKFinder will just point to the file adding ?download at the end. In this way, .htaccess can be used to send the "Content-Disposition" header and send the file.
config.directDownload = true;
Default Value:
false

<static> {Boolean} CKFinder.config.disableHelpButton
Since: 2.0
If true, disables Help button in the toolbar.
config.disableHelpButton = true;
Default Value:
false

<static> {Boolean} CKFinder.config.disableThumbnailSelection
Since: 2.0
Whether selecting thumbnails automatically created by CKFinder should be possible.
config.disableThumbnailSelection = true;

<static> {String} CKFinder.config.extraPlugins
Since: 2.0
List of additional plugins to be loaded. This is a tool setting which makes it easier to add new plugins, without having to touch and possibly breaking the CKFinder.config.plugins setting.
config.extraPlugins = 'imageresize,watermark';

<static> {String} CKFinder.config.fileIcons
Since: 2.0
List of available file icons, separated by a pipe. Icons are located in the skins/[skinname]/images/icons folder.
Default Value:
'ai|avi|bmp|cs|dll|doc|exe|fla|gif|jpg|js|mdb|mp3|ogg|pdf|ppt|rdp|swf|swt|txt|vsd|xls|xml|zip'

<static> {Boolean} CKFinder.config.gallery_autoLoad
Since: 2.2
When this configuration is set to true, and there is no supported lightbox plugin already loaded in the page, the Gallery plugin will load Colorbox to present the images in the current folder when executing the View command.
// Disable auto-loading of Colorbox to show images.
config.gallery_autoLoad = false;
Default Value:
true

<static> {Object} CKFinder.config.gallery_config
Since: 2.2
Configuration options for the lightbox library used by the Gallery plugin. Refer to the documentation of the lightbox library that you use on your website in order to find appropriate settings.
// Set Colorbox 'transition' configuration setting to 'fade'.
config.gallery_config = { transition : 'fade' };

<static> {Number|String} CKFinder.config.height
Since: 2.0
The height of CKFinder application, in relative or absolute, e.g. 30px, 5em. Note: Percentage unit is not supported yet. e.g. 30%.
config.height = 500;
config.height = '25em';
config.height = '300px';
Default Value:
'400'

<static> {String} CKFinder.config.id
Since: 2.0
The id of CKFinder instance. An optional setting, that is usually used to distinguish various CKFinder instances in the server side configuration file. This way it is possible to use different baseUrl / baseDir depending on what id is passed to the server connector.
var finder = new CKFinder();
finder.basePath = "/ckfinder/";
finder.id = "myApplication";
finder.create();

<static> {Boolean} CKFinder.config.language
Since: 2.0
The user interface language localization to use. If empty, CKFinder automatically localize the application to the user language, if supported, otherwise the CKFinder.config.defaultLanguage language is used.
// Load the German interface.
config.language = 'de';
Default Value:
''

<static> {Boolean} CKFinder.config.logStackTrace
Since: 2.0
Whether CKFinder should log stack trace when an exception occurs. Global setting, not distinguished per CKFinder instance. Note: enabling it will slow down the application. Might be useful during debugging and writing plugins. Can't be disabled in custom config.
config.logStackTrace = true;
Default Value:
false

<static> {Number} CKFinder.config.maxSimultaneousUploads
Since: 2.2
Maximum number of files that will be sent to the server at the same time This is just the maximum number of uploads that will be requested by CKFinder, but the browser will limit anyhow the maximum number of connections to the server.
// 0 == unlimited
config.maxSimultaneousUploads = 0;
// Only two files at once
config.maxSimultaneousUploads = 2;
Default Value:
1

<static> {boolean} CKFinder.config.readOnly
Since: 2.2
If this configuration is set to true, CKFinder will work in read-only mode, so the user will be able to browse the files but will not be able to introduce any changes. Thanks to this setting you will be able to use CKFinder as an online gallery.
Note: This will only disable certain UI elements. In order to successfully block file uploads or modifications you will need to adjust ACL settings accordingly in the server side configuration file.
config.readOnly = true;
Default Value:
false

<static> {Boolean} CKFinder.config.rememberLastFolder
Since: 2.0
Whether CKFinder should remember the last used folder in a cookie and open it automatically next time. In some cases, it may be required to store the name of last used folder in separate cookies for different CKFinder instances. In such case, assign the CKFinder.config.id property.
config.rememberLastFolder = false;
Default Value:
true

<static> {String} CKFinder.config.removePlugins
Since: 2.0
List of plugins that must not be loaded. This is a tool setting which makes it easier to avoid loading plugins that are otherwise automatically loaded by CKFinder.
// Disable flash uploads.
config.removePlugins = 'flashupload';
// Remove the "Basket" folder in the folders pane.
config.removePlugins = 'basket';
// Remove the "Help" button.
config.removePlugins = 'help';
// Remove all the three plugins above.
config.removePlugins = 'help,basket,flashupload';

<static> {String} CKFinder.config.resourceType
Since: 2.0
Resource type to display. By default CKFinder displays all available resource types. If ResourceType property is set, CKFinder will display only specified resource type.
var finder = new CKFinder();
finder.basePath = "/ckfinder/";
finder.resourceType = 'Images';
finder.create();
Default Value:
null (all available resource types will be shown)

<static> {Function} CKFinder.config.selectActionData
Since: 2.0
Additional data that should be passed to the CKFinder.config.selectActionFunction in the second argument.
See:
CKFinder.config.selectActionFunction

<static> {Function} CKFinder.config.selectActionFunction
Since: 2.0
Function to be executed when file is selected. The following arguments are passed: The function is executed in CKFinderAPI scope, which means that you can simply use "this" to access CKFinderAPI.
var finder = new CKFinder();
finder.selectActionData = "container";
finder.selectActionFunction = function( fileUrl, data ) {
	alert( 'Selected file: ' + fileUrl );
	// Using CKFinderAPI to show simple dialog.
	this.openMsgDialog( '', 'Additional data: ' + data['selectActionData'] );
	document.getElementById( data['selectActionData'] ).innerHTML = fileUrl;
}

<static> {boolean} CKFinder.config.selectMultiple
Since: 2.3
If this configuration is set to true, the user will be able to select multiple files and perform actions with them, and not just a single file.
config.selectMultiple = false
Default Value:
true

<static> {Function} CKFinder.config.selectThumbnailActionData
Since: 2.0
Additional data that should be passed to the CKFinder.config.selectThumbnailActionFunction in the second argument.
See:
CKFinder.config.selectThumbnailActionFunction

<static> {Function} CKFinder.config.selectThumbnailActionFunction
Since: 2.0
Function to be executed when thumbnail is selected. The following arguments are passed:
  • fileUrl - URL to a selected thumbnail
  • data - an object with aditional information about the file
    • fileUrl - URL to a target file (when selecting a thumbnail, fileUrl != data['fileUrl'], because thumbnail URL is different than target file URL)
    • fileSize - file size (in kilobytes)
    • fileDate - modification time (ex. 201105192207, format: YYYYMMDDhhmm)
    • selectActionData - additional data passed to this function (if any, see CKFinder.config.selectThumbnailActionData)
  • allFiles - An array of all selected files. Each member of the array is an object containing two properties: url which is the selected thumbnail's URL and data which is exactly the same as the data argument described above.
The function is executed in CKFinderAPI scope, which means that you can simply use "this" to access CKFinderAPI.
When defining this function, you might also want to modify the directAccess setting for thumbnails in the server side configuration file (set this option to true, otherwise the url to a thumbnail will be a dynamic link to a server connector).
var finder = new CKFinder();
finder.selectThumbnailActionData = "container";
finder.selectThumbnailActionFunction = function( fileUrl, data ) {
	alert( 'Selected file: ' + fileUrl );
	// Using CKFinderAPI to show simple dialog.
	this.openMsgDialog( '', 'Additional data: ' + data['selectThumbnailActionData'] );
	document.getElementById( data['selectThumbnailActionData'] ).innerHTML = fileUrl;
}

<static> {boolean} CKFinder.config.showContextMenuArrow
Since: 2.1
Whether to show the arrow to launch the context menu for all browsers. It will always be enabled for mobile browsers.
config.showContextMenuArrow = true;
Default Value:
false

<static> {String} CKFinder.config.sidebarWidth
Since: 2.3
Initial width for the sidebar (where the folders pane is located). The initial width could also be set by changing the respecitve CSS definitions. Leaving this configuration empty will revert to the CSS definitions. This setting can contain any applicable CSS unit. A plain number without a unit will be treated as pixels.
// Set the width to 50%
config.sidebarWidth = '50%';
Default Value:
''

<static> {String} CKFinder.config.skin
Since: 2.0
The skin to load. It may be the name of the skin folder inside the CKFinder installation path, or the name and the path separated by a comma.
config.skin = 'v2';
config.skin = 'myskin,/customstuff/myskin/';
Default Value:
'kama'

<static> {Boolean} CKFinder.config.startupFolderExpanded
Since: 2.0
Used only when CKFinder.config.startupPath is set. If set to true, the initial folder will be opened automatically on startup.
config.startupFolderExpanded = false;
Default Value:
true

<static> {String} CKFinder.config.startupPath
Since: 2.0
Resource Type and the name of the startup folder, separated with a colon If defined, CKFinder will open the selected folder automatically.
"Files:/"
config.startupPath = "Images:/cars/";

<static> {Number} CKFinder.config.tabIndex
Since: 2.0
The CKFinder tabindex value.
config.tabIndex = 1;
Default Value:
0 (zero)

<static> {Number} CKFinder.config.thumbnailDelay
Since: 2.1
The number of miliseconds before requesting another thumbnail. If your server have problems with handling many requests in a short time, increase this value.
// disable delay
config.thumbnailDelay = 0;
Default Value:
50

<static> {string} CKFinder.config.uiColor
Since: 2.1
The base user interface color to be used by the editor. Available only for the Kama skin.
// Using a color code.
config.uiColor = '#AADC6E';

// Using an HTML color name.
config.uiColor = 'Gold';

<static> {boolean} CKFinder.config.useNativeIcons
Since: 2.1
Use the icon in thumbnails views for non-pictures from the user's OS. This setting works only in Firefox.
config.useNativeIcons = true;
Default Value:
false

<static> {String|Number} CKFinder.config.width
Since: 2.0
The application width in CSS size format or pixel integer.
config.width = 850;
config.width = '75%';
Default Value:
'' (empty)

Copyright © 2003-2012, CKSource - Frederico Knabben. All rights reserved.