Open tenq opened 5 years ago
function makeDir(){ date_default_timezone_set('Asia/Kolkata'); $year = date("Y"); $month = date("m"); $day = date("d"); $directory = "$year/$month/$day/"; if(!is_dir($directory)){ mkdir($directory, 755, true); } return $directory; }
return array(
// GENERAL SETTINGS
'disabled' => false,
'uploadURL' => makeDir(),
'uploadDir' => "",
'theme' => "default",
'types' => array(
// (F)CKEditor types
'files' => "",
'flash' => "swf",
'images' => "*img",
// TinyMCE types
'file' => "",
'media' => "swf flv avi mpg mpeg qt mov wmv asf rm",
'image' => "*img",
),
// IMAGE SETTINGS
'imageDriversPriority' => "imagick gmagick gd",
'jpegQuality' => 90,
'thumbsDir' => ".thumbs",
'maxImageWidth' => 0,
'maxImageHeight' => 0,
'thumbWidth' => 100,
'thumbHeight' => 100,
'watermark' => "The Janambhumi",
// DISABLE / ENABLE SETTINGS
'denyZipDownload' => false,
'denyUpdateCheck' => false,
'denyExtensionRename' => false,
// PERMISSION SETTINGS
'dirPerms' => 0755,
'filePerms' => 0644,
'access' => array(
'files' => array(
'upload' => true,
'delete' => true,
'copy' => true,
'move' => true,
'rename' => true
),
'dirs' => array(
'create' => true,
'delete' => true,
'rename' => true
)
),
'deniedExts' => "exe com msi bat cgi pl php phps phtml php3 php4 php5 php6 py pyc pyo pcgi pcgi3 pcgi4 pcgi5 pchi6",
// MISC SETTINGS
'filenameChangeChars' => array(/*
' ' => "_",
':' => "."
*/),
'dirnameChangeChars' => array(/*
' ' => "_",
':' => "."
*/),
'mime_magic' => "",
'cookieDomain' => "",
'cookiePath' => "",
'cookiePrefix' => 'KCFINDER_',
// THE FOLLOWING SETTINGS CANNOT BE OVERRIDED WITH SESSION SETTINGS
'_sessionVar' => "KCFINDER",
'_check4htaccess' => true,
'_normalizeFilenames' => false,
'_dropUploadMaxFilesize' => 10485760,
//'_tinyMCEPath' => "/tiny_mce",
//'_cssMinCmd' => "java -jar /path/to/yuicompressor.jar --type css {file}",
//'_jsMinCmd' => "java -jar /path/to/yuicompressor.jar --type js {file}",
);
Hi, I`m try to create and automatic set a current folder based on year/month. When user open kcfinder, year/month (2019/03) folder automatic open and show images. If images, images/2019/03 if files files/2019/03.
in config.php add directive after theme to show/hide folders base on year/month:
'theme' => "default", 'uploads_use_yearmonth_folders' => true,
in core/class/browser.php, action function:
` public function action() {
The problem is in the session, even being correct with the folder, the files are not loaded, and thus generates an error in js/50.init.js, because there is no return of the data in json.
Opening the core/class/browse.php file, init function, when I use _printr in the $data array, has data for files and folders, but it`s not passed to javascript to view the files, causing unknow error in 50.init.js.
If you do not have this year / month setting everything works ok. If I click on any folder, it also works ok.
Any idea what I can do to solve it?