Line 7: | Line 7: | ||
* Call the '''Create''' method. | * Call the '''Create''' method. | ||
− | |||
− | |||
The example of creating CKFinder using a PHP class: | The example of creating CKFinder using a PHP class: | ||
<source lang="php"> | <source lang="php"> | ||
Line 22: | Line 20: | ||
For a full working examples please refer to the "'''_samples'''" directory. Note that in both cases it is required to include the integration file (ckfinder.js or ckfinder.php) to have access to the CKFinder class. | For a full working examples please refer to the "'''_samples'''" directory. Note that in both cases it is required to include the integration file (ckfinder.js or ckfinder.php) to have access to the CKFinder class. | ||
− | + | === Integration methods === | |
− | + | * [[/JavaScript|JavaScript integration]] - the preferred method of integration, simple, yet powerful. | |
+ | * [[/JavaScript V1|JavaScript integration (V1)]] - the old "V1" way, useful when migrating from CKFinder 1.x becuase it is possible to reuse the old code. | ||
+ | * [[/PHP V1| PHP integration]] - if you haven't worked with JavaScript or the JavaScript integration seems to be too complicated then it might be the way to go for you. |
Revision as of 10:20, 17 May 2010
Introduction
Before reading this section, please read the installation and configuration instructions and make sure that the examples located in the _samples
directory are working correctly.
The _samples
directory contains HTML files with examples of launching CKFinder by using the JavaScript code as well as a php
folder with examples of launching CKFinder by using the PHP language.
The following files are used when either the JavaScript or the PHP method of launching CKFinder is used:
-
ckfinder.js
in case of the JavaScript integration method, -
ckfinder_v1.js
in case of JavaScript V1 integration method (useful when migrating from CKFinder 1.x), -
ckfinder.php
in case of the PHP integration method.
Examples
To start the CKFinder, basically we need to do three things:
- Create an instance of a CKFinder class.
- Assign CKFinder properties.
- Call the Create method.
The example of creating CKFinder using a PHP class:
<?php $finder = new CKFinder() ; $finder->BasePath = '/ckfinder/' ; $finder->SelectFunction = 'ShowFileInfo' ; $finder->Width = 800 ; $finder->Create() ; ?>
For a full working examples please refer to the "_samples" directory. Note that in both cases it is required to include the integration file (ckfinder.js or ckfinder.php) to have access to the CKFinder class.
Integration methods
- JavaScript integration - the preferred method of integration, simple, yet powerful.
- JavaScript integration (V1) - the old "V1" way, useful when migrating from CKFinder 1.x becuase it is possible to reuse the old code.
- PHP integration - if you haven't worked with JavaScript or the JavaScript integration seems to be too complicated then it might be the way to go for you.