最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Fckeditor 的配置方法
时间:2022-06-25 14:44:25 编辑:袖梨 来源:一聚教程网
fckeditor 的配置方法
首先把下回来的ckfinder放到fckeditor(就是你原来放fck的目录下,ckfinder必须有fck才可以用哦,她属于fck的一庞大插件)的饿editor目录下,然后把ckfinder目录里的bin下的ckfinder.dll拷贝到网站目录bin下。然后开始设置配置:打开ckfinder目录下的config.ascx文件
修改地方有:
1、设置访问权限
public override bool checkauthentication()
{
// warning : do not simply return "true". by doing so, you are allowing
// "anyone" to upload and list the files in your server. you must implement
// some kind of session validation here. even something very simple as...
//
//return ( session[ "isauthorized" ] != null && (bool)session[ "isauthorized" ] == true );
return true;//(增加这句,如果你需要设置打开ckfinder访问权限可以在这里设置哦,我这里就不考虑权限了直接打开。)
//
// ... where session[ "isauthorized" ] is set to "true" as soon as the
// user logs on your system.
//return false;//(注释这句,默认这句未被注释)
}
2、设置文件访问目录
引用内容
baseurl = "/ckfinder/userfiles/";
这是上传文件的地址,也是ckfinder浏览文件的位置了。我们设置成
baseurl = "/fckeditor/editor/ckfinder/userfiles/";//这个路径可以自己设
3、设置生成缩略图
thumbnails.url = baseurl + "_thumbs/";
thumbnails.dir = "";
thumbnails.enabled = true;
thumbnails.max;
thumbnails.max;
thumbnails.quality = 80;
具体干啥应该看参数名称就知道了吧。。。
文件后面的代码是设置上传文件类型和大小等等,大家看参数应该都可以明白,这里略过。
4、修改原fck配置文件以结合fck和ckfinder。
打开/fckeditor/目录下的fckconfig.js,到最下面:
fckconfig.linkbrowser = true ;
fckconfig.linkbrowserurl = fckconfig.basepath + 'ckfinder/ckfinder.html' ;
fckconfig.linkbrowserwindowwidth = fckconfig.screenwidth * 0.7 ; // 70%
fckconfig.linkbrowserwindowheight = fckconfig.screenheight * 0.7 ; // 70%
fckconfig.imagebrowser = true ;
fckconfig.imagebrowserurl = fckconfig.basepath + 'ckfinder/ckfinder.html?type=images' ;
fckconfig.imagebrowserwindowwidth = fckconfig.screenwidth * 0.7 ; // 70% ;
fckconfig.imagebrowserwindowheight = fckconfig.screenheight * 0.7 ; // 70% ;
fckconfig.flashbrowser = true ;
fckconfig.flashbrowserurl = fckconfig.basepath + 'ckfinder/ckfinder.html?type=flash' ;
fckconfig.flashbrowserwindowwidth = fckconfig.screenwidth * 0.7 ; //70% ;
fckconfig.flashbrowserwindowheight = fckconfig.screenheight * 0.7 ; //70% ;
fckconfig.linkupload = true ;
fckconfig.linkuploadurl = fckconfig.basepath +'ckfinder/core/connector/asp教程x/connector.aspx?command=quickupload&type=files' ;
fckconfig.linkuploadallowedextensions = ".(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)$" ; // empty for all
fckconfig.linkuploaddeniedextensions = "" ; // empty for no one
fckconfig.imageupload = true ;
fckconfig.imageuploadurl = fckconfig.basepath + 'ckfinder/core/connector/aspx/connector.aspx?command=quickupload&type=images' ;
fckconfig.imageuploadallowedextensions = ".(jpg|gif|jpeg|png|bmp)$" ; // empty for all
fckconfig.imageuploaddeniedextensions = "" ; // empty for no one
fckconfig.flashupload = true ;
fckconfig.flashuploadurl = fckconfig.basepath + 'ckfinder/core/connector/aspx/connector.aspx?command=quickupload&type=flash' ;
fckconfig.flashuploadallowedextensions = ".(swf|flv)$" ; // empty for all
fckconfig.flashuploaddeniedextensions = "" ; // empty for no one
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21