Back to index

moin  1.9.0~rc2
config.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
00004  * Copyright (C) 2003-2009 Frederico Caldeira Knabben
00005  *
00006  * == BEGIN LICENSE ==
00007  *
00008  * Licensed under the terms of any of the following licenses at your
00009  * choice:
00010  *
00011  *  - GNU General Public License Version 2 or later (the "GPL")
00012  *    http://www.gnu.org/licenses/gpl.html
00013  *
00014  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
00015  *    http://www.gnu.org/licenses/lgpl.html
00016  *
00017  *  - Mozilla Public License Version 1.1 or later (the "MPL")
00018  *    http://www.mozilla.org/MPL/MPL-1.1.html
00019  *
00020  * == END LICENSE ==
00021  *
00022  * Configuration file for the File Manager Connector for PHP.
00023  */
00024 
00025 global $Config ;
00026 
00027 // SECURITY: You must explicitly enable this "connector". (Set it to "true").
00028 // WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
00029 //            authenticated users can access this file or use some kind of session checking.
00030 $Config['Enabled'] = false ;
00031 
00032 // Path to user files relative to the document root.
00033 $Config['UserFilesPath'] = '/userfiles/' ;
00034 
00035 // Fill the following value it you prefer to specify the absolute path for the
00036 // user files directory. Useful if you are using a virtual directory, symbolic
00037 // link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
00038 // Attention: The above 'UserFilesPath' must point to the same directory.
00039 $Config['UserFilesAbsolutePath'] = '' ;
00040 
00041 // Due to security issues with Apache modules, it is recommended to leave the
00042 // following setting enabled.
00043 $Config['ForceSingleExtension'] = true ;
00044 
00045 // Perform additional checks for image files.
00046 // If set to true, validate image size (using getimagesize).
00047 $Config['SecureImageUploads'] = true;
00048 
00049 // What the user can do with this connector.
00050 $Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;
00051 
00052 // Allowed Resource Types.
00053 $Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;
00054 
00055 // For security, HTML is allowed in the first Kb of data for files having the
00056 // following extensions only.
00057 $Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;
00058 
00059 // After file is uploaded, sometimes it is required to change its permissions
00060 // so that it was possible to access it at the later time.
00061 // If possible, it is recommended to set more restrictive permissions, like 0755.
00062 // Set to 0 to disable this feature.
00063 // Note: not needed on Windows-based servers.
00064 $Config['ChmodOnUpload'] = 0777 ;
00065 
00066 // See comments above.
00067 // Used when creating folders that does not exist.
00068 $Config['ChmodOnFolderCreate'] = 0777 ;
00069 
00070 /*
00071        Configuration settings for each Resource Type
00072 
00073        - AllowedExtensions: the possible extensions that can be allowed.
00074               If it is empty then any file type can be uploaded.
00075        - DeniedExtensions: The extensions that won't be allowed.
00076               If it is empty then no restrictions are done here.
00077 
00078        For a file to be uploaded it has to fulfill both the AllowedExtensions
00079        and DeniedExtensions (that's it: not being denied) conditions.
00080 
00081        - FileTypesPath: the virtual folder relative to the document root where
00082               these resources will be located.
00083               Attention: It must start and end with a slash: '/'
00084 
00085        - FileTypesAbsolutePath: the physical path to the above folder. It must be
00086               an absolute path.
00087               If it's an empty string then it will be autocalculated.
00088               Useful if you are using a virtual directory, symbolic link or alias.
00089               Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
00090               Attention: The above 'FileTypesPath' must point to the same directory.
00091               Attention: It must end with a slash: '/'
00092 
00093         - QuickUploadPath: the virtual folder relative to the document root where
00094               these resources will be uploaded using the Upload tab in the resources
00095               dialogs.
00096               Attention: It must start and end with a slash: '/'
00097 
00098         - QuickUploadAbsolutePath: the physical path to the above folder. It must be
00099               an absolute path.
00100               If it's an empty string then it will be autocalculated.
00101               Useful if you are using a virtual directory, symbolic link or alias.
00102               Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
00103               Attention: The above 'QuickUploadPath' must point to the same directory.
00104               Attention: It must end with a slash: '/'
00105 
00106               NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to
00107               "userfiles" directory to maintain backwards compatibility with older versions of FCKeditor.
00108               This is fine, but you in some cases you will be not able to browse uploaded files using file browser.
00109               Example: if you click on "image button", select "Upload" tab and send image
00110               to the server, image will appear in FCKeditor correctly, but because it is placed
00111               directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
00112               The more expected behaviour would be to send images directly to "image" subfolder.
00113               To achieve that, simply change
00114                      $Config['QuickUploadPath']['Image']                     = $Config['UserFilesPath'] ;
00115                      $Config['QuickUploadAbsolutePath']['Image']      = $Config['UserFilesAbsolutePath'] ;
00116               into:
00117                      $Config['QuickUploadPath']['Image']                     = $Config['FileTypesPath']['Image'] ;
00118                      $Config['QuickUploadAbsolutePath']['Image']      = $Config['FileTypesAbsolutePath']['Image'] ;
00119 
00120 */
00121 
00122 $Config['AllowedExtensions']['File']      = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ;
00123 $Config['DeniedExtensions']['File']              = array() ;
00124 $Config['FileTypesPath']['File']          = $Config['UserFilesPath'] . 'file/' ;
00125 $Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;
00126 $Config['QuickUploadPath']['File']        = $Config['UserFilesPath'] ;
00127 $Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;
00128 
00129 $Config['AllowedExtensions']['Image']     = array('bmp','gif','jpeg','jpg','png') ;
00130 $Config['DeniedExtensions']['Image']      = array() ;
00131 $Config['FileTypesPath']['Image']         = $Config['UserFilesPath'] . 'image/' ;
00132 $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;
00133 $Config['QuickUploadPath']['Image']              = $Config['UserFilesPath'] ;
00134 $Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;
00135 
00136 $Config['AllowedExtensions']['Flash']     = array('swf','flv') ;
00137 $Config['DeniedExtensions']['Flash']      = array() ;
00138 $Config['FileTypesPath']['Flash']         = $Config['UserFilesPath'] . 'flash/' ;
00139 $Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ;
00140 $Config['QuickUploadPath']['Flash']              = $Config['UserFilesPath'] ;
00141 $Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ;
00142 
00143 $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') ;
00144 $Config['DeniedExtensions']['Media']      = array() ;
00145 $Config['FileTypesPath']['Media']         = $Config['UserFilesPath'] . 'media/' ;
00146 $Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ;
00147 $Config['QuickUploadPath']['Media']              = $Config['UserFilesPath'] ;
00148 $Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ;
00149 
00150 ?>