Index: branches/Ver3.0/xpressme_integration_kit/class/config_from_xoops.class.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/class/config_from_xoops.class.php	(revision 756)
+++ 	(revision )
@@ -1,162 +1,0 @@
-<?php
-/*
- * XPressME - WordPress for XOOPS
- *
- * @copyright	XPressME Project http://www.toemon.com
- * @license		http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author		toemon
- * @package		module::xpress
- */
-
-/* 
- * The function to acquire only a set value without calling the XOOPS system is here.
- */
-require_once dirname( __FILE__ ).'/wpInfo_class.php' ;
-
-class ConfigFromXoops{
-	var $xoops_mainfile_path;
-	var $define_arry = array();	
-	var $external_define_path;
-	var $xp_config_file_path;
-	var $xoops_root_path;
-	var $xoops_url;
-	var $xoops_trust_path;
-	var $xoops_cache_path;
-	var $xoops_db_prefix;
-	var $xoops_db_name;
-	var $xoops_db_user;
-	var $xoops_db_pass;
-	var $xoops_db_host;
-	var $module_name;
-	var $module_path;
-	var $module_url;
-	var $module_db_prefix;
-	var $module_version;
-	var $module_codename;	
-	var $xoops_upload_path;
-	var $xoops_upload_url;
-	var $xoops_db_salt;
-	var $xoops_salt;
-	var $is_impress;
-	var $impress_db_config_file;
-	var $wp_db_version;
-	var $wp_version;
-	var $is_wp_me;
-	var $xoops_language;
-	var $module_id;
-	var $module_config= array();
-	var $xoops_time_zone;
-	var $xoops_var_path;
-	var $xoops_db_charset;
-	var $xoops_db_pconnect;
-	var $xoops_path;
-	var $xoops_lang;
-	var $wp_lang;
-	
-	function __constructor()	//for PHP5
-    {
-        $this->ConfigFromXoops();
-       
-    }
-    
-    function ConfigFromXoops()	//for PHP4 constructor
-    {  
-    	$this->xoops_mainfile_path = $this->get_xoops_mainfile_path();
-    	$this->module_path=dirname(dirname(__FILE__));
-    	$this->module_name=basename($this->module_path);
-    	$this->xp_config_file_path = $this->module_path . '/xp-config.php';
-    	
-    	// start /admin/index.php page detect
-    	$php_script_name = $_SERVER['SCRIPT_NAME'];
-		$php_query_string = $_SERVER['QUERY_STRING'];
-		$admin_page = 	basename(dirname(dirname(__FILE__))) . '/admin/index.php';
-		$is_xoops_module_admin = false;
-		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->xoops_upload_path = $this->xoops_root_path .'/uploads';
-		$this->xoops_upload_url = $this->xoops_url . '/uploads';
-		$this->module_db_prefix = $this->xoops_db_prefix  . '_' . preg_replace('/wordpress/','wp',$this->module_name) . '_';
-		
-		$this->set_module_version();
-		$this->set_wp_version();
-		if (function_exists('date_default_timezone_get')){
-			$this->xoops_time_zone = date_default_timezone_get();
-		}
-		$this->_get_cache_path();
-    }
-
-	// A set value is acquired from XOOPS define value .
-	function _get_value_by_xoops_define(){
-		$this->xoops_root_path = XOOPS_ROOT_PATH;
-		$this->xoops_url = XOOPS_URL;
-		$this->module_url = $this->xoops_url . '/modules/' . $this->module_name;
-		if(defined('XOOPS_TRUST_PATH')) $this->xoops_trust_path = XOOPS_TRUST_PATH; else $this->xoops_trust_path = '';
-		$this->xoops_db_prefix = XOOPS_DB_PREFIX;
-		$this->xoops_db_name = XOOPS_DB_NAME;
-		$this->xoops_db_user = XOOPS_DB_USER;
-		$this->xoops_db_pass = XOOPS_DB_PASS;
-		$this->xoops_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_lang =  @$GLOBALS["xoopsConfig"]['language'];
-		$wp_info = new wpInfo;
-		$this->wp_lang = $wp_info->get_wpLang($this->xoops_lang);
-
-	}
-	
-	// call after the $this->xoops_trust_path is set
-	function _get_cache_path(){
-		$cache_path = $this->xoops_trust_path . '/cache';
-		if (file_exists($cache_path) && is_writable($cache_path)){
-			$this->xoops_cache_path = $cache_path;
-			return;
-		}
-		$this->xoops_cache_path = $this->xoops_root_path . '/cache';
-	}
-    
-    function get_xoops_mainfile_path(){
-    	return dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
-    }
-    
-    // set XPressME module virsion and codename from xoops_versions.php
-    function set_module_version(){
-    	$xoops_version_file = dirname(dirname(__FILE__)) . '/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 )){
-					$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;
-		}
-    }
-    
-}
-?>
Index: branches/Ver3.0/xpressme_integration_kit/class/modInfo_class.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/class/modInfo_class.php	(revision 756)
+++ branches/Ver3.0/xpressme_integration_kit/class/modInfo_class.php	(revision 757)
@@ -9,9 +9,7 @@
  */
 
