1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Added e107::getThumb() to get thumbnailer class. Added a test for it. Styling fix for admin-ui grid.

This commit is contained in:
Cameron
2020-03-09 13:41:00 -07:00
parent 0ef918eb59
commit a200d312d8
4 changed files with 53 additions and 9 deletions

View File

@@ -361,24 +361,32 @@ class e_thumbpage
{
$start = microtime(true);
}
@require(e_HANDLER.'phpthumb/ThumbLib.inc.php');
try
// @require(e_HANDLER.'phpthumb/ThumbLib.inc.php');
if(!$thumb = e107::getThumb($this->_src_path))
{
$thumb = PhpThumbFactory::create($this->_src_path);
$sizeUp = ($this->_request['w'] > 110 || $this->_request['aw'] > 110) ? true : false; // don't resizeUp the icon images.
$thumb->setOptions(array(
if(getperms('0'))
{
echo "Couldn't load thumb factory";
}
return null;
}
$sizeUp = ($this->_request['w'] > 110 || $this->_request['aw'] > 110) ? true : false; // don't resizeUp the icon images.
$thumb->setOptions(array(
'correctPermissions' => true,
'resizeUp' => $sizeUp,
'jpegQuality' => $this->_thumbQuality,
'interlace' => true // improves performance
));
}
catch (Exception $e)
/* catch (Exception $e)
{
echo $e->getMessage();
return $this;
}
}*/
// Image Cropping by Quadrant.
if(!empty($options['c'])) // $quadrant T(op), B(ottom), C(enter), L(eft), R(right)