2017 © Pedro Peláez
 

yii2-extension yii2-richfilemanager

Yii 2 wrapper for servocoder/RichFilemanager

image

triawarman/yii2-richfilemanager

Yii 2 wrapper for servocoder/RichFilemanager

  • Sunday, May 14, 2017
  • by triawarman
  • Repository
  • 2 Watchers
  • 2 Stars
  • 26 Installations
  • JavaScript
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 4 % Grown

The README.md

yii2-richfilemanager

Yii 2 wrapper for servocoder/RichFilemanager, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist triawarman/yii2-richfilemanager "*"

or add, (*4)

"triawarman/yii2-richfilemanager": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

use yii\web\Controller;
use triawarman\richFilemanager\FileManagerAction;

class MediaManagerController extends Controller
{    

    public function beforeAction($action) {
        $this->enableCsrfValidation = false;
        return parent::beforeAction($action);
    }

    public function actions() {
        return[
            'file-manager'=>[
                'class' => FileManagerAction::className(),
                'auth' => true, //INFO: Default true, you could pass this option
                'serverConfig' => [
                    'options' =>[
                        "serverRoot" => true,
                        "fileRoot" => "/user_folder/"
                    ]
                ],
            ]
        ];
    }
}

and in the view, (*7)

= triawarman\richFilemanager\RichFilemanagerView::widget(); ?>

if you want passing some plugin parameters

= triawarman\richFilemanager\RichFilemanagerView::widget({
"config":{
    "options":{
        "culture":"it",
        "theme":"flat-dark"
    },
    "viewer":{
        "absolutePath":true,
        "previewUrl":"yourdomain.com/path/to/public_folder/",
        "pathToFileOnly": true
    },
}
}); ?>

Configuration that you can sets are : 1 options => culture 2 options => theme 3 options => connectorUrl 4 viewer => absolutePath 5 viewer => previewUrl 6 viewer => pathToFileOnly, (*8)

Default connectorUrl is your {active control}/file-manager if you want to change, do :, (*9)

= triawarman\richFilemanager\RichFilemanagerView::widget({"apiConnectorUrl": "your_absolute_url"}); ?>

or

= triawarman\richFilemanager\RichFilemanagerView::widget({"config":{"api":{"connectorUrl": "your_absolute_url"}}}); ?>

When doing, (*10)

= triawarman\richFilemanager\RichFilemanagerView::widget({
"config":{
    "viewer":{
        "absolutePath":true,
        "previewUrl":"yourdomain.com/path/to/public_folder/",
        "pathToFileOnly": true
    },
}
}); ?>

the selected image will provide short address e.g image.png or folder/image.png, (*11)

Documentation

More documentation can get at [https://github.com/servocoder/RichFilemanager] (https://github.com/servocoder/RichFilemanager)., (*12)

Demo

Filemanager live example: [http://fm.devale.pro] (http://fm.devale.pro)., (*13)

The Versions

14/05 2017

dev-master

9999999-dev https://github.com/triawarman/yii2-richfilemanager

Yii 2 wrapper for servocoder/RichFilemanager

  Sources   Download

MIT

The Requires

 

by Avatar triawarman

extension yii2 file manager

14/05 2017

v0.3

0.3.0.0 https://github.com/triawarman/yii2-richfilemanager

Yii 2 wrapper for servocoder/RichFilemanager

  Sources   Download

MIT

The Requires

 

by Avatar triawarman

extension yii2 file manager

14/05 2017

dev-bckp-develop

dev-bckp-develop https://github.com/triawarman/yii2-richfilemanager

Yii 2 wrapper for servocoder/RichFilemanager

  Sources   Download

MIT

The Requires

 

by Avatar triawarman

extension yii2 file manager

09/05 2017

v0.2

0.2.0.0 https://github.com/triawarman/yii2-richfilemanager

Yii 2 wrapper for servocoder/RichFilemanager

  Sources   Download

MIT

The Requires

 

by Avatar triawarman

extension yii2 file manager

09/05 2017

dev-bckp-master

dev-bckp-master https://github.com/triawarman/yii2-richfilemanager

Yii 2 wrapper for servocoder/RichFilemanager

  Sources   Download

MIT

The Requires

 

by Avatar triawarman

extension yii2 file manager

06/05 2017

v0.1

0.1.0.0 https://github.com/triawarman/yii2-richfilemanager

Yii 2 wrapper for servocoder/RichFilemanager

  Sources   Download

MIT

The Requires

 

by Avatar triawarman

extension yii2 file manager