刚刚升级完毕,一切都乱糟糟的:)
Drupal的动作还是挺快的,不久前code freeze,开发新版本,现在居然有了一个样品了:)!呵呵,急不可耐的安装了一下,可以在这里看到这个新版本的模样。我还没有升级正在使用的这个Drupal,主要是因为很多的模块和主题还没有推出升级版本,并且这次升级还要改动数据库,比较复杂,等到一切都完备再说吧:P
从刚才的测试来看,管理中的不少设置都改变了,新添加了“Access Control”一项设置,用来确定访问权,原来这一项设置是附属于“用户帐号”设置的。另外论坛的设置也改变了很大,比原来的设置要简单方便很多,不用先设置关键字,再去设论坛,只要在论坛设置中直接添加就可以了。论坛的发帖也可以更改编辑了---这是原来Drupal被人诟病最多的一个问题。但是论坛本身比起PHPBB相差还是挺远的,没有添加譬如“引用回复”等选项,估计还是要靠模块来完成了。
区块(block)设置也有了较大的改观,现在可以更加方便的设置区块的显示,只需要简单选择就可以完成诸如“只在Blog中显示”,“只在Book中显示”等操作,很是方便。
搜索据说也彻底支持UTF-8编码,可以进行多语言搜索了,但是我测试了一下,还是有问题,准备写bug report。
还有其他很多比较细小或者是革命性的改动,请参看下面的更改日志:
------------------------
- search:
* added UTF-8 support to make it work with all languages.
* improved search indexing algorithm.
* improved search output.
* impose a throttle on indexing of large sites.
* added search block.
- syndication:
* made the ping module ping pingomatic.com which, in turn, will ping all the major ping services.
* added categories to RSS feeds.
* added enclosures to RSS feeds.
- flood control mechanism:
* added a mechanism to throttle certain operations.
- usability:
* refactored the block configuration pages.
* refactored the statistics pages.
* refactored the watchdog pages.
* refactored the throttle module configuration.
* refactored the access rules page.
* refactored the content administration page.
* introduced forum configuration pages.
* added a 'add child page' link to book pages.
- contact module:
* added a simple contact module that allows users to contact each other using e-mail.
- multi-site configuration:
* made it possible to run multiple sites from a single code base.
- added an image API: enables better image handling.
- block system:
* extended the block visibility settings.
- theme system:
* added new theme functions.
- database backend:
* the PEAR database backend is no longer supported.
- performance:
* improved performance of the forum topics block.
* improved performance of the tracker module.
* improved performance of the node pages.
- documentation:
* improved and extended PHPDoc/Doxygen comments.
Comments
咨询你邮件字符集问题
我安装了4.6.4最新版本的drupal 新注册用户收到的邮件总是UTF-8格式 这让用户很不方便,能否将发送邮件的字符集修改为GB2312,系统其他地方当然还使用UTF-8格式。 你知道怎么做吗?
邮件字符集转换
有必要吗?现在大部分邮箱都支持UTF-8编码,如果用客户端程序接收邮件这个问题就不十分明显了,一般的邮件客户端都可以自动识别编码的。不过你要是觉得有必要我可以告诉你方法:找到modules目录下的user.module文件,大概在343行有一个user_mail函数。在这个函数的首行加入以下代码:
function user_mail($mail, $subject, $message, $header) {
$mail = iconv('UTF-8','GB2312',$mail);//也许可以省略此行,自己试一下
$message = iconv('UTF-8','GB2312',$message);
$header = iconv('UTF-8','GB2312',$header);//也许可以省略此行,自己试一下
if……略
?>
并修改376行的‘charset=utf-8’为‘charset=gb2312’就可以了。
增加以下语句后出错
增加以下语句后出错,无法发送邮件,奇怪:
$mail = iconv('UTF-8','GB2312',$mail);//也许可以省略此行,自己试一下
$message = iconv('UTF-8','GB2312',$message);
$header = iconv('UTF-8','GB2312',$header);//也许可以省略此行,自己
你的PHP版本?
请把这三行加在函数里面,从340行到该函数结束替换成以下内容(你的PHP版本?)
/**
* Send an e-mail message.
*/
function user_mail($mail, $subject, $message, $header) {
$mail = iconv('UTF-8','GB2312',$mail);
$message = iconv('UTF-8','GB2312',$message);
$header = iconv('UTF-8','GB2312',$header);
if (variable_get('smtp_library', '') && file_exists(variable_get('smtp_library', ''))) {
include_once variable_get('smtp_library', '');
return user_mail_wrapper($mail, $subject, $message, $header);
}
else {
/*
** Note: if you are having problems with sending mail, or mails look wrong
** when they are received you may have to modify the str_replace to suit
** your systems.
** - \r\n will work under dos and windows.
** - \n will work for linux, unix and BSDs.
** - \r will work for macs.
**
** According to RFC 2646, it's quite rude to not wrap your e-mails:
**
** "The Text/Plain media type is the lowest common denominator of
** Internet email, with lines of no more than 997 characters (by
** convention usually no more than 80), and where the CRLF sequence
** represents a line break [MIME-IMT]."
**
** CRLF === \r\n
**
** http://www.rfc-editor.org/rfc/rfc2646.txt
**
*/
return mail(
$mail,
mime_header_encode($subject),
str_replace("\r", '', $message),
"MIME-Version: 1.0\nContent-Type: text/plain; charset=gb2312; format=flowed\nContent-transfer-encoding: 8Bit\n" . $header
);
}
}
?>
Http://www.nduox.com
Http://www.viewbase.cn
我的php版本是3.4.8
增加进去后就报告 344行语句错误
难道我的php不支持iconv函数吗?
难道我的php不支持iconv函数吗?怎么办?
升级!
我是在PHP5.04中测试通过的 ^_^ 3.4.8能运行Drupal4.6? 呵呵 看来只能升级PHP了。PHP3中的编码转换很麻烦,没有试过……
Http://www.nduox.com
Http://www.viewbase.cn
呵呵,用iconv函数应该
呵呵,用iconv函数应该可以解决这个问题,但是只有PHP 4.0.5以上的版本才支持iconv,参看这里
Post new comment