国外设计欣赏网站 - DOOOOR.com

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,微信登陆

搜索

[Drupal教程] Drupal 7.X 配置ckeditor和ckfinder编辑器实现图片上传--不用wysisyg

[复制链接]
发表于 2-18-2012 07:23 | 显示全部楼层 |阅读模式
注意:
1、这里的ckeditor编辑器是独立模块,不是那个wysiwyg模块。
2、这里的图片上传仅仅为文章内图片,非字段图片。
方法:
1、下载文件
(1)  http://drupal.org/project/ckeditor drupal的ckeditor模块.$ p5 V( K0 h3 p2 h. k: T8 T
(2)  http://ckeditor.com/download CKeditor源码8 R  F1 S! G' j- Z9 f: H! ]
(3)  http://ckfinder.com/download CKfinder(注意,不是免费的)
然后将(1)ckedit文件夹放置在/sites/all/modules/下,将(2)CKeditor文件夹放置在/sites/all/modules/ckeditor/ckeditor文件夹下,将(3)CKfinder文件夹放置在/sites/all/modules/ckeditor/文件夹下。
/sites/all/modules/ckeditor.api.php/sites/all/modules/ckeditor/ckeditor/ckeditor/ckeditor.php/sites/all/modules/ckeditor/ckfinder/ckfinder.php
2、安装模块
3、配置模块,/admin/config/content/ckeditor; L4 e/ w$ l9 D- L% z
主要说明为什么个人喜欢用这个模块而不是wysiwyg,因为可以方便配置DrupalBreak, DrupalPageBreak,LinkToNode等按钮。2 ?& k& a8 K7 C: c; v9 R9 S
其他根据个人情况自己定义。
4、配置CKfinder实现图片及文件上传+ Q# o8 P" \# `* V
在配置中的File browser settings选项中 File browser type及以下两项选择CKfinder。
编辑ckfinder文件夹下的config.php
注释掉这个函数 //
function CheckAuthentication(){        return false;}
这个函数会检查用户认证,在其他程序设计中更改为其他认证方式以返回true,但不能直接改成true,否则会有安全问题,drupal中会有
+ b3 l) p9 ^  y" {' A+ z/sites/all/modules/ckeditor/includes/filemanager.config.php负责检查。
增加以下代码,路径是正确的,如果文件路径和我的一样的话
require_once '../../../../includes/filemanager.config.php';
修改$baseUrl为自己为drupal的文件上传目录通常为:
$baseUrl = '/sites/boofee.net/files/';
打开/site/youdomain/settings.php,更改$cookie_domain为你自己的域名
$cookie_domain = 'www.boofee.net';
就可以正常上传图片及文件(超链接)了,注意显示图片的话需要文本格式Full HTML mode。
5 [8 V2 [. f% D: c0 p
本文选自Boofee,谢谢!

" o9 F4 f7 Y5 t6 Q/ |( z

" O7 R( z6 G# f2 ^8 J

2 s8 \# A; C: a9 d

|2011-2026-版权声明|平台(网站)公约|手机版|手机版|DOOOOR 设计网 ( 吉ICP备2022003869号 )

GMT+8, 11-11-2025 19:57 , Processed in 0.411219 second(s), 172 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表