[1575] | 1 | <?php
|
---|
| 2 | /*
|
---|
| 3 | * FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
---|
| 4 | * Copyright (C) 2003-2009 Frederico Caldeira Knabben
|
---|
| 5 | *
|
---|
| 6 | * == BEGIN LICENSE ==
|
---|
| 7 | *
|
---|
| 8 | * Licensed under the terms of any of the following licenses at your
|
---|
| 9 | * choice:
|
---|
| 10 | *
|
---|
| 11 | * - GNU General Public License Version 2 or later (the "GPL")
|
---|
| 12 | * http://www.gnu.org/licenses/gpl.html
|
---|
| 13 | *
|
---|
| 14 | * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
---|
| 15 | * http://www.gnu.org/licenses/lgpl.html
|
---|
| 16 | *
|
---|
| 17 | * - Mozilla Public License Version 1.1 or later (the "MPL")
|
---|
| 18 | * http://www.mozilla.org/MPL/MPL-1.1.html
|
---|
| 19 | *
|
---|
| 20 | * == END LICENSE ==
|
---|
| 21 | *
|
---|
| 22 | * Configuration file for the File Manager Connector for PHP.
|
---|
| 23 | */
|
---|
| 24 |
|
---|
| 25 | global $Config ;
|
---|
| 26 |
|
---|
| 27 | // SECURITY: You must explicitly enable this "connector". (Set it to "true").
|
---|
| 28 | // WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
|
---|
| 29 | // authenticated users can access this file or use some kind of session checking.
|
---|
| 30 | $Config['Enabled'] = false ;
|
---|
| 31 |
|
---|
| 32 | // Path to user files relative to the document root.
|
---|
| 33 | $Config['UserFilesPath'] = '/userfiles/' ;
|
---|
| 34 |
|
---|
| 35 | // Fill the following value it you prefer to specify the absolute path for the
|
---|
| 36 | // user files directory. Useful if you are using a virtual directory, symbolic
|
---|
| 37 | // link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
|
---|
| 38 | // Attention: The above 'UserFilesPath' must point to the same directory.
|
---|
| 39 | $Config['UserFilesAbsolutePath'] = '' ;
|
---|
| 40 |
|
---|
| 41 | // Due to security issues with Apache modules, it is recommended to leave the
|
---|
| 42 | // following setting enabled.
|
---|
| 43 | $Config['ForceSingleExtension'] = true ;
|
---|
| 44 |
|
---|
| 45 | // Perform additional checks for image files.
|
---|
| 46 | // If set to true, validate image size (using getimagesize).
|
---|
| 47 | $Config['SecureImageUploads'] = true;
|
---|
| 48 |
|
---|
| 49 | // What the user can do with this connector.
|
---|
| 50 | $Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;
|
---|
| 51 |
|
---|
| 52 | // Allowed Resource Types.
|
---|
| 53 | $Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;
|
---|
| 54 |
|
---|
| 55 | // For security, HTML is allowed in the first Kb of data for files having the
|
---|
| 56 | // following extensions only.
|
---|
| 57 | $Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;
|
---|
| 58 |
|
---|
| 59 | // After file is uploaded, sometimes it is required to change its permissions
|
---|
| 60 | // so that it was possible to access it at the later time.
|
---|
| 61 | // If possible, it is recommended to set more restrictive permissions, like 0755.
|
---|
| 62 | // Set to 0 to disable this feature.
|
---|
| 63 | // Note: not needed on Windows-based servers.
|
---|
| 64 | $Config['ChmodOnUpload'] = 0777 ;
|
---|
| 65 |
|
---|
| 66 | // See comments above.
|
---|
| 67 | // Used when creating folders that does not exist.
|
---|
| 68 | $Config['ChmodOnFolderCreate'] = 0777 ;
|
---|
| 69 |
|
---|
| 70 | /*
|
---|
| 71 | Configuration settings for each Resource Type
|
---|
| 72 |
|
---|
| 73 | - AllowedExtensions: the possible extensions that can be allowed.
|
---|
| 74 | If it is empty then any file type can be uploaded.
|
---|
| 75 | - DeniedExtensions: The extensions that won't be allowed.
|
---|
| 76 | If it is empty then no restrictions are done here.
|
---|
| 77 |
|
---|
| 78 | For a file to be uploaded it has to fulfill both the AllowedExtensions
|
---|
| 79 | and DeniedExtensions (that's it: not being denied) conditions.
|
---|
| 80 |
|
---|
| 81 | - FileTypesPath: the virtual folder relative to the document root where
|
---|
| 82 | these resources will be located.
|
---|
| 83 | Attention: It must start and end with a slash: '/'
|
---|
| 84 |
|
---|
| 85 | - FileTypesAbsolutePath: the physical path to the above folder. It must be
|
---|
| 86 | an absolute path.
|
---|
| 87 | If it's an empty string then it will be autocalculated.
|
---|
| 88 | Useful if you are using a virtual directory, symbolic link or alias.
|
---|
| 89 | Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
|
---|
| 90 | Attention: The above 'FileTypesPath' must point to the same directory.
|
---|
| 91 | Attention: It must end with a slash: '/'
|
---|
| 92 |
|
---|
| 93 | - QuickUploadPath: the virtual folder relative to the document root where
|
---|
| 94 | these resources will be uploaded using the Upload tab in the resources
|
---|
| 95 | dialogs.
|
---|
| 96 | Attention: It must start and end with a slash: '/'
|
---|
| 97 |
|
---|
| 98 | - QuickUploadAbsolutePath: the physical path to the above folder. It must be
|
---|
| 99 | an absolute path.
|
---|
| 100 | If it's an empty string then it will be autocalculated.
|
---|
| 101 | Useful if you are using a virtual directory, symbolic link or alias.
|
---|
| 102 | Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
|
---|
| 103 | Attention: The above 'QuickUploadPath' must point to the same directory.
|
---|
| 104 | Attention: It must end with a slash: '/'
|
---|
| 105 |
|
---|
| 106 | NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to
|
---|
| 107 | "userfiles" directory to maintain backwards compatibility with older versions of FCKeditor.
|
---|
| 108 | This is fine, but you in some cases you will be not able to browse uploaded files using file browser.
|
---|
| 109 | Example: if you click on "image button", select "Upload" tab and send image
|
---|
| 110 | to the server, image will appear in FCKeditor correctly, but because it is placed
|
---|
| 111 | directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
|
---|
| 112 | The more expected behaviour would be to send images directly to "image" subfolder.
|
---|
| 113 | To achieve that, simply change
|
---|
| 114 | $Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
|
---|
| 115 | $Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ;
|
---|
| 116 | into:
|
---|
| 117 | $Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ;
|
---|
| 118 | $Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ;
|
---|
| 119 |
|
---|
| 120 | */
|
---|
| 121 |
|
---|
| 122 | $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') ;
|
---|
| 123 | $Config['DeniedExtensions']['File'] = array() ;
|
---|
| 124 | $Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . 'file/' ;
|
---|
| 125 | $Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;
|
---|
| 126 | $Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] ;
|
---|
| 127 | $Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;
|
---|
| 128 |
|
---|
| 129 | $Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ;
|
---|
| 130 | $Config['DeniedExtensions']['Image'] = array() ;
|
---|
| 131 | $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'image/' ;
|
---|
| 132 | $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;
|
---|
| 133 | $Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
|
---|
| 134 | $Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;
|
---|
| 135 |
|
---|
| 136 | $Config['AllowedExtensions']['Flash'] = array('swf','flv') ;
|
---|
| 137 | $Config['DeniedExtensions']['Flash'] = array() ;
|
---|
| 138 | $Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ;
|
---|
| 139 | $Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ;
|
---|
| 140 | $Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] ;
|
---|
| 141 | $Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ;
|
---|
| 142 |
|
---|
| 143 | $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') ;
|
---|
| 144 | $Config['DeniedExtensions']['Media'] = array() ;
|
---|
| 145 | $Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/' ;
|
---|
| 146 | $Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ;
|
---|
| 147 | $Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] ;
|
---|
| 148 | $Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ;
|
---|
| 149 |
|
---|
| 150 | ?>
|
---|