z_bodya/yii-elfinder

用于在yii应用程序中使用elFinder 1.x文件管理器的扩展

安装次数: 2,171

依赖项: 0

建议者: 0

安全: 0

星标: 2

关注者: 6

分支: 2

开放问题: 0

语言:JavaScript

类型:yii-extension

1.0.0 2013-04-15 13:09 UTC

This package is not auto-updated.

Last update: 2024-09-14 14:39:59 UTC


README

  1. 将源代码检查到您的项目中,例如到ext.elFinder

  2. 创建用于连接操作的控制器,并配置其参数

     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 - 使用此小部件通过ElFinder弹出窗口在服务器上选择文件

       $this->widget('ext.elFinder.ServerFileInput', array(
               'model' => $model,
               'attribute' => 'serverFile',
               'connectorRoute' => 'admin/elfinder/connector',
               )
       );
    
  4. ImageFileInput - 与ServerFileInput类似。显示小图预览而不是文件文本路径。

       $this->widget('ext.elFinder.ImageFileInput', array(
               'model' => $model,
               'attribute' => 'imageFile',
               'connectorRoute' => 'admin/elfinder/connector',
               )
       );
    
  5. ElFinderWidget 使用此小部件来管理文件

       $this->widget('ext.elFinder.ElFinderWidget', array(
               'connectorRoute' => 'admin/elfinder/connector',
               )
       );
    
  6. 要使用TinyMceElFinder,请参阅:https://bitbucket.org/z_bodya/yii-tinymce