-/* 
- * The function to acquire only a set value without calling the XOOPS system is here.
- */
-
-class modInfo{
+if (defined( 'XOOPS_MAINFILE_INCLUDED')) :
+
+class modInfoClass {
 	var $xoops_mainfile_path;
 	var $xoops_root_path;
@@ -27,8 +25,4 @@
 	var $xoops_language;
 	var $module_db_prefix;
-	var $db_name;
-	var $db_user;
-	var $db_pass;
-	var $db_host;
 	var $module_name;
 	var $module_path;
@@ -37,53 +31,100 @@
 	var $module_codename;
 	var $module_id;
-	var $is_impress;
+	var $xoops_version;
+	var $is_impress_cms;
+	var $is_cube_legacy;
+	var $is_xoops2jp;
+	var $is_xoops2;
+	var $is_xoops_legacy;
+	var $is_jpex;
 	var $xoops_time_zone;
+	var $wp_version;
+	var $wpConfigInfo;
 	
 	function __constructor()	//for PHP5
     {
-        $this->xpressInfo();
+        $this->modInfoClass();
        
     }
     
-    function modInfo()	//for PHP4 constructor
+    function modInfoClass()	//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);
+    	global $xoopsModule,$wpConfigInfo;
+    	if (is_object($wpConfigInfo)){
+    		include_once dirname(__FILE__).'/wpConfigInfo_class.php';
+    		$this->wpConfigInfo = new wpConfigInfoClass;
+    	}
 		$this->xoops_root_path = XOOPS_ROOT_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;
+    	$this->xoops_mainfile_path = XOOPS_ROOT_PATH . '/mainfile.php';
 		$this->xoops_upload_path = XOOPS_UPLOAD_PATH;
 		$this->xoops_upload_url = XOOPS_UPLOAD_URL;
 		$this->xoops_cache_path = XOOPS_CACHE_PATH;
-		$this->db_prefix = XOOPS_DB_PREFIX;
-		$this->module_db_prefix = $this->xoops_db_prefix  . '_' . preg_replace('/wordpress/','wp',$this->module_name) . '_';
-		$this->db_name = XOOPS_DB_NAME;
-		$this->db_user = XOOPS_DB_USER;
-		$this->db_pass = XOOPS_DB_PASS;
-		$this->db_host = XOOPS_DB_HOST;
-		$this->xoops_db_salt = (defined('XOOPS_DB_SALT')) ? XOOPS_DB_SALT : '';
-		$this->xoops_salt = (defined('XOOPS_SALT')) ? XOOPS_SALT : '';
+    	$this->module_path=dirname(dirname(__FILE__));
+    	$this->module_name=basename($this->module_path);
+		$this->module_url = $this->xoops_url . '/modules/' . $this->module_name;
+		$this->xoops_db_prefix = XOOPS_DB_PREFIX . '_';
+		$this->module_db_prefix = $this->_get_module_db_prefix();
 		$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'];
-		$php_query_string = $_SERVER['QUERY_STRING'];
-		$admin_page = 	basename(dirname(dirname(__FILE__))) . '/admin/index.php';
-		$is_xoops_module_admin = false;
-		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->module_codename = $this->_get_module_codename();
+		$this->wp_version = $this->_get_wp_version();
+		
+		$this->xoops_version = (defined('XOOPS_VERSION')) ? XOOPS_VERSION : '';
+    	$this->_branches_cores();
 		
 		if (function_exists('date_default_timezone_get')){
 			$this->xoops_time_zone = date_default_timezone_get();
 		}
+
     }
 
-    
+	function _get_module_db_prefix(){
+    	$module_db_prefix = XOOPS_DB_PREFIX . '_' . preg_replace('/wordpress/','wp',$this->module_name);
+    	return $module_db_prefix;
+	}
+    function _branches_cores(){
+    	/*  XOOPS include/version.php define value */
+		//define("XOOPS_VERSION","XOOPS 2.0.16a JP");
+		//define("XOOPS_VERSION", "XOOPS Cube Legacy 2.2");
+		//define('XOOPS_VERSION', 'ImpressCMS 1.1.2 Final');
+		//define("XOOPS_VERSION", "XOOPS JPEx 1.6");
+		//define("XOOPS_VERSION", "XOOPS 2.3.3");
+		//define("XOOPS_VERSION", "Xoops Legacy");	define("XOOPS_ENGINE", "legacy");
+    	$this->is_impress_cms = false;
+		$this->is_cube_legacy = false;
+		$this->is_xoops2jp = false;
+		$this->is_xoops2 = false;
+		$this->is_xoops_legacy = false;
+		$this->is_jpex = false;
+		
+		$version = XOOPS_VERSION;
+		
+		
+    	// branches by cores
+		if( preg_match('/JP$/', $this->xoops_version))
+			$this->is_xoops2jp = true;
+		if( preg_match('/Cube\s*Legacy/', $this->xoops_version))
+			$this->is_cube_legacy = true;
+		if( preg_match('/ImpressCMS/', $this->xoops_version))
+			$this->is_impress_cms = true;
+		if( preg_match('/JPEx/', $this->xoops_version))
+			$this->is_jpex = true;
+		if( preg_match('/XOOPS\s*[0-9|\.]*$/', $this->xoops_version))
+			$this->is_xoops2 = true;
+		if( preg_match('/Xoops\s*Legacy/', $this->xoops_version))
+			$this->is_xoops_legacy = true;
+	}
+    function _get_wp_version(){
+    	$wp_version_file =  dirname(dirname(__FILE__)) . '/wp-includes/version.php';
+    	if (file_exists($wp_version_file)){
+    		include $wp_version_file;
+    		return str_replace("ME", "", $wp_version);
+    	}
+    	return '';
+    }
+	
     // get XPressME module virsion and codename from xoops_versions.php
     function _get_module_codename(){
@@ -100,5 +141,116 @@
 		return '';
     }
-    
+	function get_xoops_db_prefix(){
+		return $this->xoops_db_prefix;
+	}
+	
+	function get_xoops_root_path(){
+		return $this->xoops_root_path;
+	}
+	function get_xoops_trust_path(){
+		return $this->xoops_trust_path;
+	}
+	function get_xoops_mainfile_path(){
+		return $this->xoops_mainfile_path;
+	}
+	function get_xoops_header_path(){
+		return $this->xoops_root_path ."/header.php";
+	}
+	function get_xoops_footer_path(){
+		return $this->xoops_root_path . '/footer.php';
+	}
+	function get_xoops_cache_path(){
+		return $this->xoops_cache_path;
+	}
+	function get_xoops_url(){
+		return $this->xoops_url;
+	}
+	function get_xoops_upload_path(){
+		return $this->xoops_upload_path;
+	}
+	function get_xoops_upload_url(){
+		return $this->xoops_upload_url;
+	}
+	function get_module_path(){
+		return $this->module_path;
+	}
+	function get_module_templates_path(){
+		return $this->module_path . '/templates';
+	}
+	
+	function get_module_name(){
+		return $this->module_name;
+	}
+	function get_module_dirname(){
+		return $this->module_name;
+	}
+	function get_module_url(){
+		return $this->module_url;
+	}
+ 	function get_module_db_prefix(){
+		return $this->xpress_db_prefix;
+	}
+ 	function get_xoops_time_zone(){
+		return $this->xoops_time_zone;
+	}
+ 	function get_module_version(){
+		return $this->module_version;
+	}
+ 	function get_module_codename(){
+		return $this->module_codename;
+	}
+ 	function get_wp_version(){
+		return $this->wp_version;
+	}
+ 	function get_module_full_version(){
+		return $this->module_version . $this->module_codename;
+	}
+	
+ 	function is_impress_cms(){
+		return $this->is_impress_cms;
+	}
+ 	function is_cube_legacy(){
+		return $this->is_cube_legacy;
+	}
+ 	function is_xoops2jp(){
+		return $this->is_xoops2jp;
+	}
+ 	function is_xoops2(){
+		return $this->is_xoops2;
+	}
+ 	function is_xoops_legacy(){
+		return $this->is_xoops_legacy;
+	}
+ 	function is_jpex(){
+		return $this->is_jpex;
+	}
+	
+	function get_moduleID_ByDirname($dir_name){
+		$module_handler =& xoops_gethandler('module');
+		$module =& $module_handler->getByDirname($dir_name);
+		$module_id = $module->getVar('mid');
+	}
+	
+	function get_moduleID(){
+		global $xoopsModule;
+		$module_id = $xoopsModule->getVar('mid');
+		return $module_id;
+	}
+	
+	function get_ModuleConfig($key_name=''){
+		if (empty($key_name)) return '';
+		global $xoopsModuleConfig;
+		$value = isset($xoopsModuleConfig[$key_name]) ? $xoopsModuleConfig[$key_name] : '';
+	}
+	
+	function get_ModuleConfig_ByDirname($dir_name,$key_name=''){
+		$mid = $this->get_moduleID_ByDirname($dir_name);
+		$conf_handler =& xoops_gethandler('config');
+		$modConfig = $conf_handler->getConfigsByCat(0, $mid);
+		if(empty($modConfig)) return '';
+		if(empty($key_name)) return $modConfig;
+		return isset($modConfig[$key_name]) ? $modConfig[$key_name] : '';
+	}
+   
    	function is_wpdb_installed(){
    		global $xoopsDB;
@@ -111,5 +263,12 @@
 		return false;
 	}
-	
+	function is_wp_file_found()
+	{
+		if (!file_exists($this->module_path . '/wp-settings.php')){
+			return false;
+		}
+		return true;
+	}
+
 	function is_writeable_mode($check_file) {
         if (!is_dir($check_file)) {
@@ -135,5 +294,32 @@
     	return true;
 	}
+	function get_php_version()
+	{
+		if (function_exists('phpversion'))
+			return phpversion();
+		else 
+			return '';
+	}
+	function get_mysql_version()
+	{
+		global $xoopsDB;
+		list($SV) = $xoopsDB->fetchRow($xoopsDB->query('SELECT version()'));
+		return $SV;
+	}
+	public function get_mod_image_link($file_name='') 
+	{
+		$link_url = '';
+		if(!empty($file_name)){
+			if(file_exists($this->module_path.'/images/'.$file_name)){
+				$link_url = '<img alt="'.$file_name.'" src="'. $this->mod_url .'/images/'.$file_name.'" title="'.$file_name.'" align=top>';
+			}
+		}
+		return $link_url;
+	}
+	function get_wpLang($xoops_lang=''){
+		return $this->wpConfigInfo->get_wpLang($xoops_lang);
+	}
 	
 }
+endif;
 ?>
Index: branches/Ver3.0/xpressme_integration_kit/class/wpConfigInfo_class.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/class/wpConfigInfo_class.php	(revision 757)
+++ branches/Ver3.0/xpressme_integration_kit/class/wpConfigInfo_class.php	(revision 757)
@@ -0,0 +1,98 @@
+<?php
+/*
+ * XPressME - WordPress for XOOPS
+ *
+ * @copyright	XPressME Project http://www.toemon.com
+ * @license		http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author		toemon
+ * @package		module::xpress
+ */
+
+if (defined( 'XOOPS_MAINFILE_INCLUDED')) :
+require_once dirname( __FILE__ ).'/langInfo_class.php' ;
+
+class wpConfigInfoClass {
+	var $xoops_db_prefix;
+	var $db_prefix;
+	var $db_name;
+	var $db_user;
+	var $db_pass;
+	var $db_host;
+	var $db_salt;
+	var $langInfo;
+	
+	function __constructor()	//for PHP5
+    {
+        $this->wpConfigInfoClass();
+    }
+    
+    function wpConfigInfoClass()	//for PHP4 constructor
+    {
+		global $xoopsModule;
+		$this->xoops_db_prefix = XOOPS_DB_PREFIX .'_';
+		$this->db_prefix = $this->_get_wp_db_prefix();
+		$this->db_name = XOOPS_DB_NAME;
+		$this->db_user = XOOPS_DB_USER;
+		$this->db_pass = XOOPS_DB_PASS;
+		$this->db_host = XOOPS_DB_HOST;
+		if(!defined('XOOPS_DB_NAME') ) $this->_get_resource_db_ini();
+		$this->db_salt = (defined('XOOPS_DB_SALT')) ? XOOPS_DB_SALT : '';
+		require_once dirname( __FILE__ ).'/langInfo_class.php' ;
+		$this->langInfo = new langInfoClass;
+    }
+	function _get_wp_db_prefix(){
+		$module_name = basename(dirname(dirname(__FILE__)));
+    	$module_db_prefix = XOOPS_DB_PREFIX . '_' . preg_replace('/wordpress/','wp',$module_name) . '_';
+    	return $module_db_prefix;
+	}
+
+	// XOOPS3 doesn't define the DB connection information in the constant.
+    function _get_resource_db_ini(){
+		if(!defined('XOOPS_VAR_PATH') ) return;
+		$def_file = XOOPS_VAR_PATH . '/etc/resource.db.ini.php';
+		if(! file_exists($def_file)) return;
+		$array_file = file($def_file);
+		foreach ($array_file as $line){
+			if (preg_match('/^\s*dbname\s*=\s*[\'"](.*)[\'"]/' ,$line,$matchs))
+				$this->db_name = $matchs[1];
+			if (preg_match('/^\s*host\s*=\s*[\'"](.*)[\'"]/' ,$line,$matchs))
+				$this->db_host = $matchs[1];
+			if (preg_match('/^\s*username\s*=\s*[\'"](.*)[\'"]/' ,$line,$matchs))
+				$this->db_user = $matchs[1];
+			if (preg_match('/^\s*password\s*=\s*[\'"](.*)[\'"]/' ,$line,$matchs))
+				$this->db_pass = $matchs[1];
+			if (preg_match('/^\s*prefix\s*=\s*[\'"](.*)[\'"]/' ,$line,$matchs))
+				$this->db_prefix = $matchs[1];
+		}
+	}
+	
+	function get_xoops_db_prefix(){
+		return $this->xoops_db_prefix;
+	}
+	function get_db_prefix(){
+		return $this->db_prefix;
+	}
+	function get_wp_db_prefix(){
+		return $this->db_prefix;
+	}
+	function get_db_name(){
+		return $this->db_name;
+	}
+	function get_db_user(){
+		return $this->db_user;
+	}
+	function get_db_pass(){
+		return $this->db_pass;
+	}
+	function get_db_host(){
+		return $this->db_host;
+	}
+	function get_db_salt(){
+		return $this->db_salt;
+	}
+	function get_wpLang($xoops_lang=''){
+		return $this->langInfo->get_wpLang($xoops_lang);
+	}
+}
+endif;
+?>
Index: branches/Ver3.0/xpressme_integration_kit/class/wpInfo_class.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/class/wpInfo_class.php	(revision 756)
+++ 	(revision )
@@ -1,228 +1,0 @@
-<?php
-/*
- * XPressME - WordPress for XOOPS
- *
- * @copyright	XPressME Project http://www.toemon.com
- * @license		http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author		toemon
- * @package		module::xpress
- */
-class wpInfo {
-	var	$mod_dirpath;
-	var	$mod_name;
-	var $mod_url;
-
-	var $xoops_Lang;
-	var $wp_Lang;
-	var $php_version;
-	var $mysql_version;
-	// The language of XOOPS is set as Key of the array. 
-	// The language of WP is set as Value of the array. 
-	var $wp_lang_array = array(
-		'english' => 	'en_US',
-		'japanese' => 	'ja',
-		'ja_utf8' => 	'ja',
-		'pt-br_utf8' =>	'pt_BR',
-		// The key(language of XOOPS) of the following lists has not been set yet. 
-		'Afrikaans' =>	'af',
-		'Albanian' =>	'al',
-		'Arabic' =>		'ar',
-		'Bangla' =>		'bn_BD',
-		'Basque' =>		'eu',
-		'Belarusian' =>	'be_BY',
-		'Bosnian' =>	'bs_BA',
-		'Bulgarian' =>	'bg_BG',
-		'Catalan' =>	'ca',
-		'Chinese' =>	'zh_CN',
-		'Hong Kong' =>	'zh_HK',
-		'Taiwan' =>		'zh_TW',
-		'Croatian' =>	'hr',
-		'Czech' =>		'cs_CZ',
-		'Danish' =>		'da_DK',
-		'Dutch' =>		'nl_NL',
-		'Esperanto' =>	'eo',
-		'Estonian' =>	'et',
-		'Faroese' =>	'fo',
-		'Finnish' =>	'fi',
-		'Galician' =>	'gl_ES',
-		'Georgian' =>	'ge_GE',
-		'German' =>		'de_DE',
-		'Greek' =>		'el',
-		'Hebrew' =>		'he_IL',
-		'Hungarian' =>	'hu_HU',
-		'Icelandic' =>	'is_IS',
-		'Indonesian' =>	'id_ID',
-		'Italian' =>	'it_IT',
-		'Khmer' =>		'km_KH',
-		'ko_utf8' =>	'ko_KR',
-		'Latvian' =>	'lv',
-		'Lithuanian' =>	'lt_LT',
-		'Macedonian' =>	'mk_MK',
-		'Malagasy' =>	'mg_MG',
-		'Malay' =>		'ms_MY',
-		'Nias' =>		'ni_ID',
-		'Norwegian' =>	'nb_NO',
-		'Persian' =>	'fa_IR',
-		'Polish' =>		'pl_PL',
-		'European Portuguese' =>	'pt_PT',
-		'Romanian' =>	'ro',
-		'Russian' =>	'ru_RU',
-		'Serbian' =>	'sr_RS',
-		'Sinhala' =>	'si_LK',
-		'Slovak' =>		'sk_SK',
-		'Slovenian' =>	'sl_SI',
-		'Spanish' =>	'es_ES',
-		'Sundanese' =>	'su_ID',
-		'Swedish' =>	'sv_SE',
-		'Tajik' =>		'tg',
-		'Thai' =>		'th',
-		'Turkish' =>	'tr',
-		'Ukrainian' =>	'uk',
-		'Uzbek' =>		'uz_UZ',
-		'Vietnamse' =>	'vi',
-		'Welsh' =>		'cy',
-	);
-
-	function wpInfo(){
-		$this->__construct();
-	}
-	function __construct() {
-		global $xoopsDB;
-		$this->mod_dirpath = dirname(dirname(__FILE__));
-		$this->mod_name = basename(dirname(dirname(__FILE__)));
-		$this->mod_url = XOOPS_URL . '/modules/'.$this->mod_name;
-		$this->load_lang();
-		$this->xoops_Lang = @$GLOBALS["xoopsConfig"]['language'];
-		$this->php_version    = phpversion();
-		list($SV) = $xoopsDB->fetchRow($xoopsDB->query('SELECT version()'));
-		$this->mysql_version = $SV;
-
-		$this->get_wpLang();
-	}
-	function text_indent($text,$num = 1,$css_option='')
-	{
-		$ret = '';
-		$px = 24 * $num;
-		$ret = '<div style="padding-left:' .$px .'px;'.$css_option.'">';
-		$ret .= $text . '</div>';
-		return $ret;
-	}
-	public function load_lang()
-	{
-		$lang = @$GLOBALS["xoopsConfig"]['language'];
-
-		// language file (modinfo.php)
-		if( file_exists( $this->mod_dirpath .'/language/'.$lang.'/admin.php' ) ) {
-			include_once $this->mod_dirpath .'/language/'.$lang.'/admin.php' ;
-		} else if( file_exists(  $this->mod_dirpath .'/language/english/admin.php' ) ) {
-			include_once $this->mod_dirpath .'/language/english/admin.php' ;
-		}
-	}
-	
-	public function get_php_version()
-	{
-		return $this->php_version;
-	}
-	public function get_mysql_version()
-	{
-		return $this->mysql_version;
-	}
-	public function get_wpLang($xoops_Lang = '') 
-	{
-		if(!empty($xoops_Lang)) $this->xoops_Lang = $xoops_Lang;
-		$this->wp_Lang = $this->wp_lang_array[$this->xoops_Lang];
-		if (empty($this->wp_Lang)) $this->wp_Lang =  'en_US';
-		return $this->wp_Lang;
-	}
-	public function get_mod_image_link($file_name='') 
-	{
-		$link_url = '';
-		if(!empty($file_name)){
-			if(file_exists($this->mod_dirpath.'/images/'.$file_name)){
-				$link_url = '<img alt="'.$file_name.'" src="'. $this->mod_url .'/images/'.$file_name.'" title="'.$file_name.'" align=top>';
-			}
-		}
-		return $link_url;
-	}
-
-	function is_wpdb_installed(){
-		global $xoopsDB;
-		$prefix_mod = XOOPS_DB_PREFIX .'_' . preg_replace('/wordpress/','wp',$this->mod_name) . '_';
-		$sql = "SHOW TABLES LIKE '$prefix_mod%'";
-		if ($result = $xoopsDB->queryf($sql)){
-			if($xoopsDB->getRowsNum($result))  return true;
-		}
-		return false;
-	}
-	
-	public function is_wp_file_found()
-	{
-		if (!file_exists($this->mod_dirpath . '/wp-settings.php')){
-			return false;
-		}
-		return true;
-	}
-	public function get_download_info($locale='')
-	{
-		$local_package = '';
-		$mysql_version = preg_replace('/[^0-9.].*/', '', $this->mysql_version);
-		$php_version = $this->php_version;
-
-		if (empty($locale)) $locale = $this->wp_Lang;
-
-/* test		
-		$mysql_version='4.0.27';
-		$php_version = '4.1.1';
-*/
-		// wprdpress original option
-		// ?version=$wp_version&php=$php_version&locale=$locale&mysql=$mysql_version&local_package=$local_package";
-		$option = "?php=$php_version&locale=$locale&mysql=$mysql_version&local_package=$local_package";
-		$url = "http://api.wordpress.org/core/version-check/1.5/" .$option;
-		$handle = @fopen($url,'r');
-		if ($handle) {
-			$ans = array();
-			$num = 0;
-			$pos = 0;
-	    	while (($buffer = fgets($handle, 4096)) !== false) {
-	    		$buffer = trim($buffer);
-	    		if (strlen($buffer) == 0) {
-	    			$num++;
-	    			$pos=0;
-	    		} else {
-	    			$ans[$num][$pos] = $buffer;
-	    			$pos++;
-	    		}
-	    	}
-	    	if (!feof($handle)) {
-	        	echo "Error: unexpected fgets() fail\n";
-	    	}
-	    	fclose($handle);
-		}
-			$ressponce = $ans[0][0];
-			$site_url = $ans[0][1];
-			$download_url = $ans[0][2];
-			$wp_version = $ans[0][3];
-			$download_lang = $ans[0][4];
-//			print_r($ans);
-			if (isset($ans[1])){
-				$en_download_url = $ans[1][2];
-			}
-			$ret = $this->text_indent('(Check URL: '.$url.')',3);
-			if ($locale == $download_lang){
-				$ret .= $this->text_indent(sprintf(_AM_XP2_WP_INFO_1,$locale),2);
-				$ret .= $this->text_indent('<a href="'.$download_url.'">' . $download_url .'</a>' ,3);
-				if (!empty($en_download_url)){
-					$ret .= $this->text_indent(_AM_XP2_WP_INFO_4,2);
-					$ret .= $this->text_indent('<a href="'.$en_download_url .'">' . $en_download_url .'</a>' ,3);
-				}
-			} else {
-				$ret .= $this->text_indent(sprintf(_AM_XP2_WP_INFO_2,$locale));
-				$ret .= $this->text_indent(_AM_XP2_WP_INFO_3,2);
-				$ret .= $this->text_indent('<a href="http://codex.wordpress.org/WordPress_in_Your_Language" target="	_blank">WordPress_in_Your_Language</a>' ,3);
-				$ret .= $this->text_indent(_AM_XP2_WP_INFO_4,2);
-				$ret .= $this->text_indent('<a href="'.$download_url.'">' . $download_url .'</a>' ,3);
-			}
-			echo $ret;
-		}
-	}
-?>
Index: branches/Ver3.0/xpressme_integration_kit/class/xpressD3commentContent.class.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/class/xpressD3commentContent.class.php	(revision 756)
+++ branches/Ver3.0/xpressme_integration_kit/class/xpressD3commentContent.class.php	(revision 757)
@@ -44,7 +44,7 @@
 		function displayCommentsInline( $params )
 		{
-			global $xoops_config;
+			global $modInfo;
 			if ( function_exists('date_default_timezone_set') )
-				date_default_timezone_set($xoops_config->xoops_time_zone);
+				date_default_timezone_set($modInfo->get_xoops_time_zone());
 			$new_params = $this->restructParams( $params ) ;
 			if (!$this->canAddComment($params['id']) ) {
