Page 1 of 1
Manual Tbumbnails
Posted: Tue Oct 18, 2011 7:05 am
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
Re: Manual Tbumbnails
Posted: Tue Oct 18, 2011 12:01 pm
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
