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
Hi,
I think that the easiest way to do this is set ID for CKFinder instance:http://docs.cksource.com/ckfinder_2.x_api/symbols/CKFinder.config.html#.id than in in your config.php file you can do something like this
Re: Image resizing on only one instance of CKFinder
Worked great that mate. Thanks for the help