国外设计欣赏网站 - 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模块.4 ^2 e  v+ d! Y: w+ j" s7 h- t
(2)  http://ckeditor.com/download CKeditor源码/ `+ I0 M  Y3 Q+ k- V" s0 @
(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
% N# r: c6 `. U  j. t, C1 I% {+ J主要说明为什么个人喜欢用这个模块而不是wysiwyg,因为可以方便配置DrupalBreak, DrupalPageBreak,LinkToNode等按钮。% J$ S6 ]% H+ S  l; I. M
其他根据个人情况自己定义。
4、配置CKfinder实现图片及文件上传, Y4 Y8 B" f- k0 Q! l9 O
在配置中的File browser settings选项中 File browser type及以下两项选择CKfinder。
编辑ckfinder文件夹下的config.php
注释掉这个函数 //
function CheckAuthentication(){        return false;}
这个函数会检查用户认证,在其他程序设计中更改为其他认证方式以返回true,但不能直接改成true,否则会有安全问题,drupal中会有9 u6 Z1 u/ g) W2 W3 _/ {
/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。
/ @* P- G* Z7 L5 n" n
本文选自Boofee,谢谢!
( Z+ N( i  C& N4 g( e
& [5 u" [: ^. v) l- l: a' e

0 V, @5 z+ e6 k% @/ z( @4 Q- j

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

GMT+8, 12-19-2025 18:56 , Processed in 0.298300 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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