Subversion Repositories Applications.papyrus

Rev

Rev 1921 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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