国外设计欣赏网站 - 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模块.
  S% h' Y3 Z( d* P! X" J; R(2)  http://ckeditor.com/download CKeditor源码4 }8 S9 y" h" [9 a( e8 o
(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
$ f% w6 t5 l8 a' |1 V1 h主要说明为什么个人喜欢用这个模块而不是wysiwyg,因为可以方便配置DrupalBreak, DrupalPageBreak,LinkToNode等按钮。4 z  @; g0 `  W
其他根据个人情况自己定义。
4、配置CKfinder实现图片及文件上传2 `1 r% @* f( u2 s" z5 N
在配置中的File browser settings选项中 File browser type及以下两项选择CKfinder。
编辑ckfinder文件夹下的config.php
注释掉这个函数 //
function CheckAuthentication(){        return false;}
这个函数会检查用户认证,在其他程序设计中更改为其他认证方式以返回true,但不能直接改成true,否则会有安全问题,drupal中会有
, k$ R) _5 I/ t7 e/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。
, J0 N$ |7 z0 g: \
本文选自Boofee,谢谢!

/ k3 i2 C! z& t7 P" r0 C

* T7 Y9 Q2 [/ ^% z# a

' Q- R. R3 Z( c

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

GMT+8, 6-19-2025 03:34 , Processed in 0.449427 second(s), 172 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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