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
yii\base\ErrorException
Good day.
I have installed this module.
But, when i hope render it i get error:
I think it is about:
$dataProvider->pagination->pageSize = 20;
What i need to do? Thx.
20016
Hi.
Please show stack trace
20018
Are you using own /view files?
yii\base\ErrorException
No. In action method of controller i assigned gallery/default/index as showed in Instalation guide.
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
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
20070
What version of the extension are you using?
What browser are you using?
Are you have stack trace?
SyntaxError
I use Yii 2.0.11 and Browser is Google Chrome
20073
Please show the full server response to the action which the error occurs
Hi, nice extension.
I would like to ask how to change thumbs size. As far as i digged in the code it is hardcoded 110*110 thumb size. Changing the nums not effected the size of thumb.
thanks laszlo from hungary
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.