drupal上配置fckeditor。

今天在drupal上配置FCKEditor,经过了一番周折,总算能够上传图片了。

首先是好不容易在,FCKEditor的配置中,找到了build-in browser和允许上传附件的选项,勾上之后,出现如下提示:

You are using a feature that requires manual integration into config.php (either built-in filebrowser or quick uploads are enabled in the Advanced profile). Read instructions about enabling built-in file browser and add "require_once ..." statement in editor/filemanager/connectors/php/config.php.

然后搜索到如下网址:
http://drupal.org/node/324053
http://drupal.org/node/277657

有一段话:

Features:
11) Some people have problems with upgrading FCKeditor: they forget to add
require_once "../../../../../filemanager.config.php";
to the config.php

我们才知道要加的那句话是:

require_once "../../../../../filemanager.config.php";
 

我们尝试把它加在config.php的代码最前面和最后面,都不行,出现如下提示:

You have added "require_once ..." statement in editor/filemanager/connectors/php/config.php, but in the wrong line.'

搜索下面关键字:

require_once ..." statement in editor/filemanager/connectors/php/config.php, but in the wrong line.

打开了http://www.sambazwalm.be/drupal/sites/all/modules/fckeditor/fckeditor.install
它完全就是一份源代码,能在里面找到答案吗?

经过查找发现,它提示我们的错误信息赫然出现,相关代码如下:

  
  if ($userfiles_absolute_path_line && $force_single_extension_line && (
  $require_once_line < $userfiles_absolute_path_line || $require_once_line > $force_single_extension_line)) {
    return t('You are using a feature that requires manual integration into config.php (either built-in filebrowser or quick uploads are enabled in the !profile profile). You have added "require_once ..." statement in editor/filemanager/connectors/php/config.php

从中猜测,require_once那一行应该放在userfiles_absolute_path_line 和force_single_extension_line 之间。
连猜带蒙,把它放在config的两个配置之间,果然OK了。

这之后发现,图片文件名为英文名的,完全能够上传了。中文名暂时不支持。















本文转sinojelly51CTO博客,原文链接:http://blog.51cto.com/sinojelly/222633 ,如需转载请自行联系原作者
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值