Quick Start"

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.

(Article contents added, CheckAuthentication code missing)
 
(Removed 2.0)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{CKFinder_2.x_CheckAuthentication}}
+
== Enabling CKFinder ==
  
<source lang="java">
+
 
 +
As explained in the [[CKFinder_2.x/Developers Guide/Java/Installation|Installation Guide]] due to security reasons by default CKFinder is disabled. When you reviewed the settings and are ready to go, open the configuration file and enable the program.
 +
<source lang="xml">
 +
<enabled>true</enabled>
 
</source>
 
</source>
  
{{CKFinder_2.x Sessions note|lang=PHP}}
+
 
 +
<note>
 +
Usually enabling the file manager for anyone is not a recommended solution and a more fine-grained authentication method is needed. After you enable CKFinder access can be restricted by using the <code>checkAuthentication</code> method to ensure that requests are coming from an authenticated user with required privileges.
 +
 
 +
In order to create a custom <code>checkAuthentication</code> method, override it from the <code>Configuration</code> class, as explained in the [[CKFinder_2.x/Developers_Guide/Java/Integration#Extending_Configuration|Extending Configuration]] section of the [[CKFinder_2.x/Developers_Guide/Java/Integration|Integrating CKFinder]] article.
 +
</note>
 +
 
  
 
{{CKFinder_2.x License|file=<code>config.xml</code>|code=
 
{{CKFinder_2.x License|file=<code>config.xml</code>|code=
<source lang="xml"><licenceKey>put your license name here</licenceKey>
+
<source lang="xml"><licenseKey>put your license name here</licenseKey>
<licenceName>put your license key here</licenceName></source>}}
+
<licenseName>put your license key here</licenseName></source>}}
  
 
{{CKFinder_2.x baseUrl|baseUrl=baseURL|code=
 
{{CKFinder_2.x baseUrl|baseUrl=baseURL|code=
<source lang="xml"><baseURL>/userfiles/</baseURL>
+
<source lang="xml"><baseURL>/CKFinderJava/userfiles/</baseURL>
<baseURL>http://example.com/ckfinder/files/</baseURL></source>}}
+
<baseURL>http://example.com/CKFinderJava/userfiles/</baseURL></source>}}
  
  
 
{{CKFinder_2.x baseDir|lang=Java|baseUrl=baseURL|baseDir=baseDir|code1=
 
{{CKFinder_2.x baseDir|lang=Java|baseUrl=baseURL|baseDir=baseDir|code1=
<source lang="xml"><baseDir>/home/login/public_html/ckfinder/files/</baseDir>
+
<source lang="xml"><baseDir>/usr/tomcat-6.0.32/webapps/CKFinderJava/userfiles/</baseDir>
<baseDir>C:/SiteDir/CKFinder/userfiles/</baseDir></source>|code2=
+
<baseDir>C:\tomcat-6.0.32\webapps\CKFinderJava\userfiles\</baseDir></source>|code2=
 
<source lang="xml"><baseDir></baseDir></source>|code3=
 
<source lang="xml"><baseDir></baseDir></source>|code3=
<source lang="xml"><baseURL>/userfiles/</baseURL></source>|code4=
+
<source lang="xml"><baseURL>/CKFinderJava/userfiles/</baseURL></source>|code4=
<source lang="xml"><baseURL>http://example.com/ckfinder/files/</baseURL></source>}}
+
<source lang="xml"><baseURL>http://example.com/CKFinderJava/userfiles/</baseURL></source>}}
 +
 
 +
 
 +
== More on baseURL and baseDir ==
 +
For more information on proper configuration of the <code>baseURL</code> and <code>baseDir</code> parameters refer to the [[CKFinder_2.x/Developers_Guide/Java/Configuration/baseURL_and_baseDir| baseURL and baseDir Parameters Explained]] article.

Latest revision as of 20:30, 2 May 2011

Enabling CKFinder

As explained in the Installation Guide due to security reasons by default CKFinder is disabled. When you reviewed the settings and are ready to go, open the configuration file and enable the program.

<enabled>true</enabled>


important note

Usually enabling the file manager for anyone is not a recommended solution and a more fine-grained authentication method is needed. After you enable CKFinder access can be restricted by using the checkAuthentication method to ensure that requests are coming from an authenticated user with required privileges.

In order to create a custom checkAuthentication method, override it from the Configuration class, as explained in the Extending Configuration section of the Integrating CKFinder article.


License

If you purchased CKFinder, you should put your license key in the config.xml file:

<licenseKey>put your license name here</licenseKey>
<licenseName>put your license key here</licenseName>

If you leave these fields blank, CKFinder will be fully functional, but it will be running in demonstration mode.

baseURL

The baseURL is the base path used to build the final URL for the resources handled by CKFinder.

Examples:

<baseURL>/CKFinderJava/userfiles/</baseURL>
<baseURL>http://example.com/CKFinderJava/userfiles/</baseURL>

If you leave this field empty, the default value (/userfiles/) will be used.

important note

Please note that the trailing slash is required.


baseDir

The baseDir is the path to the local directory (on the server) which points to the baseURL URL described above. This is the path used by CKFinder to handle the files on the server. Full write permissions must be granted to this directory.

You may point it to a directory directly:

<baseDir>/usr/tomcat-6.0.32/webapps/CKFinderJava/userfiles/</baseDir>
<baseDir>C:\tomcat-6.0.32\webapps\CKFinderJava\userfiles\</baseDir>

Or you may let CKFinder discover the path based on baseURL:

<baseDir></baseDir>

by leaving the baseDir value empty.

Bear in mind that CKFinder will only discover the path, when the base URL is a local Web path (relative to document root). Example:

<baseURL>/CKFinderJava/userfiles/</baseURL>

If it is a full URL address, like the following one:

<baseURL>http://example.com/CKFinderJava/userfiles/</baseURL>

the path will not be discovered.

important note

Please note that the trailing slash is required.


More on baseURL and baseDir

For more information on proper configuration of the baseURL and baseDir parameters refer to the baseURL and baseDir Parameters Explained article.

This page was last edited on 2 May 2011, at 20:30.