1
<cfsetting enablecfoutputonly="Yes">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
8
* Licensed under the terms of any of the following licenses at your
11
* - GNU General Public License Version 2 or later (the "GPL")
12
* http://www.gnu.org/licenses/gpl.html
14
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
* http://www.gnu.org/licenses/lgpl.html
17
* - Mozilla Public License Version 1.1 or later (the "MPL")
18
* http://www.mozilla.org/MPL/MPL-1.1.html
22
* Configuration file for the ColdFusion Connector (all versions).
26
Config = StructNew() ;
28
// SECURITY: You must explicitly enable this "connector". (Set enabled to "true")
29
Config.Enabled = true ;
31
// Path to uploaded files relative to the document root.
32
Config.UserFilesPath = "/userfiles/" ;
34
// Use this to force the server path if FCKeditor is not running directly off
35
// the root of the application or the FCKeditor directory in the URL is a virtual directory
36
// or a symbolic link / junction
37
// Example: C:\inetpub\wwwroot\myDocs\
38
Config.ServerPath = "" ;
40
// Due to security issues with Apache modules, it is recommended to leave the
41
// following setting enabled.
42
Config.ForceSingleExtension = true ;
44
// Perform additional checks for image files - if set to true, validate image size
45
// (This feature works in MX 6.0 and above)
46
Config.SecureImageUploads = true;
48
// What the user can do with this connector
49
Config.ConfigAllowedCommands = "QuickUpload,FileUpload,GetFolders,GetFoldersAndFiles,CreateFolder" ;
51
//Allowed Resource Types
52
Config.ConfigAllowedTypes = "File,Image,Flash,Media" ;
54
// For security, HTML is allowed in the first Kb of data for files having the
55
// following extensions only.
56
// (This feature works in MX 6.0 and above))
57
Config.HtmlExtensions = "html,htm,xml,xsd,txt,js" ;
60
// Configuration settings for each Resource Type
62
// - AllowedExtensions: the possible extensions that can be allowed.
63
// If it is empty then any file type can be uploaded.
64
// - DeniedExtensions: The extensions that won't be allowed.
65
// If it is empty then no restrictions are done here.
67
// For a file to be uploaded it has to fulfill both the AllowedExtensions
68
// and DeniedExtensions (that's it: not being denied) conditions.
70
// - FileTypesPath: the virtual folder relative to the document root where
71
// these resources will be located.
72
// Attention: It must start and end with a slash: '/'
74
// - FileTypesAbsolutePath: the physical path to the above folder. It must be
76
// If it's an empty string then it will be autocalculated.
77
// Usefull if you are using a virtual directory, symbolic link or alias.
78
// Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
79
// Attention: The above 'FileTypesPath' must point to the same directory.
80
// Attention: It must end with a slash: '/'
83
// - QuickUploadPath: the virtual folder relative to the document root where
84
// these resources will be uploaded using the Upload tab in the resources
86
// Attention: It must start and end with a slash: '/'
88
// - QuickUploadAbsolutePath: the physical path to the above folder. It must be
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: '/'
96
Config.AllowedExtensions = StructNew() ;
97
Config.DeniedExtensions = StructNew() ;
98
Config.FileTypesPath = StructNew() ;
99
Config.FileTypesAbsolutePath = StructNew() ;
100
Config.QuickUploadPath = StructNew() ;
101
Config.QuickUploadAbsolutePath = StructNew() ;
103
Config.AllowedExtensions["File"] = "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" ;
104
Config.DeniedExtensions["File"] = "" ;
105
Config.FileTypesPath["File"] = Config.UserFilesPath & 'file/' ;
106
Config.FileTypesAbsolutePath["File"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'file/') ) ;
107
Config.QuickUploadPath["File"] = Config.FileTypesPath["File"] ;
108
Config.QuickUploadAbsolutePath["File"] = Config.FileTypesAbsolutePath["File"] ;
110
Config.AllowedExtensions["Image"] = "bmp,gif,jpeg,jpg,png" ;
111
Config.DeniedExtensions["Image"] = "" ;
112
Config.FileTypesPath["Image"] = Config.UserFilesPath & 'image/' ;
113
Config.FileTypesAbsolutePath["Image"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'image/') ) ;
114
Config.QuickUploadPath["Image"] = Config.FileTypesPath["Image"] ;
115
Config.QuickUploadAbsolutePath["Image"] = Config.FileTypesAbsolutePath["Image"] ;
117
Config.AllowedExtensions["Flash"] = "swf,flv" ;
118
Config.DeniedExtensions["Flash"] = "" ;
119
Config.FileTypesPath["Flash"] = Config.UserFilesPath & 'flash/' ;
120
Config.FileTypesAbsolutePath["Flash"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'flash/') ) ;
121
Config.QuickUploadPath["Flash"] = Config.FileTypesPath["Flash"] ;
122
Config.QuickUploadAbsolutePath["Flash"] = Config.FileTypesAbsolutePath["Flash"] ;
124
Config.AllowedExtensions["Media"] = "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" ;
125
Config.DeniedExtensions["Media"] = "" ;
126
Config.FileTypesPath["Media"] = Config.UserFilesPath & 'media/' ;
127
Config.FileTypesAbsolutePath["Media"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'media/') ) ;
128
Config.QuickUploadPath["Media"] = Config.FileTypesPath["Media"] ;
129
Config.QuickUploadAbsolutePath["Media"] = Config.FileTypesAbsolutePath["Media"] ;
133
<!--- code to maintain backwards compatibility with previous version of cfm connector --->
134
<cfif isDefined("application.userFilesPath")>
136
<cflock scope="application" type="readonly" timeout="5">
137
<cfset config.userFilesPath = application.userFilesPath>
140
<cfelseif isDefined("server.userFilesPath")>
142
<cflock scope="server" type="readonly" timeout="5">
143
<cfset config.userFilesPath = server.userFilesPath>
148
<!--- look for config struct in application and server scopes --->
149
<cfif isDefined("application.FCKeditor") and isStruct(application.FCKeditor)>
151
<cflock scope="application" type="readonly" timeout="5">
152
<cfset variables.FCKeditor = duplicate(application.FCKeditor)>
155
<cfelseif isDefined("server.FCKeditor") and isStruct(server.FCKeditor)>
157
<cflock scope="server" type="readonly" timeout="5">
158
<cfset variables.FCKeditor = duplicate(server.FCKeditor)>
162
<!--- catch potential "The requested scope application has not been enabled" exception --->
167
<cfif isDefined("FCKeditor")>
169
<!--- copy key values from external to local config (i.e. override default config as required) --->
171
function structCopyKeys(stFrom, stTo) {
172
for ( key in stFrom ) {
173
if ( isStruct(stFrom[key]) ) {
174
structCopyKeys(stFrom[key],stTo[key]);
176
stTo[key] = stFrom[key];
180
structCopyKeys(FCKeditor, config);
1
<cfsetting enablecfoutputonly="Yes">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
8
* Licensed under the terms of any of the following licenses at your
11
* - GNU General Public License Version 2 or later (the "GPL")
12
* http://www.gnu.org/licenses/gpl.html
14
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
* http://www.gnu.org/licenses/lgpl.html
17
* - Mozilla Public License Version 1.1 or later (the "MPL")
18
* http://www.mozilla.org/MPL/MPL-1.1.html
22
* Configuration file for the ColdFusion Connector (all versions).
26
Config = StructNew() ;
28
// SECURITY: You must explicitly enable this "connector". (Set enabled to "true")
29
Config.Enabled = true ;
31
// Path to uploaded files relative to the document root.
32
Config.UserFilesPath = "/userfiles/" ;
34
// Use this to force the server path if FCKeditor is not running directly off
35
// the root of the application or the FCKeditor directory in the URL is a virtual directory
36
// or a symbolic link / junction
37
// Example: C:\inetpub\wwwroot\myDocs\
38
Config.ServerPath = "" ;
40
// Due to security issues with Apache modules, it is recommended to leave the
41
// following setting enabled.
42
Config.ForceSingleExtension = true ;
44
// Perform additional checks for image files - if set to true, validate image size
45
// (This feature works in MX 6.0 and above)
46
Config.SecureImageUploads = true;
48
// What the user can do with this connector
49
Config.ConfigAllowedCommands = "QuickUpload,FileUpload,GetFolders,GetFoldersAndFiles,CreateFolder" ;
51
//Allowed Resource Types
52
Config.ConfigAllowedTypes = "File,Image,Flash,Media" ;
54
// For security, HTML is allowed in the first Kb of data for files having the
55
// following extensions only.
56
// (This feature works in MX 6.0 and above))
57
Config.HtmlExtensions = "html,htm,xml,xsd,txt,js" ;
60
// Configuration settings for each Resource Type
62
// - AllowedExtensions: the possible extensions that can be allowed.
63
// If it is empty then any file type can be uploaded.
64
// - DeniedExtensions: The extensions that won't be allowed.
65
// If it is empty then no restrictions are done here.
67
// For a file to be uploaded it has to fulfill both the AllowedExtensions
68
// and DeniedExtensions (that's it: not being denied) conditions.
70
// - FileTypesPath: the virtual folder relative to the document root where
71
// these resources will be located.
72
// Attention: It must start and end with a slash: '/'
74
// - FileTypesAbsolutePath: the physical path to the above folder. It must be
76
// If it's an empty string then it will be autocalculated.
77
// Usefull if you are using a virtual directory, symbolic link or alias.
78
// Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
79
// Attention: The above 'FileTypesPath' must point to the same directory.
80
// Attention: It must end with a slash: '/'
83
// - QuickUploadPath: the virtual folder relative to the document root where
84
// these resources will be uploaded using the Upload tab in the resources
86
// Attention: It must start and end with a slash: '/'
88
// - QuickUploadAbsolutePath: the physical path to the above folder. It must be
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: '/'
96
Config.AllowedExtensions = StructNew() ;
97
Config.DeniedExtensions = StructNew() ;
98
Config.FileTypesPath = StructNew() ;
99
Config.FileTypesAbsolutePath = StructNew() ;
100
Config.QuickUploadPath = StructNew() ;
101
Config.QuickUploadAbsolutePath = StructNew() ;
103
Config.AllowedExtensions["File"] = "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" ;
104
Config.DeniedExtensions["File"] = "" ;
105
Config.FileTypesPath["File"] = Config.UserFilesPath & 'file/' ;
106
Config.FileTypesAbsolutePath["File"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'file/') ) ;
107
Config.QuickUploadPath["File"] = Config.FileTypesPath["File"] ;
108
Config.QuickUploadAbsolutePath["File"] = Config.FileTypesAbsolutePath["File"] ;
110
Config.AllowedExtensions["Image"] = "bmp,gif,jpeg,jpg,png" ;
111
Config.DeniedExtensions["Image"] = "" ;
112
Config.FileTypesPath["Image"] = Config.UserFilesPath & 'image/' ;
113
Config.FileTypesAbsolutePath["Image"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'image/') ) ;
114
Config.QuickUploadPath["Image"] = Config.FileTypesPath["Image"] ;
115
Config.QuickUploadAbsolutePath["Image"] = Config.FileTypesAbsolutePath["Image"] ;
117
Config.AllowedExtensions["Flash"] = "swf,flv" ;
118
Config.DeniedExtensions["Flash"] = "" ;
119
Config.FileTypesPath["Flash"] = Config.UserFilesPath & 'flash/' ;
120
Config.FileTypesAbsolutePath["Flash"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'flash/') ) ;
121
Config.QuickUploadPath["Flash"] = Config.FileTypesPath["Flash"] ;
122
Config.QuickUploadAbsolutePath["Flash"] = Config.FileTypesAbsolutePath["Flash"] ;
124
Config.AllowedExtensions["Media"] = "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" ;
125
Config.DeniedExtensions["Media"] = "" ;
126
Config.FileTypesPath["Media"] = Config.UserFilesPath & 'media/' ;
127
Config.FileTypesAbsolutePath["Media"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'media/') ) ;
128
Config.QuickUploadPath["Media"] = Config.FileTypesPath["Media"] ;
129
Config.QuickUploadAbsolutePath["Media"] = Config.FileTypesAbsolutePath["Media"] ;
133
<!--- code to maintain backwards compatibility with previous version of cfm connector --->
134
<cfif isDefined("application.userFilesPath")>
136
<cflock scope="application" type="readonly" timeout="5">
137
<cfset config.userFilesPath = application.userFilesPath>
140
<cfelseif isDefined("server.userFilesPath")>
142
<cflock scope="server" type="readonly" timeout="5">
143
<cfset config.userFilesPath = server.userFilesPath>
148
<!--- look for config struct in application and server scopes --->
149
<cfif isDefined("application.FCKeditor") and isStruct(application.FCKeditor)>
151
<cflock scope="application" type="readonly" timeout="5">
152
<cfset variables.FCKeditor = duplicate(application.FCKeditor)>
155
<cfelseif isDefined("server.FCKeditor") and isStruct(server.FCKeditor)>
157
<cflock scope="server" type="readonly" timeout="5">
158
<cfset variables.FCKeditor = duplicate(server.FCKeditor)>
162
<!--- catch potential "The requested scope application has not been enabled" exception --->
167
<cfif isDefined("FCKeditor")>
169
<!--- copy key values from external to local config (i.e. override default config as required) --->
171
function structCopyKeys(stFrom, stTo) {
172
for ( key in stFrom ) {
173
if ( isStruct(stFrom[key]) ) {
174
structCopyKeys(stFrom[key],stTo[key]);
176
stTo[key] = stFrom[key];
180
structCopyKeys(FCKeditor, config);