Download the PHP package phamxuanloc/yii2-roxymce without Composer

On this page you can find all versions of the php package phamxuanloc/yii2-roxymce. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-roxymce

RoxyMce - Beautiful File manager for Tinymce

This allow to integrate TinyMce 4 with Roxy Fileman

User story

I'm try to find a good file manager for tinymce for a long time.
elFinder is good, but too much function and it's not my style. MoxieManager maybe best with tinymce, but it's too much for me.
One day, I saw roxyman, immediately, I know it is all I need.
Install

Preferred way to install this extension through composer
Either run

composer require phamxuanloc/yii2-roxymce "@dev"

Or add to require section of composer.json then run composer update

"phamxuanloc/yii2-roxymce" : "@dev" 

Configure

Just add to config/web.php

Simple config

[php]
    'modules'    => [
        'roxymce'  => [
            'class' => '\phamxuanloc\roxymce\Module',
        ]
    ]

Advanced config

[php]
    'modules'    => [
        'roxymce'  => [
            'class' => '\phamxuanloc\roxymce\Module',
            'config'=> [
            //all below is not required
                'FILES_ROOT'           => 'uploads/image', //The root directory of roxymce's resource, where can be uploaded to. if not existed, Roxy will auto create
                'DEFAULTVIEW'          => 'list', //default view when you call roxymce (thumb/list)
                'THUMBS_VIEW_WIDTH'    => '100', //default width of thumbs when thumb view activated
                'THUMBS_VIEW_HEIGHT'   => '100', //default height of thumbs when thumb view activated
                'MAX_IMAGE_WIDTH'      => '1000', //default maximum width of image allowed to upload
                'MAX_IMAGE_HEIGHT'     => '1000', //default maximum height of image allowed to upload
                'FORBIDDEN_UPLOADS'    => 'zip js jsp jsb mhtml mht xhtml xht php phtml php3 php4 php5 phps shtml jhtml pl sh py cgi exe application gadget hta cpl msc jar vb jse ws wsf wsc wsh ps1 ps2 psc1 psc2 msh msh1 msh2 inf reg scf msp scr dll msi vbs bat com pif cmd vxd cpl htpasswd htaccess', //default forbidden upload files extension
                'ALLOWED_UPLOADS'      => 'jpeg jpg png gif mov mp3 mp4 avi wmv flv mpeg', //default allowed upload files extension
                'FILEPERMISSIONS'      => '0644', //default file permissions
                'DIRPERMISSIONS'       => '0755', //default folder permissions
                'LANG'                 => 'en', //fix language interface. if NOT SET, language interface will auto follow Yii::$app->language
                'DATEFORMAT'           => 'dd/MM/yyyy HH:mm', //default datetime format
                'OPEN_LAST_DIR'        => 'yes', //default roxymce will open last dir where you leave
            ]
        ],
    ],

Usage

In your view file, call roxymce widget

Include ActiveRecord Model

[php]
//example in action create
$model = new Post(); 
//example in action update
$model = Post::findOne(['id' => 1]); 
echo \phamxuanloc\roxymce\widgets\RoxyMceWidget::widget([
    'model'       => $model, //your Model, REQUIRED
    'attribute'   => 'content', //attribute name of your model, REQUIRED if using 'model' section
    'name'        => 'Post[content]', //default name of textarea which will be auto generated, NOT REQUIRED if using 'model' section
    'value'       => isset($_POST['Post']['content']) ? $_POST['Post']['content'] : $model->content, //default value of current textarea, NOT REQUIRED
    'action'      => Url::to(['roxymce/default']), //default roxymce action route, NOT REQUIRED
    'options'     => [//TinyMce options, NOT REQUIRED, see https://www.tinymce.com/docs/
        'title' => 'RoxyMCE',//title of roxymce dialog, NOT REQUIRED
    ],
    'htmlOptions' => [],//html options of this widget, NOT REQUIRED
]);

Sample HTML without ActiveRecord Model

[php]
echo \phamxuanloc\roxymce\widgets\RoxyMceWidget::widget([
    'name'        => 'content', //default name of textarea which will be auto generated, REQUIRED if not using 'model' section
    'value'       => isset($_POST['content']) ? $_POST['content'] : '', //default value of current textarea, NOT REQUIRED
    'action'      => Url::to(['roxymce/default']), //default roxymce action route, NOT REQUIRED
    'options'     => [//TinyMce options, NOT REQUIRED, see https://www.tinymce.com/docs/
        'title' => 'RoxyMCE',//title of roxymce dialog, NOT REQUIRED
    ],
    'htmlOptions' => [],//html options of this widget, NOT REQUIRED
]);

Sample HTML Input Demo

[php]

use yii\bootstrap\Modal;
Modal::begin([
    'header' => '<h2>Hello world</h2>',
    'size' => Modal::SIZE_LARGE,
    'id' => "modal"
    //'toggleButton' => ['label' => 'click me'],
]);
echo "<div id='modalContent'><iframe width='100%' height='470px' src='".Url::to(['roxymce/default', 'type' => 'image', 'input' => 'filepath','modal'=>'modal','tabindex'=>-1,])."'></iframe></div>";

Modal::end();
[html]
<input type="text" id="filepath"/>
<a href="#" onclick="return demoPopup();">Choose Picture</a>
[javascript]
<script type="text/javascript">
    function demoPopup() {
        $('#modal').modal('show');
        return false;
    }
</script>

Screenshot & Demo

Demo

Please referrence to RoxyFileMan demo and scroll down to TinyMce section

Thumb view

thumbview

List view

listview

Upload view

upload

Resource

Bugs & Issues

Found some bugs? Just create an issue or fork it and send pull request


All versions of yii2-roxymce with dependencies

PHP Build Version
Package Version
Requires ext-gd Version *
ext-mbstring Version *
ext-zip Version *
navatech/yii2-navatech-base Version @dev
bower-asset/tinymce-dist Version ^4.3
bower-asset/fontawesome Version ^4.0
bower-asset/jquery-dateformat Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phamxuanloc/yii2-roxymce contains the following files

Loading the files please wait ....