Yii 2.0: yii2-photo-gallery

blueimp gallery in your Yii2 application with fileupload
5 followers

Photo gallery based on blueimp gallery extension with fileupload

The links of this extension

Github: https://github.com/onmotion/yii2-gallery
Packagist: https://packagist.org/onmotion/yii2-gallery

Requirements

Yii 2.0 or above

Usage

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist onmotion/yii2-gallery "*"

or add

"onmotion/yii2-gallery": "*"

to the require section of your composer.json file.

Usage

  • You must add to your config:
    'modules' => [ 
    //... 
    'gallery' => [
            'class' => 'onmotion\gallery\Module',
        ],
        //...
    ]
  • Apply migration, run:
php yii migrate --migrationPath=@vendor/onmotion/yii2-gallery/migrations
  • Go to your application in your browser
http://your-host/gallery

If you want change the view, you can add to your config:

 'components' => [
        //...
        'view' => [
            'theme' => [
                'pathMap' => [
                    '@vendor/onmotion/yii2-gallery/views' => '@app/views/gallery', // example: @app/views/gallery/default/index.php
                ],
            ],
        ],
        //...
    ],

then you need to copy directory 'default' from @vendor/onmotion/yii2-gallery/views to @app/views/gallery and change it as you want.

More samples how it works you can see at blueimp gallery page

Total 11 comments

#20075 report it
Elchin Abilov at 2017/04/28 02:25pm
SyntaxError

Click here

#20074 report it
onmotion at 2017/04/28 02:14pm
#20073

Please show the full server response to the action which the error occurs

#20073 report it
Elchin Abilov at 2017/04/28 02:07pm
SyntaxError

I use Yii 2.0.11 and Browser is Google Chrome

#20071 report it
onmotion at 2017/04/28 01:32pm
#20070

What version of the extension are you using? What browser are you using? Are you have stack trace?

#20070 report it
Elchin Abilov at 2017/04/28 01:07pm
SyntaxError: Unexpected token < in JSON at position 0

When I click the plus icon in index page for Create Gallery then I see error SyntaxError: Unexpected token < in JSON at position 0

Please help me

#20021 report it
onmotion at 2017/01/23 01:29pm
#20020
In action method of controller i assigned gallery/default/index as showed in Instalation guide

I dont understand what you mean...

And latest guide here https://github.com/onmotion/yii2-gallery

#20020 report it
Drugpunker at 2017/01/23 12:48pm
yii\base\ErrorException

No. In action method of controller i assigned gallery/default/index as showed in Instalation guide.

#20019 report it
onmotion at 2017/01/23 12:30pm
#20018

Are you using own /view files?

#20018 report it
Drugpunker at 2017/01/23 12:06pm
yii\base\ErrorException

... ST

#20017 report it
onmotion at 2017/01/23 11:43am
#20016

Hi.

Please show stack trace

#20016 report it
Drugpunker at 2017/01/23 11:37am
yii\base\ErrorException

Good day. I have installed this module. But, when i hope render it i get error:

Creating default object from empty value

I think it is about:

$dataProvider->pagination->pageSize = 20;

What i need to do? Thx.

Leave a comment

Please to leave your comment.

Create extension
Downloads
No downloadable files yet