Coder Social home page Coder Social logo

onmotion / yii2-gallery Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 12.0 623 KB

blueimp gallery in your Yii2 application

License: GNU General Public License v3.0

PHP 76.06% CSS 7.62% JavaScript 16.33%
blueimp-gallery yii2-gallery gallery yii2-extension yii2-modules

yii2-gallery's Introduction

Yii2 Gallery module

blueimp gallery in your Yii2 application with fileupload

Latest Stable Version Total Downloads Monthly Downloads License

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

  1. You must add to your config:
'modules' => [
		//...
        'gallery' => [
            'class' => 'onmotion\gallery\Module',
        ],
        //...
    ]
  1. Apply migration, run:
php yii migrate --migrationPath=@vendor/onmotion/yii2-gallery/migrations
  1. 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/default' => '@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

yii2-gallery's People

Contributors

nicdnepr avatar onmotion avatar sabi1981 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

yii2-gallery's Issues

upload and display issue

Hello,
first i want to thank you for making such a great module.
I have integrated the code in my application, it works fine on the localhost, but when i have tried the same on live server it does not work.
1st issue is when the image is uploaded it generates only black image.
2nd issue is when is select multiple images for upload, it only save 1 image.
3rd issue is im unable to upload new or edit the gallery
im using godday server for testing.
Please reply if you need more details on it
Thank you

Upload error: unable to open image

Hello Guy,

I trying to upload some images but the error is output:

Modal title:
13600043_1170163906358463_8482439776291589314_n.jpg: SyntaxError: Unexpected token U in JSON at position 0.

Modal content:
Upload error: unable to open image `/var/www/html/yii2-app-ccer/uploads/gallery/My Photos/57d8a99d557c0.jpg': No such file or directory @ error/blob.c/OpenBlob/2641

Please can you help me?

Great work. Thanks!

SyntaxError: Unexpected token < in JSON at position 7

Hi @onmotion ,

It seems a tiny bug is triggered by the create code, I took a look and in the module you've got a comment that //route doesn't work. It appears the Urlmanager rule fails dependending on its position in the config.

I replaced it with the following more specific rule, it should work anywhere in the config baring other conflict. You may close this issue if you agree, hopefully this will help someone.

'gallery/<action:[\w-]+>' => 'gallery/default/<action>',

Great work in the module, thanks

Adam

Image is not uploading at all

Greetings! I've just found this awesome module and first of all I want to thank you for doing this.

I have an issue that doesn't let me upload any image, I just press on the "Upload image" text, then I browse one image file(png or jpg), and press on enter or just "okay" in order to upload it, but nothing happenes, the "Upload photo" element just goes back to the initial state and I have no error, and no insertion to database, I can create endless galleries though, can't upload any images to any of the galleries and I'm kinda stuck.

Thank you in advance

How to upload a photo

I installed the module, everything is working ok but how to upload a photo?
When i click "Upload photo" i only see a spining icon. If i click it, then i can browse my computer to select photos but after that nothing happens. There is no upload button.
Screenshot_2

How do you activate slideshow?

Hi @onmotion ,

Is there a way to activate the slideshow considering that the source code shows the following;
`'pluginOptions' => [
'slideshowInterval' => 2000,
'transitionSpeed' => 200,
],

`
Thanks

Create page not Shown

Hi good morning
I already installed and do all step for installation. The gallery can access from host/gallery but I can add new gallery. When click + icon it looks like shown some modal because the screen darker than before but nothing is shown up? what is wrong?
on motion error

I try to access it manually to host/gallery/default/create and the create page is shown but can not save

thanks in advance

You can not see images

Hi.
I have set up, create an album, upload pictures, but they are not displayed.
I'm sorry for my bad english.
img

Add galleryPath for portability

Hi @onmotion ,

I suggest you include a public variable for the gallery path in the module for more portability.

For example in main config file;
`
...

'gallery' =>
[
'class' => 'onmotion\gallery\Module',
'galleryPath' => '@storage/web/img/gallery/',
],
`
In the module;
...

public $galleryPath = '@app/web/img/gallery/';

Then replace every instance of @app/web/img/gallery/' in the controller with $this->module->galleryPath

Thanks once again,

Adam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.