Compatibility between D3 and Cube2.1

Date 2006-07-19 05:05:52 | Category: XOOPS

in englishin japanese
D3 module can't be installed into XOOPS Cube 2.1 alpha3.

There are 3 problems in oninstall.php, onupdate.php, onuninstall.php

(1) /class/database/sqlutility.php is far different from the one in XOOPS 2.0.x
(2) class XoopsBlock is not defined
(3) no messages are displayed

solutions...

(1) In XOOPS Cube 2.1, include oldsqlutility.php
(2) add include_once /class/xoopsblock.php
(3) add delegate - the new feature of Cube 2.1 - like this:


$root =& XCube_Root::getSingleton();
$root->mEventManager->add("Module.Legacy.ModuleInstall.Success", new XCube_Delegate( 'wraps_message_append_oninstall' ) ) ;



function wraps_message_append_oninstall( &$controller , &$eventArgs )
{
	if( is_array( @$GLOBALS['ret'] ) ) {
		foreach( $GLOBALS['ret'] as $message ) {
			$controller->mLog->add( $message ) ;
		}
	}
}


Therefore, wraps 1.03 looks compatible with Cube 2.1





You can read more news at PEAK XOOPS.
http://xoops.peak.ne.jp

The URL for this story is:
http://xoops.peak.ne.jp/md/news/index.php?page=article&storyid=343