Hi,
I launch CKfinder in standalone mode width :
[i][i]var finder = new CKFinder() ;
finder.BasePath = '/mycms/ckfinder/' ;
finder.SelectFunction = SetFileField ;
finder.Popup() ;[/i][/i]
Is there a way to choose the ressource type at this point ?
I tried :
finder.RessourceTypes='Files';
finder.RessourceType='Files';
finder.Type='Files';... without success.
Thanks for your help.
Davy
I launch CKfinder in standalone mode width :
[i][i]var finder = new CKFinder() ;
finder.BasePath = '/mycms/ckfinder/' ;
finder.SelectFunction = SetFileField ;
finder.Popup() ;[/i][/i]
Is there a way to choose the ressource type at this point ?
I tried :
finder.RessourceTypes='Files';
finder.RessourceType='Files';
finder.Type='Files';... without success.
Thanks for your help.
Davy

Re: Choose ressource type when launch in stand alone
You'll need to adjust similar code in the PHP/ASP files to get this running inline.
Open the ckfinder.js file and replace lines 108 to 115:
if ( this.SelectFunction ) { var functionName = this.SelectFunction ; if ( typeof functionName == 'function' ) functionName = functionName.toString().match( /function ([^(]+)/ )[1] ; url += '?action=js&func=' + functionName ; }with this (now lines 108 to 123):
if ( this.resType ) { url += '?type=' + this.resType; } if ( this.SelectFunction ) { var functionName = this.SelectFunction ; if ( typeof functionName == 'function' ) functionName = functionName.toString().match( /function ([^(]+)/ )[1] ; if ( this.resType ) { url += '&action=js&func=' + functionName ; } else { url += '?action=js&func=' + functionName ; } }Now in your popup call you can define the resource type using 'resType', like this
finder.resType = 'Files';
e.g. to set the resource type to Flash:
function BrowseFiles() { var finder = new CKFinder() ; finder.resType = 'Flash'; finder.BasePath = '/mycms/ckfinder/' ; finder.SelectFunction = SetFileField ; finder.Popup() ; }I had a major headache trying to work out how to do this, so I hope you find it useful.
Re: Choose ressource type when launch in stand alone
Great.
Thank you very much.
Davy.
Re: Choose ressource type when launch in stand alone
@ Wiktor or someone else of the development team, could this be added in the next release as a feature? I wanted to submit this as a feature request, but I couldn't find where to do that...
@anyone By the way, for CKfinder 1.2.3 it are lines 118 - 126 that need to be replaced.
Re: Choose ressource type when launch in stand alone
CKFinder 1.3 has been released. It is now possible to control the startup path in CKFinder, I hope you will like it
There are a couple settings available to control the behaviour of CKFinder: RememberLastFolder, StartupPath, StartupFolderExpanded.
More information is available in the documentation.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+