青海网站建设、网络推广最好的公司--您身边的网站建设专家,马上拿起电话,联系我们:0971-8235355   
青海西宁网站建设、网站制作公司-西宁威势电子信息服务有限公司 首页 |  公司简介 |  网站建设 |  网络推广 |  空间租用 |  域名注册 |  企业邮局 |  网络安全 |  网站编程 |  客服中心 |  联系我们 |  人才招聘
 
西宁威势最新网站制做案例展示
Lastest Project
 
西宁网站建设  
当前位置为:首页 >> .NET编程 >> 正文  
[原创]修改 Fckeditor ,使之保存文件时自动按时间创建目录,并修复链接上传失效的BUG

文章来源: 西宁威势电子信息服务有限公司     发布时间:2011-7-27    浏览次数:5699   

在找到fckconfig.js文件的299号左右,将代码修改成下面的,可以修复添加链接时无法上传附件的BUG

FCKConfig.LinkUpload = true ;
FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=File';

 

将CONFIG.ASCX的代码做如下修改

        HtmlExtensions = new string[] { "html", "htm", "xml", "xsd", "txt", "js" };

        TypeConfig["File"].AllowedExtensions = new string[] { "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" };
        TypeConfig["File"].DeniedExtensions = new string[] { };
        TypeConfig["File"].FilesPath = "%UserFilesPath%";
        TypeConfig["File"].FilesAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%");
        TypeConfig["File"].QuickUploadPath = "%UserFilesPath%" + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/";
        TypeConfig["File"].QuickUploadAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%");

        TypeConfig["Image"].AllowedExtensions = new string[] { "bmp", "gif", "jpeg", "jpg", "png" };
        TypeConfig["Image"].DeniedExtensions = new string[] { };
        TypeConfig["Image"].FilesPath = "%UserFilesPath%";
        TypeConfig["Image"].FilesAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%" + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/");
        TypeConfig["Image"].QuickUploadPath = "%UserFilesPath%" + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/";
        TypeConfig["Image"].QuickUploadAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%");

        TypeConfig["Flash"].AllowedExtensions = new string[] { "swf", "flv" };
        TypeConfig["Flash"].DeniedExtensions = new string[] { };
        TypeConfig["Flash"].FilesPath = "%UserFilesPath%";
        TypeConfig["Flash"].FilesAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%");
        TypeConfig["Flash"].QuickUploadPath = "%UserFilesPath%" + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/";
        TypeConfig["Flash"].QuickUploadAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%");

        TypeConfig["Media"].AllowedExtensions = new string[] { "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" };
        TypeConfig["Media"].DeniedExtensions = new string[] { };
        TypeConfig["Media"].FilesPath = "%UserFilesPath%";
        TypeConfig["Media"].FilesAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%");
        TypeConfig["Media"].QuickUploadPath = "%UserFilesPath%";
        TypeConfig["Media"].QuickUploadAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%");

 

即可在上传文件时,将文件按时间目录名自动归档保存到服务器上。


上一篇:[原创]ACCESS 查询时使用 LIKE语句
下一篇:没有下一篇
评论列表
正在加载评论……
  
评论   
呢  称:
验证码: 若看不清请点击更换!
内  容:
 
 
  在线洽谈咨询:
点击这里,在线洽谈   点击这里,在线洽谈   点击这里,在线洽谈
与我交谈  与我交谈 与我交谈
乘车路线    汇款方式   加盟合作  人才招聘  
公司地址:青海省西宁市西关大街73号(三二四部队招行所四楼)     青ICP备13000578号-1 公安机关备案号:63010402000123    
QQ:147399120    mail:lostlove000@163.com    电话:09718235355 13897410341    WEB-FAX:1183309-7112964    MSN:cmdshell@hotmail.cn 邮编:810000
© Copyright( 2008-2009) QhWins.Com All Rights Reserved    版权所有:西宁威势电子信息服务有限公司 未经书面制授权,请勿随意转载!
业务:青海网站制做青海网站建设青海网页设计西宁网站制做西宁网站建设青海域名注册青海网络推广青海网站推广青海空间租用青海软件开发网站安全网络安全