(Note updated with a correct reference) |
J.swiderski (talk | contribs) |
||
Line 20: | Line 20: | ||
{{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-2.0/userfiles/</baseURL> |
− | <baseURL>http://example.com/ | + | <baseURL>http://example.com/CKFinderJava-2.0/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>/ | + | <source lang="xml"><baseDir>/usr/tomcat-6.0.32/webapps/CKFinderJava-2.0/userfiles/</baseDir> |
− | <baseDir>C: | + | <baseDir>C:\tomcat-6.0.32\webapps\CKFinderJava-2.0\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-2.0/userfiles/</baseURL></source>|code4= |
− | <source lang="xml"><baseURL>http://example.com/ | + | <source lang="xml"><baseURL>http://example.com/CKFinderJava-2.0/userfiles/</baseURL></source>}} |
Revision as of 14:59, 14 April 2011
Contents
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>
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:
<licenceKey>put your license name here</licenceKey> <licenceName>put your license key here</licenceName>
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-2.0/userfiles/</baseURL> <baseURL>http://example.com/CKFinderJava-2.0/userfiles/</baseURL>
If you leave this field empty, the default value (/userfiles/
) will be used.
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-2.0/userfiles/</baseDir> <baseDir>C:\tomcat-6.0.32\webapps\CKFinderJava-2.0\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-2.0/userfiles/</baseURL>
If it is a full URL address, like the following one:
<baseURL>http://example.com/CKFinderJava-2.0/userfiles/</baseURL>
the path will not be discovered.