Yii Framework Forum: Gallery Manager extension - Yii Framework Forum

Jump to content

  • (7 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Gallery Manager extension nice widget to manage images gallery Rate Topic: ****- 2 Votes

#21 User is offline   Bogdan Savluk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 20-April 10
  • Location:Kiev

Posted 08 November 2012 - 02:09 PM

View PostIrawana, on 08 November 2012 - 01:43 AM, said:

I followed all the instructions as http://www.yiiframew...gallerymanager/


This thread is for anouther extension: http://www.yiiframew...gallerymanager/
0

#22 User is offline   Skual 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 22-November 12

Posted 22 November 2012 - 07:02 AM

Hi, I'm having problems with uploading new image:
postimage.org/image/eki3eyh79/

There's no form and only cancel button works. When I click cancel and manually reload page image shows in the gallery as uploaded with empty name and description.

Attached File(s)

  • Attached File  error.jpg (53.37K)
    Number of downloads: 45

0

#23 User is offline   Bogdan Savluk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 20-April 10
  • Location:Kiev

Posted 22 November 2012 - 11:10 AM

View PostSkual, on 22 November 2012 - 07:02 AM, said:

Hi, I'm having problems with uploading new image:
postimage.org/image/eki3eyh79/

There's no form and only cancel button works. When I click cancel and manually reload page image shows in the gallery as uploaded with empty name and description.

Check what responce comes from server. Probably there will be error description(you can see responce from server in network tab in chrome developer tools)
0

#24 User is offline   AndreiCurelaru 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 11-November 12
  • Location:France

Posted 22 November 2012 - 11:25 AM

Sounds a good extension ideea, i'll give it a try.
Les Tags pour organiser le Forum FrenchYii : LINK
@AndreiCurelaru
0

#25 User is offline   Skual 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 22-November 12

Posted 23 November 2012 - 02:38 AM

Here's the error log.
PHP warning

call_user_func_array() expects parameter 1 to be a valid callback, class 'Image' does not have a method 'centeredpreview'

/project/htdocs/protected/extensions/galleryManager/models/GalleryPhoto.php(148)

136     }
137 
138     public function setImage($path)
139     {
140         //save image in original size
141         Yii::app()->image->load($path)->save($this->galleryDir . '/' . $this->getFileName('') . '.' . $this->galleryExt);
142         //create image preview for gallery manager
143         Yii::app()->image->load($path)->resize(300, null)->save($this->galleryDir . '/_' . $this->getFileName('') . '.' . $this->galleryExt);
144 
145         foreach ($this->gallery->versions as $version => $actions) {
146             $image = Yii::app()->image->load($path);
147             foreach ($actions as $method => $args) {
148                 call_user_func_array(array($image, $method), is_array($args) ? $args : array($args));
149             }
150             $image->save($this->galleryDir . '/' . $this->getFileName($version) . '.' . $this->galleryExt);
151         }
152     }
153 
154     public function delete()
155     {
156         $this->removeFile($this->galleryDir . '/' . $this->getFileName('') . '.' . $this->galleryExt);
157         //create image preview for gallery manager
158         $this->removeFile($this->galleryDir . '/_' . $this->getFileName('') . '.' . $this->galleryExt);
159 
160         foreach ($this->gallery->versions as $version => $actions) {

This happens with original image extension.

With modified one no properties window is shown and I get this:
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data
var resp = JSON.parse(this.response);

At jquery.galleryManager.js line 144

Attached File(s)


0

#26 User is offline   Bogdan Savluk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 20-April 10
  • Location:Kiev

Posted 23 November 2012 - 06:48 AM

View PostSkual, on 23 November 2012 - 02:38 AM, said:

PHP warning
call_user_func_array() expects parameter 1 to be a valid callback, class 'Image' does not have a method 'centeredpreview'

This happens with original image extension.


If you are using original Image extension, you should know that there is no method named "centeredpreview" - it is method added in my fork.

So if you need this method - use proper image extension, or implement your own centeredpreview method in image extension.
0

#27 User is offline   Skual 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 22-November 12

Posted 23 November 2012 - 07:07 AM

View PostBogdan Savluk, on 23 November 2012 - 06:48 AM, said:

If you are using original Image extension, you should know that there is no method named "centeredpreview" - it is method added in my fork.

So if you need this method - use proper image extension, or implement your own centeredpreview method in image extension.


I tried your fork and got the following error:
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data
var resp = JSON.parse(this.response);
At jquery.galleryManager.js line 144

0

#28 User is offline   Bogdan Savluk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 20-April 10
  • Location:Kiev

Posted 23 November 2012 - 08:56 AM

View PostSkual, on 23 November 2012 - 07:07 AM, said:

I tried your fork and got the following error:
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data
var resp = JSON.parse(this.response);
At jquery.galleryManager.js line 144


This error happens because server response is not json( as it is required by client script) - it is html text with description of an error that happend on a server.
You should look for error description in server response.
0

#29 User is offline   bit0123 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 75
  • Joined: 01-February 12
  • Location:Bangladesh

Posted 25 November 2012 - 04:59 AM

Thanks for your great extension.

Using your cms-app i can successfully access(upload image, update..) the admin gallery controller.
But the problem is in the index page the gallery is not shown.

How can i do this?
0

#30 User is offline   Skual 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 22-November 12

Posted 26 November 2012 - 03:57 AM

View PostBogdan Savluk, on 23 November 2012 - 08:56 AM, said:

This error happens because server response is not json( as it is required by client script) - it is html text with description of an error that happend on a server.
You should look for error description in server response.


I'm using GalleryBehavior.

In Google Chrome I get different error at console:
Uncaught SyntaxError: Unexpected token < jquery.galleryManager.js:144
xhr.onload jquery.galleryManager.js:144


There's no error in server response, just this (see attached)

Attached File(s)


0

#31 User is offline   Bogdan Savluk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 20-April 10
  • Location:Kiev

Posted 26 November 2012 - 08:54 AM

View PostSkual, on 26 November 2012 - 03:57 AM, said:

There's no error in server response, just this (see attached)


Response should be json - the problem is in CWebLogRoute, it appends html code to json, so response it can not be parsed as JSON.

Try to disable CWebLogRoute.
0

#32 User is offline   Skual 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 22-November 12

Posted 27 November 2012 - 02:08 AM

View PostBogdan Savluk, on 26 November 2012 - 08:54 AM, said:

Response should be json - the problem is in CWebLogRoute, it appends html code to json, so response it can not be parsed as JSON.

Try to disable CWebLogRoute.


Ok, I disabled it and now all work fine. Thanks!!
0

#33 User is offline   G0rg0t 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 19-April 12

Posted 03 December 2012 - 06:25 PM

Расширение очень понравилось. А возможно ли как-то манипулировать качеством jpeg-сжатия изображений?
0

#34 User is offline   Bogdan Savluk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 20-April 10
  • Location:Kiev

Posted 03 December 2012 - 08:22 PM

View PostG0rg0t, on 03 December 2012 - 06:25 PM, said:

Расширение очень понравилось. А возможно ли как-то манипулировать качеством jpeg-сжатия изображений?

Да, для обработки изображений используется расширение yii-image: там есть метод quality для установки качества созранения в процентах.
0

#35 User is offline   G0rg0t 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 19-April 12

Posted 04 December 2012 - 08:30 AM

View PostBogdan Savluk, on 03 December 2012 - 08:22 PM, said:

Да, для обработки изображений используется расширение yii-image: там есть метод quality для установки качества созранения в процентах.

О. Супер. Помогло:
$gallery->versions = array(
                'small' => array(
                    'resize' => array(200, null),
                    'quality' => array(75),
                ),
                'medium' => array(
                    'resize' => array(620, null),
                    'quality' => array(75),
                )
            );


А есть возможность автоматически накладывать водяной знак?
0

#36 User is offline   Bogdan Savluk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 20-April 10
  • Location:Kiev

Posted 04 December 2012 - 12:38 PM

View PostG0rg0t, on 04 December 2012 - 08:30 AM, said:

А есть возможность автоматически накладывать водяной знак?

Тут https://bitbucket.or...bodya/yii-image я добавил метод для добавления водяных знаков.
0

#37 User is offline   G0rg0t 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 19-April 12

Posted 04 December 2012 - 02:13 PM

Спасибо
0

#38 User is offline   hoacuong 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 18-December 12

Posted 18 December 2012 - 03:28 AM

I have bug please help me
When I click button on the right and it not work and I see console bug

<h1>PHP Error [8]</h1>
<p>Use of undefined constant php - assumed 'php' (D:\www\demo\protected\modules\imgManager\views\pl\_gallery_form.php:130)</p>
<pre>#0 D:\www\demo\protected\modules\imgManager\views\pl\_gallery_form.php(130): CWebApplication->handleError()
#1 D:\www\yii-1.1.12\framework\web\CBaseController.php(127): require()
#2 D:\www\yii-1.1.12\framework\web\CBaseController.php(96): PlController->renderInternal()
#3 D:\www\yii-1.1.12\framework\web\CController.php(870): PlController->renderFile()
#4 D:\www\demo\protected\modules\imgManager\controllers\PlController.php(363): PlController->renderPartial()
#5 D:\www\yii-1.1.12\framework\web\actions\CInlineAction.php(50): PlController->actionReturnGalForm()
#6 D:\www\yii-1.1.12\framework\web\CController.php(309): CInlineAction->runWithParams()
#7 D:\www\yii-1.1.12\framework\web\filters\CFilterChain.php(134): PlController->runAction()
#8 D:\www\yii-1.1.12\framework\web\filters\CFilter.php(41): CFilterChain->run()
#9 D:\www\yii-1.1.12\framework\web\filters\CFilterChain.php(131): YXssFilter->filter()
#10 D:\www\yii-1.1.12\framework\web\CController.php(292): CFilterChain->run()
#11 D:\www\yii-1.1.12\framework\web\CController.php(266): PlController->runActionWithFilters()
#12 D:\www\yii-1.1.12\framework\web\CWebApplication.php(283): PlController->run()
#13 D:\www\yii-1.1.12\framework\web\CWebApplication.php(142): CWebApplication->runController()
#14 D:\www\yii-1.1.12\framework\base\CApplication.php(162): CWebApplication->processRequest()
#15 D:\www\demo\index.php(13): CWebApplication->run()
</pre>
0

#39 User is offline   Bogdan Savluk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 20-April 10
  • Location:Kiev

Posted 18 December 2012 - 07:12 PM

This thread, is about another extension imagesgallerymanager, not about that you are using(gallerymanager).

View Posthoacuong, on 18 December 2012 - 03:28 AM, said:

I have bug please help me
When I click button on the right and it not work and I see console bug

0

#40 User is offline   rashmani 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 26-August 11

Posted 18 January 2013 - 06:20 PM

Hi Bogdan,

I've been reading and checking all the material you've setup (btw, thanks a ton!), including the test-app, which works fine on my local test server. Then I've switched to my project, installed the extension and loaded the image and bootstrap components in my main config. Finally, I've added the Controller to my controllerMap, such as:
	'controllerMap' => array(
	    'gallery'=>array(
	        'class'=>'ext.galleryManager.GalleryController',
	        'pageTitle'=>'Gallery administration',
	    ),
    ),

I want to use the GalleryBehavior with one of my models (model Structure) so I've added this to my model code:
	public function behaviors()
	{
	    return array(
	        'galleryBehavior' => array(
	            'class' => 'application.extensions.galleryManager.GalleryBehavior',
	            'idAttribute' => 'gallery_id',
	            'versions' => array(
	                'small' => array(
	                    'centeredpreview' => array(98, 98),
	                ),
	                'medium' => array(
	                    'resize' => array(800, null),
	                )
	            ),
	            'name' => true,
	            'description' => true,
	        )
	    );
	}

And to my model's view:
<?php
if ($model->galleryBehavior->getGallery() === null) {
    echo '<p>Before add photos to product gallery, you need to save product</p>';
} else {
    $this->widget('application.extensions.galleryManager.GalleryManager', array(
        'gallery' => $model->galleryBehavior->getGallery(),
    ));
}
?>


Problem is, when i call my view I get an error, file mixins.less not found, but the gallery panel gets loaded. Clicking to add images lets you choose images, but it calls an obviously wrong action (http://localhost:808...ad/gallery_id/4) and then it throws a new error while responding
Unable to resolve the request "ajaxUpload/gallery_id".


What am I doing wrong?
Thanks in advance for any hint, document or suggestion you may provide.

rash*
0

Share this topic:


  • (7 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users