Manual Tbumbnails

Admiror Gallery is free extension for Joomla! based websites. Admiror Gallery is all in one, a simple and instant solution for rendering image gallery from folder with images, but very flexible and adaptable.
Post Reply
Message
Author
myownfixz
Posts: 1
Joined: Tue Oct 18, 2011 7:02 am

Manual Tbumbnails

#1 Post by myownfixz »

I am a beginner, Previously, I thank you for the component / plugin Admiror Gallery, which is helpful galleries featuring the product on my website.

There are things I would ask, can I create thumbnails manually and then uploaded?

I strongly expect help and replies, thank you

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Manual Tbumbnails

#2 Post by Vasiljevski »

Yes, but it's not an easy task :)

The easiest way is first to disable the change of parameters checking when creating thumbnails.

Open "\plugins\content\AdmirorGallery\classes\agGallery.php" and comment out this code :

Code: Select all

                    list($imagewidth, $imageheight) = getimagesize($thumb_file);
                    switch ($this->params['thumbAutoSize']) {
                        case "none":
                            if ($imageheight != $this->params['thumbHeight'] || $imagewidth != $this->params['thumbWidth']) {
                                $this->addError(agHelper::ag_createThumb($this->imagesFolderPhysicalPath . $imagesValue, $thumb_file, $this->params['thumbWidth'], $this->params['thumbHeight'], $this->params['thumbAutoSize']));
                            }
                            break;
                        case "height":
                            if ($imagewidth != $this->params['thumbWidth']) {
                                $this->addError(agHelper::ag_createThumb($this->imagesFolderPhysicalPath . $imagesValue, $thumb_file, $this->params['thumbWidth'], $this->params['thumbHeight'], $this->params['thumbAutoSize']));
                            }
                            break;
                        case "width":
                            if ($imageheight != $this->params['thumbHeight']) {
                                $this->addError(agHelper::ag_createThumb($this->imagesFolderPhysicalPath . $imagesValue, $thumb_file, $this->params['thumbWidth'], $this->params['thumbHeight'], $this->params['thumbAutoSize']));
                            }
                            break;
                    }
This will disable automatic thumbs refreshing on size change. Now just put your custom thumbs in "plugins\content\AdmirorGallery\thumbs\[imagefoldername]". Needles to say that thumbs names have to be corresponding to the real images :)
Help Admiror Gallery become even better,
give us a review on JED

Post Reply