Hello GiJoe,
As I mentioned in an earlier thread, I have been having problems with the coming events block showing events that have already finished. I solved the problem on my own site. It is in the function get_blockarray_coming_event in piCal_xoops.php file. Basically the $whr_term was set wrong and pulling in old (finished) events. It should be set to $whr_term = "end>'$now'" ;
Here is what I did - I just commented out parts. I don't know if this will cause problems for others, but it solved one of my problems.
function get_blockarray_coming_event( $get_target = '' , $num = 5 , $alt_disp = false )
{
if( $get_target == '' ) $get_target = $_SERVER[ 'PHP_SELF' ] ;
$now = $alt_disp ? time() : $this->unixtime ;
// 時差を計算しつつ、WHERE節の期間に関する条件生成
$tzoffset = ( $this->user_TZ - $this->server_TZ ) * 3600 ;
//chad if( $tzoffset == 0 ) {
// 時差がない場合 (MySQLに負荷をかけさせないため、ここで条件分けしとく)
$whr_term = "end>'$now'" ;
//chad } else {
// 時差がある場合は、alldayによって場合分け
//chad $whr_term = "(allday AND end>'$now') OR ( ! allday AND end>'".($now - $tzoffset )."')" ;
//chad}
Hello GiJoe,
No problem! Please take your time.
無理をしないで下さい!!
チャド
hi Chado.
This patch is correct.
Since this function is also called by another blocks,
I don't apply your codes as is.
But your suggestion is indeed useful for me.
Thank you!