Gallery Manager extension

Often we have images gallery in our application. So I have written extension to manage images gallery.

Features:

  • Optional image name/description

  • Multiple image upload in modern browsers(single image upload in old browsers)

  • Arrange images in gallery, using drag and drop

  • Multiply image operations (edit meta information, image removal)

  • Multiply localizations (currently en/ru/uk )

To use you need:

  • Twitter bootstrap css (widget use some classes from it)

  • Image extension

Screenshot: 3010

Screen Shot 2012-07-08 at 4.08.41 AM.png

Gallery Manager usage instructions

[list=1]

[*]Checkout source code to your project, for example to ext.galleryManager.

[*]Install and configure image component(bitbucket.org/z_bodya/yii-image).

[]Import gallery models to project, by adding "ext.galleryManager.models." to import in config/main.php

[*]Add GalleryController to application or module controllerMap.

[*]Configure and save gallery model

[/list]

Example:


$gallery = new Gallery();

$gallery->name = true;

$gallery->description = true;

$gallery->versions = array(

    'small' => array(

        'resize' => array(200, null),

    ),

    'medium' => array(

        'resize' => array(800, null),

    )

);

$gallery->save();

Render widget for gallery created above:


$this->widget('GalleryManager', array(

    'gallery' => $gallery,

    'controllerRoute' => '/admin/gallery', //route to gallery controller

));

Using GalleryBehavior

Using gallery behavior is possible to add gallery to any model in application.

GalleryBehavior is under development(not tested yet) and will be finished soon, so usage examples also will be later.

Enjoy:

3008

z_bodya-yii-image-880649518c00.tar.gz

3009

z_bodya-gallerymanager-347553bc6bdc.tar.gz

Extension page

Fork me on bitbucket.

This is exactly what I am looking for, but I’m too stupid to understand the instructions and I can’t get this working.

Could you show me a working example so I can get to grips with this great product.

I’m new to all of this and without complete examples I end up making it worse and breaking things.

Hoping you can help…

Same with me ! Couldn’t have this extension to work.

It is not so hard - just try, and if you have problems you can ask for solution here.

You can try: https://bitbucket.org/z_bodya/cms-app - there is example of gallery usage

Целый день туплю, не могу заставить работать.

Может у вас завалялся архивчик для свеже сгенереного "cii webapp"?

Немножко, позже постараюсь сделать.

UPD:

Мне стало влом делать что-то с нуля, тем-более что пример уже есть,

по ссылке архив работающего приложения с галереей и дамп его базы - галерея по адересу /admin/test/gallery логин developer, пароль password

Working app and DB dump with galleryManager, to see galleryManager in action go to /admin/test/gallery and login with developer:password

http://zxbodya.cc.ua/cms-app.zip

Спасибо :) Разобрался.

Hi Bogdan,

I tried cms-app, but the i got this error:

CException

Псевдоним "ext.tinymce.TinyMce" неверен. Убедитесь, что он указывает на существующий PHP файл.

Is there an english version?

And there was no extensions in the cms package. Could you help?

Thanks Laszlo from Hungary

At this moment, all labels in cms-app are in russian language. But if you want you can change language for system messages, editing this line “Yii::app()->language = ‘ru’;” in AdminModule class.

About an error: maybe you dowloaded snapshot from bitbuket, not cloned repository with all it subrepositories… - try to clone it using mercurial or download from post above

Very professional, I like it. (Newbie :rolleyes: )

Now it works. Thanks for the help! Great app. I’m interested in the gallery module, so i will look for it in this testapp, hope i will not have more questions.

hi Bogdan:

I can run cms-test ok! but i cannot upload any picture to server when i try to use galleryManage via to "testapp/admin/test/gallery/".The folder uploads,images,protected/runtime is written by server.

How can i run it ok?

ps:when i upload a picture nothing error message give me.

3341

选择图片.PNG

3342

选择图片2.png

Folder named "gallery" in webroot should be written by web server process.

Also about error - you can see it in network tab in crome developer tools. Or alternatively - look into application log

hi Bogdan,I have same problem with this.

I test on my PC with Window 7 Apache2.2.

Folder named "gallery" can written by webserver.

And this is screenshot about Error that I captured on chrome developer tools.3373

21-10-2555 22-57-51.png

Probably something wrong with image component.

Can you show response from server? (there, should be, some description of error which occured on server - You can see it in network tab in crome developer tools)

This is some error that I can show. 3374

22-10-2555 12-07-08.png

This is "application.log" file.

I have tested something.I added photo direct to server by mysql.

3376

1.png

I tested editing and deleting.It’s work.Except Adding new image It’s not work.

3377

2.png

:)

Ok. Application log is good.

Two errors in application log was because error when uploading photos to server.

About network tab - can you show responce body after upload error?

Header:

3378

5.png

Preview:

3379

6.png

Response:

3380

response_tab.txt

If you want other Information.You can tell me more. :)

Bug was fixed, correspounding changeset.

The problem was beause of mistake in database schema, that caused crashes on some mysql configurations.

Thaks for reporting :)

Hi,

I followed all the instructions as http://www.yiiframework.com/extension/gallerymanager/

but I’m getting the below error,

Unable to resolve the request "<controller>/imgManager".

imgManager is the module name

I’m new to yii, Please help me

thanks