Open gorsargsyan opened 9 years ago
You must change basePath in module config basePath = @webroot/galleries - defailt
I use this config for my projects (Yii2 advanced)
'gallery' => [
'class' => 'sadovojav\gallery\Module',
'basePath' => '@root/uploads/galleries',
],
Isset string in common\config\bootstrap
Yii::setAlias('root', dirname(dirname(__DIR__)));
And .htaccess has RewriteRule ^uploads/(.*)$ uploads/$1 [L]
In general you must set correctly basePath, and customize you .htaccess if need.
@gorsargsyan In Windows system URL with backslashes "\" is used. Mac and Linux systems have common slash "/"
can we crop images?
You can use this extension https://github.com/sadovojav/yii2-image-thumbnail, and crop image when you display gallery. Image-thumbnail use cache image, and create it at first start.
Very useful module, thank you.
Need your advice - what is the best way to set modal cropping tool (https://github.com/sadovojav/yii2-image-cutter or https://github.com/fengyuanchen/cropper) to be used as "edit" command in gallery manager?
gvital3230, I recommend this extension: https://github.com/sadovojav/yii2-image-thumbnail to crop/resize image. This extension create thumbnails dynamically. If you want crop image some self, you must use native cropper plugins, ajax, and imagine or other image library.