承接 istvan0304/ck-image-manager 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

istvan0304/ck-image-manager

最新稳定版本:v1.8

Composer 安装命令:

composer require istvan0304/ck-image-manager

包简介

Image manager for ck editor

README 文档

README

Requirements

  • php >=7.2
  • mySQL >=5.7

Installation

The preferred way to install this extension is through composer.

  • Run

    $ php composer.phar require istvan0304/ck-image-manager "dev-master"

or add:

    "istvan0304/ck-image-manager": "dev-master"

to the require section of your application's composer.json file.

  • Run the migrate to create the database table

      yii migrate --migrationPath=@istvan0304/imagemanager/migrations
    
  • Add new modules section to your configuration file:

      'modules' => [
      	'imagemanager' => [
                      'class' => 'istvan0304\imagemanager\Module'
                  ]
      ],
    
  • Add a new component in components section of your configuration file:

      'imagemanager' => [
                  'class' => 'istvan0304\imagemanager\components\CkImageManagerComponent',
                  'useOriginalFilename' => false,     		     //use filename (seo friendly) or use a hash
                  'uploadPath' => 'uploads/files',                 //set upload path (default /uploads)
                  'allowDuplicateImage' => false,                  //Let you to upload an image more than one times (default: false)
              ],
    

Usage

For using the filebrowser in CKEditor add the filebrowserImageBrowseUrl to the clientOptions of the CKEditor widget. Tested only with CKEditor from 2amigOS.

    use dosamigos\ckeditor\CKEditor;
    
    <?= $form->field($model, 'text')->widget(CKEditor::class, [
            'options' => ['rows' => 6],
            'preset' => 'advanced',
            'clientOptions' => [
                    'filebrowserImageBrowseUrl' => yii\helpers\Url::to(['imagemanager/ck-image', 'view-mode'=>'iframe', 'select-type'=>'ckeditor']),
                ],
            ],
        ])
        ?>

Access

if use rbac set access:

    'as access' => [
            'class' => 'mdm\admin\components\AccessControl',
            'allowActions' => [
                'imagemanager/ck-image/get-image',
                'imagemanager/ck-image/preview-thumbnail'
            ]
        ],

统计信息

  • 总下载量: 293
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-02