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 ) ;
}
}
}
XoopsBlock下のメソッドはdeprecatedになると思います。
/class/xoopsblock.phpをinclude_onceするようにしました。