This widget will generate an input box (), with a "Select" button which when clicked will bring CKFinder's window allowing one to browse through the file repository.
There is no integration with CKEditor (there are other extensions that will do that, e.g. http://www.yiiframework.com/extension/ckeditor-ckfinder.
Please note, CKFinder is not free, but it is worth the cost in my experience.
Requirements ¶
CKfinder from http://ckfinder.com/download - version 2.1 is included with the current package.
Usage ¶
- Extract the entension to your /protected/extensions folder.
- Edit the extension file and change the following to suit your needs:
// Please change the config below to suit your needs
$this->uploadPath = dirname(Yii::app()->request->scriptFile) .'/themes/frontend/uploads/';
$this->uploadUrl = Yii::app()->getRequest()->hostInfo . Yii::app()->baseUrl.'/themes/frontend/uploads/';
- Invoke the widget in your view as below.
$this->widget('ext.finder.EImageFinder',array('fieldName'=>'my_field'));
- Once everything is working, open CKFinder's config file to put the appropriate license in.
Extra ¶
Suggestions/comments are welcomed.
Thanks
Cassiano Surek - www.surek.co.uk
One error
Please, add to view
finder.selectActionFunction = SetFileField;
before
finder.popup();
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.