安装过程就不说了,只写下该修改哪些文件
fckeditor/fckconfig.js
fckeditor/editor/filemanager/connectors/aspx/config.ascx
默认是禁止上传的,最简单的方法如下,但此方法存在安全问题,详见第32行开始的注释
到此,本地的直接上传和浏览服务器上传及远程的浏览服务器上传都可以了,但远程的直接上传仍然报错,提示“没有权限”,网上现有的解决方法为修改源代码后重新生成FredCK.FCKeditorV2.dll,不过不能用C#学习版,我用虚拟机装了个VS2008
FileWorkerBase.cs
修改过的FredCK.FCKeditorV2.dll我已上传到http://download.csdn.net/source/889506
fckeditor/fckconfig.js
- 将第62行
- FCKConfig.DefaultLanguage = 'en' ;
- 改为
- FCKConfig.DefaultLanguage = 'zh-cn' ;
- 将第276行和277行
- var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
- var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
- 改为
- var _FileBrowserLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
- var _QuickUploadLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
- 将第300行
- FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ;
- 改为
- FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=File' ;
默认是禁止上传的,最简单的方法如下,但此方法存在安全问题,详见第32行开始的注释
- 将第41行
- return false;
- 改为
- return true;
FileWorkerBase.cs
- 将第118行
- Response.Write( @"(function(){var d=document.domain;while (true){try{var A=window.top.opener.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:/.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();" );
- 改为
- Response.Write( @"(function(){var d=document.domain;while (true){try{var A=window.top.opener.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:/.|$)/,'');if (d.length==0) break;}})();" );