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 *
22 * Configuration file for the File Manager Connector for PHP.
23 */
24
25global $Config ;
26
27// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
28// WARNING: don't just set "ConfigIsEnabled = 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
33// Path to user files relative to the document root.
34$Config['UserFilesPath'] = '/userfiles/' ;
35
36// Fill the following value it you prefer to specify the absolute path for the
37// user files directory. Usefull if you are using a virtual directory, symbolic
38// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
39// Attention: The above 'UserFilesPath' must point to the same directory.
40$Config['UserFilesAbsolutePath'] = '' ;
41
42// Due to security issues with Apache modules, it is reccomended to leave the
43// following setting enabled.
44$Config['ForceSingleExtension'] = true ;
45
46// Perform additional checks for image files
47// if set to true, validate image size (using getimagesize)
48$Config['SecureImageUploads'] = true;
49
50// What the user can do with this connector
51$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;
52
53// Allowed Resource Types
54$Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;
55
56// For security, HTML is allowed in the first Kb of data for files having the
57// following extensions only.
58$Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;
59
60/*
61	Configuration settings for each Resource Type
62
63	- AllowedExtensions: the possible extensions that can be allowed.
64		If it is empty then any file type can be uploaded.
65	- DeniedExtensions: The extensions that won't be allowed.
66		If it is empty then no restrictions are done here.
67
68	For a file to be uploaded it has to fullfil both the AllowedExtensions
69	and DeniedExtensions (that's it: not being denied) conditions.
70
71	- FileTypesPath: the virtual folder relative to the document root where
72		these resources will be located.
73		Attention: It must start and end with a slash: '/'
74
75	- FileTypesAbsolutePath: the physical path to the above folder. It must be
76		an absolute path.
77		If it's an empty string then it will be autocalculated.
78		Usefull if you are using a virtual directory, symbolic link or alias.
79		Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
80		Attention: The above 'FileTypesPath' must point to the same directory.
81		Attention: It must end with a slash: '/'
82
83	 - QuickUploadPath: the virtual folder relative to the document root where
84		these resources will be uploaded using the Upload tab in the resources
85		dialogs.
86		Attention: It must start and end with a slash: '/'
87
88	 - QuickUploadAbsolutePath: 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		Usefull if you are using a virtual directory, symbolic link or alias.
92		Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
93		Attention: The above 'QuickUploadPath' must point to the same directory.
94		Attention: It must end with a slash: '/'
95
96	 	NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to
97	 	"userfiles" directory to maintain backwards compatibility with older versions of FCKeditor.
98	 	This is fine, but you in some cases you will be not able to browse uploaded files using file browser.
99	 	Example: if you clik on "image button", select "Upload" tab and send image
100	 	to the server, image will appear in FCKeditor correctly, but because it is placed
101	 	directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
102	 	The more expected behaviour would be to send images directly to "image" subfolder.
103	 	To achieve that, simply change
104			$Config['QuickUploadPath']['Image']			= $Config['UserFilesPath'] ;
105			$Config['QuickUploadAbsolutePath']['Image']	= $Config['UserFilesAbsolutePath'] ;
106		into:
107			$Config['QuickUploadPath']['Image']			= $Config['FileTypesPath']['Image'] ;
108			$Config['QuickUploadAbsolutePath'['Image'] 	= $Config['FileTypesAbsolutePath']['Image'] ;
109
110*/
111
112$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') ;
113$Config['DeniedExtensions']['File']		= array() ;
114$Config['FileTypesPath']['File']		= $Config['UserFilesPath'] . 'file/' ;
115$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;
116$Config['QuickUploadPath']['File']		= $Config['UserFilesPath'] ;
117$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;
118
119$Config['AllowedExtensions']['Image']	= array('bmp','gif','jpeg','jpg','png','psd','tif','tiff') ;
120$Config['DeniedExtensions']['Image']	= array() ;
121$Config['FileTypesPath']['Image']		= $Config['UserFilesPath'] . 'image/' ;
122$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;
123$Config['QuickUploadPath']['Image']		= $Config['UserFilesPath'] ;
124$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;
125
126$Config['AllowedExtensions']['Flash']	= array('swf','fla') ;
127$Config['DeniedExtensions']['Flash']	= array() ;
128$Config['FileTypesPath']['Flash']		= $Config['UserFilesPath'] . 'flash/' ;
129$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ;
130$Config['QuickUploadPath']['Flash']		= $Config['UserFilesPath'] ;
131$Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ;
132
133$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') ;
134$Config['DeniedExtensions']['Media']	= array() ;
135$Config['FileTypesPath']['Media']		= $Config['UserFilesPath'] . 'media/' ;
136$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ;
137$Config['QuickUploadPath']['Media']		= $Config['UserFilesPath'] ;
138$Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ;
139
140?>
141