Skip to Content

Drupal模块:Insert

  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /var/www/drupal_module/views/handlers/views_handler_filter.inc on line 0.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /var/www/drupal_module/views/handlers/views_handler_filter.inc on line 0.
  • strict warning: Declaration of views_handler_filter_node_status::operator_form() should be compatible with views_handler_filter::operator_form(&$form, &$form_state) in /var/www/drupal_module/views/modules/node/views_handler_filter_node_status.inc on line 0.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /var/www/drupal_module/views/plugins/views_plugin_row.inc on line 0.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /var/www/drupal_module/views/plugins/views_plugin_row.inc on line 0.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Declaration of views_handler_field_comment::init() should be compatible with views_handler_field::init(&$view, $options) in /var/www/drupal_module/views/modules/comment/views_handler_field_comment.inc on line 0.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /var/www/drupal_module/views/handlers/views_handler_filter_boolean_operator.inc on line 0.

Drupal的可视化(WYSIWYG)编辑器一直是不太好用,虽然装了一个FCKeditor,感觉还是比较复杂。我还是喜欢WordPress的编辑器,但是还没有找到类似的模块。

在文章中插入图片显得比较困难,我选择使用Drupal的Insert模块来插入CCK的ImageField图片。

图片或文件存成ImageField有几个好处:

  1. 管理比较方便,图片的存储可以通过CCK来指定,可以自定义图片标题(Title)和图片(alt)的内容。
  2. 容易扩展,CCK的扩展模块很多,如可以通过Fancy Slide模块实现图片滚动效果。

Insert模块使用方法:

1. 下载并安装Insert模块

下载地址: http://drupal.org/project/insert

将Insert模块解压缩至 drupal-dir/sites/all/modules/ 目录下。

在Drupal模块列表中启用该模块。

2. 配置Insert模块

Insert模块没有单独的配置页面,要配置Insert需要在CCK field中进行设置。

在Filefield类型的下有Insert的配置:

 Drupal Insert模块配置设置

配置好之后可以在上传图片或文件后点击旁边的Insert按钮将图片或文件按照指定的格式插入到编辑框中:

Drupal Insert模块使用方法

 

-- EOF-TRUEVUE --