mymenu and Cube 2.1 Legacy

Date 2006-10-31 18:42:43 | Category: XOOPS

in englishin japanese
Cube2.1の互換性テストで必ずといって良いほどレポートされてしまうのが、mymenuによって実装された「一般設定」がfatal errorを起こす件です。

さすがにそろそろ直した方が良いと思い、D3モジュールでないmymenuでも、altsysを参照するように修正しました。TinyDの2.3betaに試験的に導入しています。TinyD 2.3では、altsysがなければ、「一般設定」も「ブロック管理」も表示されません。altsysを入れてください。

ただ、これに伴って、mymenuの導入にもう一つ手間が増えました。admin/index.php に、altsysを呼び出す以下のコードを挿入する必要があります。

挿入ポイントは、index.phpの作りにも依存しますが、cp_header.php や cp_functions.php の読込直後です。

// branch for altsys
if( defined( 'XOOPS_TRUST_PATH' ) && ! empty( $_GET['lib'] ) ) {
	$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
	$mydirpath = dirname( dirname( __FILE__ ) ) ;

	// common libs (eg. altsys)
	$lib = preg_replace( '[^a-zA-Z0-9_-]' , '' , $_GET['lib'] ) ;
	$page = preg_replace( '[^a-zA-Z0-9_-]' , '' , @$_GET['page'] ) ;
	
	if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ) ) {
		include XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ;
	} else if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ) ) {
		include XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ;
	} else {
		die( 'wrong request' ) ;
	}
	exit ;
}





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=392