|
Written by Administrator
|
|
Saturday, 01 March 2008 03:30 |
|
在Joomla 1.5上开启了legacy mode后,AlphaContent 3.0.x可以安装成功,但是alphacontent组件却无法显示新添加的category/section下的文章。不过过一段时间,比如第二天,alphacontent便会显示这些新文章。
在AlphaContent官方论坛上也有人提出这样的问题,原因是和Joomla的版本信息文件version.php有关。官方解释是 The problem turned out to be that alphacontent relies on Joomla!'s version information provided in version.php. By taking out Joomla! in that file you will break alphacontent. To fix it you need to either use the original version.php file or edit alphacontent.php and alphacontent.html.php. 其实主要原因是joomla设置的时区和你所在的时区不一致,把Joomla的时区改为UTC+8,文章显示滞后的问题便立即解决,假如你不想更改时区,那么也有办法。
编辑 alphacontent.php,找到代码 if ( $_VERSION->PRODUCT == 'Joomla!' ){ $nullDate = $database->getNullDate(); if ( $_VERSION->RELEASE >= '1.5' ) { $now = date( 'Y-m-d H:i:s', time()+$mosConfig_offset*60*60 ); $checkVersionJ = 1; } else { $now = _CURRENT_SERVER_TIME; $checkVersionJ = 0; } } else { $nullDate = "0000-00-00 00:00:00"; $now = date( 'Y-m-d H:i:s', time()+$mosConfig_offset*60*60 ); $checkVersionJ = 0; }
在这段代码之后加入以下代码 $nullDate = $database->getNullDate(); $now = _CURRENT_SERVER_TIME;
|
|
Last Updated on Sunday, 08 February 2009 07:19 |