Mediawiki整合fckeditor

本帖最后由 紫衫木 于 2012-7-31 12:40 编辑

1.下载fckeditor扩展包,svn地址为
http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/FCKeditor/
2.将该文件夹拷贝到{wiki}/extensions目录下
3.修改LocalSettings.php
在最后加入下面代码
require_once(“$IP/extensions/FCKeditor/FCKeditor.php”);
$wgUseAjax = ‘true’;

4.加载编辑介绍没有出来,用firebug发现js报错

查找一下,发现FCKeditor.body.php页面有地方把else if写成了elseif导致的,将其修改过来就可以了

5.编辑器终于出来了,但是在编辑框发现如下错误

Java代码

Fatal error: Cannot redeclare js_unescape() (previously declared in   
/home/webapps/ineh/extensions/FCKeditor/FCKeditorSajax.body.php:268)   
in /home/webapps/ineh/includes/AjaxFunctions.php on line 55  

解决方法:

修改FCKeditorSajax.body.php 文件

找到函数js_unescape修改成fck_js_unescape

并且修改相应的调用地方,也在这个页面,查找一下就可以发现(js_unescape修改成fck_js_unescape)