[ Index ] |
|
Code source de FCKeditor 2.4 |
1 <cfsetting enablecfoutputonly="Yes"> 2 3 <cfscript> 4 config = structNew(); 5 6 // SECURITY: You must explicitly enable this "connector". (Set enabled to "true") 7 config.enabled = false; 8 9 config.userFilesPath = "/userfiles/"; 10 11 config.serverPath = ""; // use this to force the server path if FCKeditor is not running directly off the root of the application or the FCKeditor directory in the URL is a virtual directory or a symbolic link / junction 12 13 config.allowedExtensions = structNew(); 14 config.deniedExtensions = structNew(); 15 16 // config.allowedExtensions["File"] = "doc,rtf,pdf,ppt,pps,xls,csv,vnd,zip"; 17 config.allowedExtensions["File"] = ""; 18 config.deniedExtensions["File"] = "html,htm,php,php2,php3,php4,php5,phtml,pwml,inc,asp,aspx,ascx,jsp,cfm,cfc,pl,bat,exe,com,dll,vbs,js,reg,cgi,htaccess,asis"; 19 20 config.allowedExtensions["Image"] = "png,gif,jpg,jpeg,bmp"; 21 config.deniedExtensions["Image"] = ""; 22 23 config.allowedExtensions["Flash"] = "swf,fla"; 24 config.deniedExtensions["Flash"] = ""; 25 26 config.allowedExtensions["Media"] = "swf,fla,jpg,gif,jpeg,png,avi,mpg,mpeg,mp3,mp4,m4a,wma,wmv,wav,mid,midi,rmi,rm,ram,rmvb,mov,qt"; 27 config.deniedExtensions["Media"] = ""; 28 </cfscript> 29 30 <!--- code to maintain backwards compatibility with previous version of cfm connector ---> 31 <cfif isDefined("application.userFilesPath")> 32 33 <cflock scope="application" type="readonly" timeout="5"> 34 <cfset config.userFilesPath = application.userFilesPath> 35 </cflock> 36 37 <cfelseif isDefined("server.userFilesPath")> 38 39 <cflock scope="server" type="readonly" timeout="5"> 40 <cfset config.userFilesPath = server.userFilesPath> 41 </cflock> 42 43 </cfif> 44 45 <!--- look for config struct in request, application and server scopes ---> 46 <cfif isDefined("request.FCKeditor") and isStruct(request.FCKeditor)> 47 48 <cfset variables.FCKeditor = request.FCKeditor> 49 50 <cfelseif isDefined("application.FCKeditor") and isStruct(application.FCKeditor)> 51 52 <cflock scope="application" type="readonly" timeout="5"> 53 <cfset variables.FCKeditor = duplicate(application.FCKeditor)> 54 </cflock> 55 56 <cfelseif isDefined("server.FCKeditor") and isStruct(server.FCKeditor)> 57 58 <cflock scope="server" type="readonly" timeout="5"> 59 <cfset variables.FCKeditor = duplicate(server.FCKeditor)> 60 </cflock> 61 62 </cfif> 63 64 <cfif isDefined("FCKeditor")> 65 66 <!--- copy key values from external to local config (i.e. override default config as required) ---> 67 <cfscript> 68 function structCopyKeys(stFrom, stTo) { 69 for ( key in stFrom ) { 70 if ( isStruct(stFrom[key]) ) { 71 structCopyKeys(stFrom[key],stTo[key]); 72 } else { 73 stTo[key] = stFrom[key]; 74 } 75 } 76 } 77 structCopyKeys(FCKeditor, config); 78 </cfscript> 79 80 </cfif>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 15:28:05 2007 | par Balluche grâce à PHPXref 0.7 |