Hey guys,
I'm using CKFinder with CKditor in PHP and I'm attempting to automatically resize an image if the width is over 475 pixels. I've been able to do this easily by changing the maxWidth config setting in the config.php file but when I do this it is inevitably affecting all instances of CKFinder within my CMS. What I want to do is limit this maximum width value of 475 pixels to just one of my CKFinder instances.
I've tried doing something like this but it is obviously incorrect:
$finder = new CKFinder() ;
$finder->BasePath = $ckFinderPath ;
$finder->SelectFunction = 'ShowFileInfo' ;
$finder->Config['Images']['maxWidth'] = 475;
$finder->Create();
Would somebody be able to advise me on the best way of achieving this?
Thanks in advance.
I'm using CKFinder with CKditor in PHP and I'm attempting to automatically resize an image if the width is over 475 pixels. I've been able to do this easily by changing the maxWidth config setting in the config.php file but when I do this it is inevitably affecting all instances of CKFinder within my CMS. What I want to do is limit this maximum width value of 475 pixels to just one of my CKFinder instances.
I've tried doing something like this but it is obviously incorrect:
$finder = new CKFinder() ;
$finder->BasePath = $ckFinderPath ;
$finder->SelectFunction = 'ShowFileInfo' ;
$finder->Config['Images']['maxWidth'] = 475;
$finder->Create();
Would somebody be able to advise me on the best way of achieving this?
Thanks in advance.

Re: Image resizing on only one instance of CKFinder
http://docs.cksource.com/ckfinder_2.x_api/symbols/CKFinder.config.html#.id
if ($_GET['id'] == 'yourIDName') { //set max width for images for 475 $config['Images'] = Array( 'maxWidth' => 475, 'maxHeight' => 475, 'quality' => 80); }else{ //set max width to other value or disable this feature. $config['Images'] = Array( 'maxWidth' => 0, 'maxHeight' => 0, 'quality' => 80); }Re: Image resizing on only one instance of CKFinder