zoukankan      html  css  js  c++  java
  • Drupal 7 配置ckeditor和ckfinder编辑器实现图片上传--不用wysisyg

    注意:

    1、这里的ckeditor编辑器是独立模块,不是那个wysiwyg模块。
    2、这里的图片上传仅仅为文章内图片,非字段图片。
     

    1、下载文件
    (1) http://drupal.org/project/ckeditor drupal的ckeditor模块
    (2) http://ckeditor.com/download CKeditor源码
    (3) http://ckfinder.com/download CKfinder(注意,不是免费的)

    (4)http://www.drupal.org/project/transliteration (可选,上传图片重命名)

    将ckedit文件夹放置在/sites/all/modules/下,
    将CKeditor文件夹放置在/sites/all/modules/ckeditor/ckeditor文件夹下,
    将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

    4、配置CKfinder实现图片及文件上传

    在配置中的File browser settings选项中 File browser type及以下两项选择CKfinder。

    编辑ckfinder文件夹下的config.php

    注释掉这个函数 

    function CheckAuthentication(){        return false;}

    这个函数会检查用户认证,在其他程序设计中更改为其他认证方式以返回true,但不能直接改成true,否则会有安全问题,drupal中会有
    /sites/all/modules/ckeditor/includes/filemanager.config.php负责检查。

    增加以下代码,路径是正确的,如果文件路径和我的一样的话

    require_once '../../../../includes/filemanager.config.php';

    注释

    //$baseUrl = '/ckfinder/userfiles/';

    5.配置/site/youdomain/settings.php文件

    设置$baser_url
    $base_url='http://localhst/drupal71';
    设置$cookie_domain:
    $cookie_domain='http://localhst/drupal71';

    就可以正常上传图片及文件(超链接)了,注意显示图片的话需要文本格式Full HTML mode。

    现在的解决方法是:上传用 IMCE

    https://www.drupal.org/project/IMCE

    #######################################

    另外一种编辑器安装方法

    安装

    wysiwyg      https://www.drupal.org/project/wysiwyg  //一种整合编辑器的方式,下载 ckeditor 版本要低于4.0

    IMCE        https://www.drupal.org/project/imce  //图片上传,在wysiwyg 配置文件里面改

    imce_wysiwyg    https://www.drupal.org/project/imce_wysiwyg // 安装imce的桥

  • 相关阅读:
    (转)tomcat 安全配置文档
    (转)nginx 安全配置文档
    (转)scipy详解
    (转)matplotlib实战
    (转)Python3的四舍五入round()函数坑爹?不,更科学!
    (转)p解决 java.util.prefs.BackingStoreException 报错问题
    (转)asyncio --- 异步 I/O
    (转)pycharm快捷键、常用设置、配置管理
    (转)db2top详解
    (转)Db2 数据库常见堵塞问题分析和处理
  • 原文地址:https://www.cnblogs.com/suihui/p/4346194.html
Copyright © 2011-2022 走看看