日志标签:Drupal

Drupal7 安装 CKEditor 和 IMCE 模块 及配置

时间:2011年08月19日作者:Shieh查看次数: 1,867 views评论次数:4

习惯了使用所见即所得(Wysiwyg)编辑器, Drupal7 安装 CKEditor 编辑器的方法及配置:

  1. 首先要下载模块和编辑器
    CKEditor Moudle: http://drupal.org/project/ckeditor
    IMCE Module: http://drupal.org/project/imce
    CKEditor 编辑器: http://ckeditor.com/download
  2. 安装 CKEditor MoudleIMCE Moudle
    将解压的 CKEditor Moudle 和 IMCE Moudle 模块分别放到
    sites/all/moudles/ckeditor/
    sites/all/moudles/imce/
    然后将 CKEditor 编辑器压缩包里面的放到 /sites/all/moudles/ckeditor/ckeditor/中, 如下图
    CKEditor
    放好后的路径如:
    /sites/all/moudles/ckeditor/ckeditor/ckeditor.config.js
    /sites/all/moudles/ckeditor/ckeditor/ckeditor_php5.php
    /sites/all/moudles/ckeditor/ckeditor/ckeditor_php4.php
    /sites/all/moudles/ckeditor/ckeditor/ckeditor/plugins/*
    /sites/all/moudles/ckeditor/ckeditor/ckeditor/_samples/*
    /sites/all/moudles/ckeditor/ckeditor/ckeditor/_source/*
    /sites/all/modules/imce/css/*
  3. 在 Modules 中启用 CKEditor 和 ICME 这两个模块.
  4. Home » Administration » Configuration » Content authoring 中配置CKEditor ( 路径为 /admin/config/content/ckeditor)
    选择 Full HTMLedit Operations 进入 CKEditor 配置. ( 路径为 /admin/config/content/ckeditor/edit/Full )
    然后点击 EDITOR APPEARANCE 选项进去, 在显示的表单中有个Toolbar, 这个是配置CKEditor显示哪些操作标签的.
    在默认的这行 ['Image','Media','Flash','Table','HorizontalRule','Smiley','SpecialChar'], 中添加一个 ‘IMCE‘ 这样才能在编辑器里显示 IMCE上传图片的图标.
    添加后为: ['Image','IMCE','Media','Flash','Table','HorizontalRule','Smiley','SpecialChar'],
    接着在 Plugins 中选中 IMCE Window button in toolbar
    Toolbar CKEditor

    最后在 File browser settings 中的
    File browser type (Link dialog)
    File browser type (Image dialog)
    File browser type (Flash dialog)
    三个选项都选择IMCE, 如下图
    File browser settings

  5. OK, 配置完毕, 在 add Content 时选择 FULL HTML就行了.
    另外也可以配置 Filtered HTML, 在 Toolbar配置里面设置一下, 比如我的设置如下

    [
    ['Source'],
    ['Cut','Copy','Paste','PasteText','Undo','Redo'],
    ['Bold','Italic','Underline','Strike','-'],
    ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
    ]

    显示在 Filtered HTML 的效果为:
    Filtered HTML

标签:,,,分类:Web

Drupal7 PathAuto Transliteration Custom SEO Urls

时间:2011年08月19日作者:Shieh查看次数: 638 views评论次数:2

Drupal7 自定义 SEO Urls 要用到三个模块: TokenPathAutoTransliteration 模块, 才能设置我想要的 domain.com/term/node-diyname.html, 注意这里不是 node-title.html 的形式.

  1. 下载安装上面的三个modules 并启用.
  2. 在 PathAuto settings 里面勾选 Transliterate prior to creating alias.
  3. 然后在 PathAuto patterns 里设置 Content paths 的 token URL 样式, 比如我的为:
    [node:field-category]/[node:url:alias].html
  4. add content 的时候先填写 URL alias, 然后勾选 Automatic alias 就可以了.

Drupal 7 安装升级及中文语言包安装教程

时间:2011年06月21日作者:Shieh查看次数: 1,996 views评论次数:0

Drupal 没看几天就发布 7.2 版本了, 速度有点进步了, 测试 drupal 7.0 升级到 7.2, 跟升级 WordPress 差不多, 备份site/default/settings.php, 删除其他文件, 记得附件或者改动过的文件也要备份. 最好在升级之前用浏览器登陆, 然后停留着, 上传新版本程序文件, 然后在登陆的浏览器里面输入 http://yousite.com/update.php, 按照提示, 升级数据库等.

Drupal7.2 安装及中文语言包安装
1. 到 drupal 的官网(http://drupal.org/project/drupal)下载最新版的 drupal 7, 当前版本为 drupal 7.2.

2. 解压缩 drupal 安装包。安装前将sites\default目录下的 “default.settings.php”复制一份并重命名为“settings.php”, 然后在浏览器下输入http://yousite.com/, 会出现如下安装界面.
drupal7-1

3. 中文语言包安装: 先到drupal官网(http://localize.drupal.org/translate/languages/zh-hans)下载最新的语言文件, 将中文语言包 drupal-7.2.zh-hans.po 文件拷贝至 “/profiles/standard/translations/” 目录下。然后刷新一下浏览器, 你就可以看到有个简体中文的可以选择了:
drupal7-2

4. 接着按照安装界面提示填写数据库名称, 用户名, 密码, 然后是站点信息, 网站邮箱, 管理员账号等之类的, 其实跟一路回车没啥区别, orz.
drupal7-3

Drupal 安装其实跟安装 WordPress 差不多, 好像比安装WP简单. Wahaha.

标签:,分类:Web