跳转到主要内容
结一 提交于 9 November 2010
一、用IMCE模块上传图片 效果图如下:

首先启用IMCE模块 然后按照下面三步就可以轻松搞定    1. Open /sites/modules/ckeditor/ckeditor.config.js      打开modules/ckeditor目录下的ckeditor.config.js,    2. Uncomment the following lines (remove "//") in ckeditor.config.js:       //config.extraPlugins += (config.extraPlugins ? ',imce' : 'imce' );       //CKEDITOR.plugins.addExternal('imce', Drupal.settings.ckeditor.module_path + '/plugins/imce/');    3. Add button to the toolbar. The button name is: IMCE.       For example if you have a toolbar with an array of buttons defined as follows:       ['Link','Image']       simply add button at the end of array (or somewhere in the middle):       ['Link','Image','IMCE']       (remember about single quotes).

 

 

添加IMCE后在其toolbar上出现相应的图片,如上面的效果图 二、用ckfinder来实现上传图片及文件 1、到http://ckfinder.com/下载最新版本的ckfinder 2、解压文件放在sites/modules/ckeditor/里面,完成后的路径如下:

3、在用户管理下配置权限allow CKFinder file uploads(如果没有找到,则说明文件放置有问题,请参考第二步)

4、打开CKFinder 配置文件 (sites/all/modules/ckeditor/ckfinder/config.php)      I) 删除 CheckAuthentication() 函数     (不要担心,这个函数在filemanager.config.php还有一个)      II) 在$baseDir = resolveUrl($baseUrl);下面添加一行     require_once '../../../../includes/filemanager.config.php'; 5、在站点配置中配置ckeditor,在File browser settings中选中ckfinder 6、修改settings.php(一般路径为 sites/default/settings.php),去掉变量$cookie_domain前面的 ‘#’或‘//’,即是启用变量$cookie_domain。注意settings.php为只读文件,修改之前请更改属性,修改完毕再更改为只读 7、到此,配置结束,如下图

 

articles

这个版本是不是太老了,现在不适用了吧!!图标是从哪里弄出来的?用得分别是什么版本的?

照着配了,无效果。

没找到下边的代码:

Uncomment the following lines (remove "//") in ckeditor.config.js:

      //config.extraPlugins += (config.extraPlugins ? ',imce' : 'imce' );

      //CKEDITOR.plugins.addExternal('imce', Drupal.settings.ckeditor.module_path + '/plugins/imce/');