Development

HowToUseFCKeditor: config.new

You must first sign up to be able to contribute.

HowToUseFCKeditor: config.new

File config.new, 8.3 kB (added by fnoorden, 7 years ago)

FCKedit 2.5 Config.php needed for Resources Browser

Line 
1 <?php
2 /*
3  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4  * Copyright (C) 2003-2007 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  * Changes for symfony by Frank van Noorden, date: January 17, 2008
22  * The old code is left in the source and marked "Old code"
23  *
24  * Configuration file for the File Manager Connector for PHP.
25  */
26
27 global $Config ;
28
29 // SECURITY: You must explicitly enable this "connector". (Set it to "true").
30 // WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
31 //      authenticated users can access this file or use some kind of session checking.
32 //
33 // You really need to built in some code to be sure that only auth. users can access this file
34 // Old code: $Config['Enabled'] = false ;
35 $Config['Enabled'] = true ;
36
37 // Path to user files relative to the document root.
38 // Old code: $Config['UserFilesPath'] = '/userfiles/' ;
39 $Config['UserFilesPath'] = DIRECTORY_SEPARATOR . 'userfiles' . DIRECTORY_SEPARATOR ;
40
41 // Fill the following value it you prefer to specify the absolute path for the
42 // user files directory. Useful if you are using a virtual directory, symbolic
43 // link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
44 // Attention: The above 'UserFilesPath' must point to the same directory.
45 // Old code: $Config['UserFilesAbsolutePath'] = '' ;
46 $Config['UserFilesAbsolutePath'] = $_SERVER[DOCUMENT_ROOT] . $Config['UserFilesPath'] ;
47
48 // Due to security issues with Apache modules, it is recommended to leave the
49 // following setting enabled.
50 $Config['ForceSingleExtension'] = true ;
51
52 // Perform additional checks for image files
53 // if set to true, validate image size (using getimagesize)
54 $Config['SecureImageUploads'] = true;
55
56 // What the user can do with this connector
57 $Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;
58
59 // Allowed Resource Types
60 $Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;
61
62 // For security, HTML is allowed in the first Kb of data for files having the
63 // following extensions only.
64 $Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;
65
66 /*
67     Configuration settings for each Resource Type
68
69     - AllowedExtensions: the possible extensions that can be allowed.
70         If it is empty then any file type can be uploaded.
71     - DeniedExtensions: The extensions that won't be allowed.
72         If it is empty then no restrictions are done here.
73
74     For a file to be uploaded it has to fulfill both the AllowedExtensions
75     and DeniedExtensions (that's it: not being denied) conditions.
76
77     - FileTypesPath: the virtual folder relative to the document root where
78         these resources will be located.
79         Attention: It must start and end with a slash: '/'
80
81     - FileTypesAbsolutePath: the physical path to the above folder. It must be
82         an absolute path.
83         If it's an empty string then it will be autocalculated.
84         Useful if you are using a virtual directory, symbolic link or alias.
85         Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
86         Attention: The above 'FileTypesPath' must point to the same directory.
87         Attention: It must end with a slash: '/'
88
89      - QuickUploadPath: the virtual folder relative to the document root where
90         these resources will be uploaded using the Upload tab in the resources
91         dialogs.
92         Attention: It must start and end with a slash: '/'
93
94      - QuickUploadAbsolutePath: the physical path to the above folder. It must be
95         an absolute path.
96         If it's an empty string then it will be autocalculated.
97         Useful if you are using a virtual directory, symbolic link or alias.
98         Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
99         Attention: The above 'QuickUploadPath' must point to the same directory.
100         Attention: It must end with a slash: '/'
101
102         NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to
103         "userfiles" directory to maintain backwards compatibility with older versions of FCKeditor.
104         This is fine, but you in some cases you will be not able to browse uploaded files using file browser.
105         Example: if you click on "image button", select "Upload" tab and send image
106         to the server, image will appear in FCKeditor correctly, but because it is placed
107         directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
108         The more expected behaviour would be to send images directly to "image" subfolder.
109         To achieve that, simply change
110             $Config['QuickUploadPath']['Image']         = $Config['UserFilesPath'] ;
111             $Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ;
112         into:   
113             $Config['QuickUploadPath']['Image']         = $Config['FileTypesPath']['Image'] ;
114             $Config['QuickUploadAbsolutePath']['Image']     = $Config['FileTypesAbsolutePath']['Image'] ;           
115        
116 */
117
118 $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') ;
119 $Config['DeniedExtensions']['File']     = array() ;
120 $Config['FileTypesPath']['File']        = $Config['UserFilesPath'] . 'file/' ;
121 $Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;
122 // Old code: $Config['QuickUploadPath']['File']     = $Config['UserFilesPath'] ;
123 // Old code: $Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;
124 $Config['QuickUploadPath']['File']          = $Config['FileTypesPath']['File'] ;
125 $Config['QuickUploadAbsolutePath']['File']  = $Config['FileTypesAbsolutePath']['File'] ;           
126
127 $Config['AllowedExtensions']['Image']   = array('bmp','gif','jpeg','jpg','png') ;
128 $Config['DeniedExtensions']['Image']    = array() ;
129 $Config['FileTypesPath']['Image']       = $Config['UserFilesPath'] . 'image/' ;
130 $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;
131 // Old code: $Config['QuickUploadPath']['Image']        = $Config['UserFilesPath'] ;
132 // Old code: $Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;
133 $Config['QuickUploadPath']['Image']         = $Config['FileTypesPath']['Image'] ;
134 $Config['QuickUploadAbsolutePath']['Image']     = $Config['FileTypesAbsolutePath']['Image'] ;       
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 // Old code: $Config['QuickUploadPath']['Flash']        = $Config['UserFilesPath'] ;
141 // Old code: $Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ;
142 $Config['QuickUploadPath']['Flash']         = $Config['FileTypesPath']['Flash'] ;
143 $Config['QuickUploadAbsolutePath']['Flash']     = $Config['FileTypesAbsolutePath']['Flash'] ;       
144
145 $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') ;
146 $Config['DeniedExtensions']['Media']    = array() ;
147 $Config['FileTypesPath']['Media']       = $Config['UserFilesPath'] . 'media/' ;
148 $Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ;
149 // Old code: $Config['QuickUploadPath']['Media']        = $Config['UserFilesPath'] ;
150 // Old code: $Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ;
151 $Config['QuickUploadPath']['Media']         = $Config['FileTypesPath']['Media'] ;
152 $Config['QuickUploadAbsolutePath']['Media']     = $Config['FileTypesAbsolutePath']['Media'] ;       
153
154 ?>