Subversion Repositories Applications.papyrus

Rev

Rev 1929 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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