elfinder Extension to use elFinder file manager in yii application

  1. Requirements
  2. Usage
  3. Changelog
  4. Resources

This extension allows use elFinder file manager in your Yii application. Possible usage:

  • chose file on server side (ServerFileInput widget)
  • manage files in specified folder (ElFinder widget)
  • add file browser to tinyMce wysiwyg editor

Requirements

Tested with Yii 1.1.10, but should work with previous versions too

Usage

0. Checkout source code to your project, for example to ext.elFinder

  1. Create controller for connector action, and configure it params
  2. ServerFileInput - use this widget to choose file on server using ElFinder pop-up
  3. ElFinderWidget use this widget to manage files
  4. To use TinyMceElFinder see: My TinyMce extension
// controller to host connector action
class ElfinderController extends CController
{
    public function actions()
    {
        return array(
            'connector' => array(
                'class' => 'ext.elFinder.ElFinderConnectorAction',
                'settings' => array(
                    'root' => Yii::getPathOfAlias('webroot') . '/uploads/',
                    'URL' => Yii::app()->baseUrl . '/uploads/',
                    'rootAlias' => 'Home',
                    'mimeDetect' => 'none'
                )
            ),
        );
    }
}

//server file input
$this->widget('ext.elFinder.ServerFileInput', array(
        'model' => $model,
        'attribute' => 'serverFile',
        'connectorRoute' => 'admin/elfinder/connector',
        )
);

// ElFinder widget
$this->widget('ext.elFinder.ElFinderWidget', array(
        'connectorRoute' => 'admin/elfinder/connector',
        )
);

Changelog

  • January 16, 2013 Fixed jQuery 1.8.3 compatibility, added CSRF validation support, added i18n support, begin using compressed script when not debugging
  • August 14, 2012 Fixed bug with upload(from comments here)
  • July 18, 2012 Adding support for multiple ServerFileInput instances with different connectors

    Resources

  • Extension github page (moved from bitbucket page )
  • TinyMce extension
  • ElFinder page
9 1
25 followers
4 992 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: Bogdan Savluk
Created on: Jul 8, 2012
Last updated: 9 years ago

Downloads

show all

Related Extensions