ResponsiveFilemanager icon indicating copy to clipboard operation
ResponsiveFilemanager copied to clipboard

folder config.php

Open nzyeehaa opened this issue 6 years ago • 2 comments

separate config.php inside image folder with different message and settings... have used this successfully before (with an older version) but get an error in v9.14.0...

There is an error! The upload folder there isn't. Check your config.php file.

config.php

<?php
$config = array(
'folder_message'=>"images resized and cropped to 1280px wide, 400px high on upload, (crop before uploading to avoid problems) use only small letters - e.g 1.jpg ",

//Automatic resizing //
'image_resizing'                          => true,
'image_resizing_width'                    => 1280,
'image_resizing_height'                   => 400,
'image_resizing_mode'                     => 'auto', // same as $image_max_mode
'image_resizing_override'                 => false,

);
?>

website says

and set the config array only with the element do you need to change. (Don't change current_path,upload_dir,base_url,root).

any ideas?

P.S. ./media/images/ (base folder- works) ./media/images/accommodation/ (sub folder - works) ./media/images/slides/ (contains config.php - shows error as above)

use empty config.php with php tags still produces error so maybe it is a core issue

nzyeehaa avatar Mar 11 '20 09:03 nzyeehaa

I think it's not well documented. Looking into the code where it merges the global and the local config.php files in dialog.php:

if (file_exists($config['current_path'] . $parent . "config.php")) {
  $configTemp = include $config['current_path'] . $parent . 'config.php';
  $config = array_merge($config, $configTemp);
  $cycle = FALSE;
}

it uses include to feed $configTemp. I've changed my local config.php to this an it has worked:

<?php
return array(
  'image_max_width'                        => 800,
  'image_max_height'                       => 600,
  'fixed_image_creation'                   => true,
  'fixed_path_from_filemanager'            => array('../../../../uploads_m/'),
  'fixed_image_creation_name_to_prepend'   => array(''),
  'fixed_image_creation_to_append'         => array(''),
  'fixed_image_creation_width'             => array(350),
  'fixed_image_creation_height'            => array('')
);
?>

I'm using PHP 5.6.40

aroncal avatar Jun 02 '20 15:06 aroncal

@aroncal thank you, that solved our issue !

WebVooruit avatar Aug 14 '20 14:08 WebVooruit