Index: /branches/Ver3.0/xpressme_integration_kit/class/modInfo_class.php
===================================================================
--- /branches/Ver3.0/xpressme_integration_kit/class/modInfo_class.php	(revision 754)
+++ /branches/Ver3.0/xpressme_integration_kit/class/modInfo_class.php	(revision 755)
@@ -12,11 +12,11 @@
  * The function to acquire only a set value without calling the XOOPS system is here.
  */
-require_once dirname( __FILE__ ).'/wpInfo_class.php' ;
 
-class xpressInfo{
+class modInfo{
 	var $xoops_mainfile_path;
 	var $xoops_root_path;
 	var $xoops_url;
 	var $xoops_trust_path;
+	var $xoops_var_path;
 	var $xoops_cache_path;
 	var $xoops_upload_path;
@@ -36,8 +36,7 @@
 	var $module_version;
 	var $module_codename;
+	var $module_id;
 	var $is_impress;
-	var $module_id;
 	var $xoops_time_zone;
-	var $xoops_var_path;
 	
 	function __constructor()	//for PHP5
@@ -47,11 +46,13 @@
     }
     
-    function xpressInfo()	//for PHP4 constructor
+    function modInfo()	//for PHP4 constructor
     {  
+    	global $xoopsModule;
+    	
     	$this->xoops_mainfile_path = dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
     	$this->module_path=dirname(dirname(__FILE__));
     	$this->module_name=basename($this->module_path);
 		$this->xoops_root_path = XOOPS_ROOT_PATH;
-		if(defined('XOOPS_TRUST_PATH')) $this->xoops_trust_path = XOOPS_TRUST_PATH; else $this->xoops_trust_path = '';
+		$this->xoops_trust_path = (defined('XOOPS_TRUST_PATH')) ? XOOPS_TRUST_PATH : '';
 		$this->xoops_url = XOOPS_URL;
 		$this->module_url = $this->xoops_url . '/modules/' . $this->module_name;
@@ -65,8 +66,10 @@
 		$this->db_pass = XOOPS_DB_PASS;
 		$this->db_host = XOOPS_DB_HOST;
- 		if(defined('XOOPS_DB_SALT')) $this->xoops_db_salt = XOOPS_DB_SALT; else $this->xoops_db_salt = '';
-		if(defined('XOOPS_SALT')) $this->xoops_salt = XOOPS_SALT; else $this->xoops_salt = '';
+		$this->xoops_db_salt = (defined('XOOPS_DB_SALT')) ? XOOPS_DB_SALT : '';
+		$this->xoops_salt = (defined('XOOPS_SALT')) ? XOOPS_SALT : '';
 		$this->xoops_lang =  @$GLOBALS["xoopsConfig"]['language'];
-
+		$this->module_id =! empty($xoopsModule) ? $xoopsModule->getVar('mid') : 0;
+		$this->module_version = empty($xoopsModule) ? $xoopsModule->getVar('version') : '';
+		$module_codename = $this->_get_module_codename();
     	// start /admin/index.php page detect
     	$php_script_name = $_SERVER['SCRIPT_NAME'];
@@ -76,9 +79,5 @@
 		if (strstr($php_script_name,$admin_page) !== false) $is_xoops_module_admin = true;
 		if (strstr($php_query_string,$admin_page) !== false) $is_xoops_module_admin = true;
-    	$this->_get_value_by_xoops_define();
-		//  define from /settings/definition.inc.php (XCL)  or /include/common.php(2016a-JP)
 		
-		$this->set_module_version();
-		$this->set_wp_version();
 		if (function_exists('date_default_timezone_get')){
 			$this->xoops_time_zone = date_default_timezone_get();
@@ -86,48 +85,18 @@
     }
 
-	// A set value is acquired from XOOPS define value .
-	function _get_value_by_xoops_define(){
-		$wp_info = new wpInfo;
-		$this->wp_lang = $wp_info->get_wpLang($this->xoops_lang);
-
-	}
-	
     
-    // set XPressME module virsion and codename from xoops_versions.php
-    function set_module_version(){
-    	$xoops_version_file = dirname(dirname(__FILE__)) . '/xoops_version.php';
+    // get XPressME module virsion and codename from xoops_versions.php
+    function _get_module_codename(){
+    	$xoops_version_file = $this->module_path . '/xoops_version.php';
 		if(file_exists($xoops_version_file)){
 			$version_file = file($xoops_version_file);
-			$version_pattern = '^\s*(\$modversion\[\s*\'version\'\s*\])\s*=\s*[\'"]([^\'"]*)[\'"]';
 			$codename_pattern = '^\s*(\$modversion\[\s*\'codename\'\s*\])\s*=\s*[\'"]([^\'"]*)[\'"]';
-			$version_found = false;
-			$codename_found = false;
 			for ($i = 0 ; $i <count($version_file) ; $i++){
-				if (preg_match( "/$version_pattern/", $version_file[$i] ,$v_matches )){
-					$this->module_version = $v_matches[2];
-					$version_found = true;
+				if (preg_match( "/$codename_pattern/", $version_file[$i] ,$c_matches )){
+					return $c_matches[2];
 				}
-				if (preg_match( "/$codename_pattern/", $version_file[$i] ,$c_matches )){
-					$this->module_codename = $c_matches[2];
-					$codename_found = true;
-				}
-				if ( $version_found && $codename_found ) break;
 			}
 		}
-    }
-    
-    function set_wp_version(){
-    	include dirname(dirname(__FILE__)) . '/wp-includes/version.php';
-    	
-    	$this->wp_db_version = $wp_db_version;
-		
-		$this->wp_version = str_replace("ME", "", $wp_version);
-		
-		$pattern = 'ME.*';
-    	if (preg_match('/' . $pattern . '/' ,$wp_version)){
-			$this->is_wp_me = true;
-		} else {
-			$this->is_wp_me = true;
-		}
+		return '';
     }
     
Index: /branches/Ver3.0/xpressme_integration_kit/include/add_xpress_config.php
===================================================================
--- /branches/Ver3.0/xpressme_integration_kit/include/add_xpress_config.php	(revision 754)
+++ /branches/Ver3.0/xpressme_integration_kit/include/add_xpress_config.php	(revision 755)
@@ -28,4 +28,7 @@
 require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ;
 $xoops_config = new ConfigFromXoops;
+// TEST modInfo_class
+require_once dirname(dirname( __FILE__ )).'/class/modInfo_class.php' ;
+$mod_info = new modInfo;
 require_once dirname( __FILE__ ).'/set_cash_cookie_path.php' ;
 ?>
