[ Index ] |
PHP Cross Reference of phpwcms V1.5.0 _r431 (28.01.12) |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 4 * Copyright (C) 2003-2010 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'] = true ; 31 32 33 // Path to user files relative to the document root. 34 $current_dir = explode('/include/inc_ext/', str_replace('\\', '/', dirname(__FILE__))); 35 36 $Config['UserFilesPath'] = 'picture/upload/' ; 37 38 // Fill the following value it you prefer to specify the absolute path for the 39 // user files directory. Useful if you are using a virtual directory, symbolic 40 // link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. 41 // Attention: The above 'UserFilesPath' must point to the same directory. 42 $Config['UserFilesAbsolutePath'] = $current_dir[0].'/picture/upload/' ; 43 44 // Due to security issues with Apache modules, it is recommended to leave the 45 // following setting enabled. 46 $Config['ForceSingleExtension'] = true ; 47 48 // Perform additional checks for image files. 49 // If set to true, validate image size (using getimagesize). 50 $Config['SecureImageUploads'] = true; 51 52 // What the user can do with this connector. 53 $Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ; 54 55 // Allowed Resource Types. 56 $Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ; 57 58 // For security, HTML is allowed in the first Kb of data for files having the 59 // following extensions only. 60 $Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ; 61 62 // After file is uploaded, sometimes it is required to change its permissions 63 // so that it was possible to access it at the later time. 64 // If possible, it is recommended to set more restrictive permissions, like 0755. 65 // Set to 0 to disable this feature. 66 // Note: not needed on Windows-based servers. 67 $Config['ChmodOnUpload'] = 0777 ; 68 69 // See comments above. 70 // Used when creating folders that does not exist. 71 $Config['ChmodOnFolderCreate'] = 0777 ; 72 73 /* 74 Configuration settings for each Resource Type 75 76 - AllowedExtensions: the possible extensions that can be allowed. 77 If it is empty then any file type can be uploaded. 78 - DeniedExtensions: The extensions that won't be allowed. 79 If it is empty then no restrictions are done here. 80 81 For a file to be uploaded it has to fulfill both the AllowedExtensions 82 and DeniedExtensions (that's it: not being denied) conditions. 83 84 - FileTypesPath: the virtual folder relative to the document root where 85 these resources will be located. 86 Attention: It must start and end with a slash: '/' 87 88 - FileTypesAbsolutePath: the physical path to the above folder. It must be 89 an absolute path. 90 If it's an empty string then it will be autocalculated. 91 Useful if you are using a virtual directory, symbolic link or alias. 92 Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. 93 Attention: The above 'FileTypesPath' must point to the same directory. 94 Attention: It must end with a slash: '/' 95 96 - QuickUploadPath: the virtual folder relative to the document root where 97 these resources will be uploaded using the Upload tab in the resources 98 dialogs. 99 Attention: It must start and end with a slash: '/' 100 101 - QuickUploadAbsolutePath: the physical path to the above folder. It must be 102 an absolute path. 103 If it's an empty string then it will be autocalculated. 104 Useful if you are using a virtual directory, symbolic link or alias. 105 Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. 106 Attention: The above 'QuickUploadPath' must point to the same directory. 107 Attention: It must end with a slash: '/' 108 109 NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to 110 "userfiles" directory to maintain backwards compatibility with older versions of FCKeditor. 111 This is fine, but you in some cases you will be not able to browse uploaded files using file browser. 112 Example: if you click on "image button", select "Upload" tab and send image 113 to the server, image will appear in FCKeditor correctly, but because it is placed 114 directly in /userfiles/ directory, you'll be not able to see it in built-in file browser. 115 The more expected behaviour would be to send images directly to "image" subfolder. 116 To achieve that, simply change 117 $Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ; 118 $Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ; 119 into: 120 $Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ; 121 $Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ; 122 123 */ 124 125 $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') ; 126 $Config['DeniedExtensions']['File'] = array() ; 127 $Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . 'file/' ; 128 $Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ; 129 $Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] . 'file/' ; 130 $Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] . 'file/' ; 131 132 $Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ; 133 $Config['DeniedExtensions']['Image'] = array() ; 134 $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'image/' ; 135 $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ; 136 $Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] . 'image/'; 137 $Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] . 'image/'; 138 139 $Config['AllowedExtensions']['Flash'] = array('swf','flv') ; 140 $Config['DeniedExtensions']['Flash'] = array() ; 141 $Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ; 142 $Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ; 143 $Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ; 144 $Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] . 'flash/' ; 145 146 $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') ; 147 $Config['DeniedExtensions']['Media'] = array() ; 148 $Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/' ; 149 $Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ; 150 $Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] . 'media/' ; 151 $Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] . 'media/' ; 152 153 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Jan 29 16:31:14 2012 | Cross-referenced by PHPXref 0.7.1 |