PEAK XOOPS - Re: Pical and Xoops 2.3.1 in englishin japanese

Re: Pical and Xoops 2.3.1

List posts in the topic

none Re: Pical and Xoops 2.3.1

msg# 1.2.1
depth:
2
Previous post - Next post | Parent - No child | Posted on 2009/2/8 19:54
PinMaster  上等兵 From: Marseille (France)  Posts: 40
Hi,

this is my patch for the plugin in the active block minicalendar_ex.

Edit file : pical_minical_ex.php
In line : 18-41
Replace by :
	global $xoopsConfig , $xoopsDB , $xoopsUser ;
  $mydirname = empty( $options[0] ) ? basename( dirname( dirname( __FILE__ ) ) ) : $options[0] ;
	// speed check
	//global $GIJ_common_time ;
	//list($usec, $sec) = explode(" ",microtime());
	//echo ((float)$sec + (float)$usec) - $GIJ_common_time ;
  //$bid = XoopsBlock::getByModule($moduleid, false); 

	// get bid
	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
		// XoopsCube 2.1
		$bid = $options[ sizeof( $options ) - 1 ] ;
	} else if( (substr( XOOPS_VERSION , 6 , 3 ) > 2.0) && (substr( XOOPS_VERSION , 6 , 3 ) < 2.3 )) {
		// XOOPS 2.1/2.2
		// instanceid as bid from block_instance
		$bid = @$GLOBALS['pical_blockinstance_id'] ;
	} else if (substr( XOOPS_VERSION , 6 , 3 ) >= 2.3 ) {
  		$mcx_sql = $xoopsDB->query( "SELECT bid FROM ".$xoopsDB->prefix("modules")." AS module, ".$xoopsDB->prefix("newblocks")." AS block WHERE (block.mid=module.mid and module.dirname='".$mydirname."' AND block.show_func='pical_minical_ex_show')");
		  list($bid)= $xoopsDB->fetchRow( $mcx_sql );
  } else {
		// XOOPS 2.0.x
		if( is_object( $GLOBALS['block_arr'][$GLOBALS['i']] ) ) {
			// bid from newblocks
			$bid = $GLOBALS['block_arr'][$GLOBALS['i']]->getVar('bid') ;
		} else {
			return array() ;
		}
	}
Votes:10 Average:7.00

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!