z_bodya/yii-elfinder

Extension to use elFinder 1.x file manager in yii application

Installs: 2 175

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 6

Forks: 2

Open Issues: 0

Language:JavaScript

Type:yii-extension

1.0.0 2013-04-15 13:09 UTC

This package is not auto-updated.

Last update: 2024-12-21 16:05:10 UTC


README

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

  2. Create controller for connector action, and configure it params

     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'
                     )
                 ),
             );
         }
     }
    
  3. ServerFileInput - use this widget to choose file on server using ElFinder pop-up

       $this->widget('ext.elFinder.ServerFileInput', array(
               'model' => $model,
               'attribute' => 'serverFile',
               'connectorRoute' => 'admin/elfinder/connector',
               )
       );
    
  4. ImageFileInput - similar to ServerFileInput. Displays small image preview instead of textual path to file.

       $this->widget('ext.elFinder.ImageFileInput', array(
               'model' => $model,
               'attribute' => 'imageFile',
               'connectorRoute' => 'admin/elfinder/connector',
               )
       );
    
  5. ElFinderWidget use this widget to manage files

       $this->widget('ext.elFinder.ElFinderWidget', array(
               'connectorRoute' => 'admin/elfinder/connector',
               )
       );
    
  6. To use TinyMceElFinder see: https://bitbucket.org/z_bodya/yii-tinymce