Enable the php filebrowser, and pull the path from the database SFIABDIRECTORY so all SFIAB's can run the same codebase without needing to individually configure fckeditor for each one

This commit is contained in:
james 2008-08-18 18:06:34 +00:00
parent 4f5727a1de
commit 191154357c

View File

@ -22,16 +22,22 @@
* Configuration file for the File Manager Connector for PHP. * Configuration file for the File Manager Connector for PHP.
*/ */
require_once("../../../../../data/config.inc.php");
mysql_connect($DBHOST,$DBUSER,$DBPASS);
mysql_select_db($DBNAME);
$q=mysql_query("SELECT * FROM config WHERE var='SFIABDIRECTORY'");
$r=mysql_fetch_object($q);
$config_sfiabdirectory=$r->val;
global $Config ; global $Config ;
// SECURITY: You must explicitly enable this "connector". (Set it to "true"). // SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only // WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
// authenticated users can access this file or use some kind of session checking. // authenticated users can access this file or use some kind of session checking.
$Config['Enabled'] = false ; $Config['Enabled'] = true ;
// Path to user files relative to the document root. // Path to user files relative to the document root.
$Config['UserFilesPath'] = '/userfiles/' ; $Config['UserFilesPath'] = $config_sfiabdirectory.'/data/userfiles/' ;
// Fill the following value it you prefer to specify the absolute path for the // Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic // user files directory. Useful if you are using a virtual directory, symbolic
@ -62,11 +68,11 @@ $Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;
// If possible, it is recommended to set more restrictive permissions, like 0755. // If possible, it is recommended to set more restrictive permissions, like 0755.
// Set to 0 to disable this feature. // Set to 0 to disable this feature.
// Note: not needed on Windows-based servers. // Note: not needed on Windows-based servers.
$Config['ChmodOnUpload'] = 0777 ; $Config['ChmodOnUpload'] = 0644 ;
// See comments above. // See comments above.
// Used when creating folders that does not exist. // Used when creating folders that does not exist.
$Config['ChmodOnFolderCreate'] = 0777 ; $Config['ChmodOnFolderCreate'] = 0755 ;
/* /*
Configuration settings for each Resource Type Configuration settings for each Resource Type
@ -124,28 +130,28 @@ $Config['AllowedExtensions']['File'] = array('7z', 'aiff', 'asf', 'avi', 'bmp',
$Config['DeniedExtensions']['File'] = array() ; $Config['DeniedExtensions']['File'] = array() ;
$Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . 'file/' ; $Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . 'file/' ;
$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ; $Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;
$Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] ; $Config['QuickUploadPath']['File'] = $Config['FileTypesPath']['File'] ;
$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ; $Config['QuickUploadAbsolutePath']['File']= $Config['FileTypesAbsolutePath']['File'] ;
$Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ; $Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ;
$Config['DeniedExtensions']['Image'] = array() ; $Config['DeniedExtensions']['Image'] = array() ;
$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'image/' ; $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'image/' ;
$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ; $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;
$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ; $Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ;
$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ; $Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ;
$Config['AllowedExtensions']['Flash'] = array('swf','flv') ; $Config['AllowedExtensions']['Flash'] = array('swf','flv') ;
$Config['DeniedExtensions']['Flash'] = array() ; $Config['DeniedExtensions']['Flash'] = array() ;
$Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ; $Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ;
$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ; $Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ;
$Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] ; $Config['QuickUploadPath']['Flash'] = $Config['FileTypesPath']['Flash'] ;
$Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ; $Config['QuickUploadAbsolutePath']['Flash']= $Config['FileTypesAbsolultePath']['Flash'] ;
$Config['AllowedExtensions']['Media'] = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ; $Config['AllowedExtensions']['Media'] = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ;
$Config['DeniedExtensions']['Media'] = array() ; $Config['DeniedExtensions']['Media'] = array() ;
$Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/' ; $Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/' ;
$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ; $Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ;
$Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] ; $Config['QuickUploadPath']['Media'] = $Config['FileTypesPath']['Media'] ;
$Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ; $Config['QuickUploadAbsolutePath']['Media']= $Config['FileTypesAbsolutePath']['Media'] ;
?> ?>