Index: branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php	(revision 748)
+++ branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php	(revision 757)
@@ -40,6 +40,4 @@
 
 function xpress_is_multiblog() {
-	global $xoops_config;
-	
 	if (function_exists('is_multisite') && is_multisite()) return true;
 	return false;
@@ -56,6 +54,6 @@
 
 function xpress_is_wp_version($operator='==',$comp_version){
-	global $xoops_config;
- 	return version_compare($xoops_config->wp_version, $comp_version, $operator);
+	global $modInfo;
+ 	return version_compare($modInfo->get_wp_version(), $comp_version, $operator);
 }
 
@@ -184,8 +182,5 @@
 function xpress_credit($args ='')
 {
-	global $wp_version , $xoops_config;
-	if ($xoops_config->is_wpmu) {
-		global $wpmu_version;
-	}
+	global $wp_version , $modInfo;
 	
 	$defaults = array(
@@ -197,29 +192,19 @@
 	extract( $r );
 	
-	$xpress_version = $xoops_config->module_version;
-	$xpress_codename = $xoops_config->module_codename;
+	$xpress_version = $modInfo->get_module_version();
+	$xpress_codename = $modInfo->get_module_codename();
 	if ($no_link){
-		if ($xoops_config->is_wpmu) {
-			$output = 'XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename);
-			$output .= '(included WordPress MU ' . $wpmu_version. ')';
+		$output = 'XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename);
+		if (strstr($wp_version,'ME')){
+			$output .= '(included WordPress ' . $wp_version . ')';
 		} else {
-			$output = 'XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename);
-			if (strstr($wp_version,'ME')){
-				$output .= '(included WordPress ' . $wp_version . ')';
-			} else {
-				$output .= '(included WordPress ' . $wp_version . ')';
-			}
-		}
-	} else {
-		if ($xoops_config->is_wpmu) {
-			$output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>';
-			$output .= '(included <a href="http://mu.wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress MU ' . $wpmu_version . '</a>)';
+			$output .= '(included WordPress ' . $wp_version . ')';
+		}
+	} else {
+		$output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>';
+		if (strstr($wp_version,'ME')){
+			$output .= '(included <a href="http://wpme.sourceforge.jp/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)';
 		} else {
-			$output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>';
-			if (strstr($wp_version,'ME')){
-				$output .= '(included <a href="http://wpme.sourceforge.jp/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)';
-			} else {
-				$output .= '(included <a href="http://wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)';
-			}
+			$output .= '(included <a href="http://wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)';
 		}
 	}		
@@ -664,5 +649,5 @@
 function xpress_post_new_link($args ='')
 {
-	global $xoops_config;
+	global $modInfo;
 	
 	$defaults = array(
@@ -846,5 +831,5 @@
 
 function xpress_get_calendar($args = '') {
-	global $wpdb, $m, $monthnum, $year, $wp_locale, $posts , $xoops_config;
+	global $wpdb, $m, $monthnum, $year, $wp_locale, $posts , $modInfo;
 
 	$defaults = array(
@@ -1035,5 +1020,5 @@
 
 function xpress_create_new_blog_link($args ='' ) {
-	global $xoops_config;
+	global $modInfo;
 
 	global $current_user;
@@ -1058,5 +1043,5 @@
 
 function xpress_create_new_blog() {
-	global $xoops_config;
+	global $modInfo;
 	global $current_user;
 	$ret = array();
@@ -1070,5 +1055,5 @@
 			case 'all':
 			case 'blog':
-				$ret['url'] = $xoops_config->module_url . '/wp-signup.php';
+				$ret['url'] = $modInfo->get_module_url() . '/wp-signup.php';
 				$ret['menu_url'] = 'wp-signup.php';
 				$ret['title'] = __('Create New Blog','xpressme');
@@ -1083,5 +1068,5 @@
 }
 function xpress_primary_blog_link() {
-	global $xoops_config;
+	global $modInfo;
 	global $current_user;
 	global $blog_id;
Index: branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php	(revision 748)
+++ branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php	(revision 757)
@@ -524,10 +524,10 @@
 //  The content is reflected in the D3Forum comment when there is a change in the WordPress comment. 
 function wp_comment_sync_to_d3forum($comment_ID = 0,$sync_mode){
-	global $xpress_config,$xoops_db,$xoops_config,$wpdb,$blog_id;
+	global $xpress_config,$xoops_db,$modInfo,$wpdb,$blog_id;
 	
 	if (empty($blog_id)) $blog_id =1;
 	
 	if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. ');
-	$mydirname = $xoops_config->module_name;
+	$mydirname = $modInfo->get_module_dirname();
 
 	$d3f_forum_id = $xpress_config->d3forum_forum_id;
Index: branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp_old.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp_old.php	(revision 748)
+++ branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp_old.php	(revision 757)
@@ -1,5 +1,5 @@
 <?php
 // wp_login override for wp2.3 under
-if ( !function_exists('wp_login') && version_compare($xoops_config->wp_version,'2.3', '<')) :
+if ( !function_exists('wp_login') && version_compare($modInfo->get_wp_version(),'2.3', '<')) :
 	function wp_login($username, $password, $already_md5 = false) {
 		global $wpdb, $error;
@@ -43,5 +43,5 @@
 
 // Under WP2.1
-if (version_compare($xoops_config->wp_version,'2.1', '<')) :
+if (version_compare($modInfo->get_wp_version(),'2.1', '<')) :
 	// ADD WP 2.1.0
 	function the_modified_date($d = '') {
@@ -60,5 +60,5 @@
 
 // Under WP2.2
-if (version_compare($xoops_config->wp_version,'2.2', '<')):
+if (version_compare($modInfo->get_wp_version(),'2.2', '<')):
 	// Added WP2.2 wp_parse_args()
 	function wp_parse_args( $args, $defaults = '' ) {
@@ -95,5 +95,5 @@
 
 // Under WP2.2.1
-if (version_compare($xoops_config->wp_version,'2.2.1', '<')) :
+if (version_compare($modInfo->get_wp_version(),'2.2.1', '<')) :
 	// Added WP2.2.1 wp_parse_str()
 	function wp_parse_str( $string, &$array ) {
@@ -107,5 +107,5 @@
 
 // Under WP2.3
-if (version_compare($xoops_config->wp_version,'2.3', '<')) :
+if (version_compare($modInfo->get_wp_version(),'2.3', '<')) :
 	if ( !function_exists('wp_sanitize_redirect') ) :
 	/**
@@ -167,5 +167,5 @@
 
 // Under WP2.5
-if (version_compare($xoops_config->wp_version,'2.5', '<')) :
+if (version_compare($modInfo->get_wp_version(),'2.5', '<')) :
 	// Added WP2.5 absint()
 	function absint( $maybeint ) {
@@ -192,5 +192,5 @@
 
 // Under WP2.7
-if (version_compare($xoops_config->wp_version,'2.6', '<')) :
+if (version_compare($modInfo->get_wp_version(),'2.6', '<')) :
 	/**
 	 * Guess the URL for the site.
@@ -215,5 +215,5 @@
 
 // Under WP2.7
-if (version_compare($xoops_config->wp_version,'2.7', '<')) :
+if (version_compare($modInfo->get_wp_version(),'2.7', '<')) :
 	// Added WP2.7 separate_comments()
 	function &separate_comments(&$comments) {
@@ -346,5 +346,5 @@
 
 // Under WP2.8
-if (version_compare($xoops_config->wp_version,'2.8', '<')) :
+if (version_compare($modInfo->get_wp_version(),'2.8', '<')) :
 	function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
 		$string = (string) $string;
Index: branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/notify_functions.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/notify_functions.php	(revision 748)
+++ branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/notify_functions.php	(revision 757)
@@ -37,5 +37,5 @@
 function Notification_triggerEvent($force_reserve = false,$category, $item_id, $event, $extra_tags=array(), $user_list=array(), $omit_user_id=null)
 {
-	global $xoops_db,$xoops_config;
+	global $xoops_db,$modInfo;
 	global $xoopsModule,$xoopsUser,$xoopsUserIsAdmin;
 
@@ -52,10 +52,4 @@
 		$_SERVER['REQUEST_METHOD'] = 'POST';
 	}
-//	set_error_handler("xpress_error_handler");
-//	if ($xoops_config->is_impress != true){  // impress cms is error
-//		if ( !defined("XOOPS_MAINFILE_INCLUDED")) {
-//			require_once $xoops_config->xoops_mainfile_path;	// load XOOPS System
-//		}
-//	}
 	if (!$force_reserve && defined("XOOPS_MAINFILE_INCLUDED") ) {
 		if ( defined("XPRESS_EVENT_DEBUG")) xpress_debug_message($message = 'call $notification_handler->triggerEvent');
@@ -85,5 +79,5 @@
 function do_CommentNotifications($commentID, $comment_post_ID)
 {
-	global $wpdb, $xoops_config , $xoops_db;
+	global $wpdb, $modInfo , $xoops_db;
 
 	$table_term_relationships = $wpdb->term_relationships;
@@ -139,5 +133,5 @@
 function do_PostNotifications($post_id,$not_event)
 {
-	global $wpdb, $xoops_config, $xoops_db;
+	global $wpdb, $modInfo, $xoops_db;
 
 	 // $not_event:		newpost,editpost ; $commentID, $comment_post_ID)
Index: branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php	(revision 748)
+++ branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/pluggable-override.php	(revision 757)
@@ -160,5 +160,5 @@
 function wp_check_password($password, $hash, $user_id = '') {
 	global $wp_hasher;
-	global $xoops_config,$xoops_db;
+	global $modInfo,$wpConfigInfo,$xoops_db;
 
 	// For attestation when password has been sent as hash value. (When having logged it in from Xoops and ImpressCMS)
@@ -174,9 +174,9 @@
 	
 	// Password authentication for ImpressCMS 
-	if($xoops_config->is_impress && function_exists('hash')){
-		$mainSalt = $xoops_config->xoops_db_salt;
+	if($modInfo->is_impress_cms() && function_exists('hash')){
+		$mainSalt = $wpConfigInfo->get_db_salt();
 		// get user salt
-		$xpress_user_db = $xoops_config->module_db_prefix . 'users';
-		$xoops_user_db = $xoops_config->xoops_db_prefix . '_users';
+		$xpress_user_db = $wpConfigInfo->get_db_prefix() . 'users';
+		$xoops_user_db = $wpConfigInfo->get_xoops_db_prefix() . 'users';
 		$login_name = $xoops_db->get_var("SELECT user_login FROM $xpress_user_db WHERE ID = $user_id");
 		$user_salt = $xoops_db->get_var("SELECT salt FROM $xoops_user_db WHERE uname = '$login_name'");
@@ -236,9 +236,9 @@
 if ( !function_exists('wp_redirect') ) :
 function wp_redirect($location, $status = 302) {
-	global $is_IIS,$xoops_config,$action;
+	global $is_IIS,$modInfo,$action;
 	
-	if ($location == 'wp-login.php?loggedout=true') $location = $xoops_config->xoops_url.'/user.php?op=logout'; //xoops logout at wp logout
-	if ($location == 'wp-login.php?action=register') $location = $xoops_config->xoops_url."/register.php";  //wp-register to xoops register
-	if ($action == 'logout') $location = $xoops_config->xoops_url.'/user.php?op=logout'; //xoops logout at comment logout
+	if ($location == 'wp-login.php?loggedout=true') $location = $modInfo->get_xoops_url().'/user.php?op=logout'; //xoops logout at wp logout
+	if ($location == 'wp-login.php?action=register') $location = $modInfo->get_xoops_url()."/register.php";  //wp-register to xoops register
+	if ($action == 'logout') $location = $modInfo->get_xoops_url().'/user.php?op=logout'; //xoops logout at comment logout
 
 	$location = apply_filters('wp_redirect', $location, $status);
Index: branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 748)
+++ branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 757)
@@ -1,7 +1,7 @@
 <?php
-global $xoops_config;
-if (!is_object($xoops_config)){ // is call other modules
-	require_once dirname(dirname(dirname(dirname(dirname( __FILE__ ))))) .'/class/config_from_xoops.class.php' ;
-	$xoops_config = new ConfigFromXoops;
+global $modInfo;
+if (!is_object($modInfo)){ // is call other modules
+	require_once dirname(dirname(dirname(dirname(dirname( __FILE__ ))))) .'/class/modInfoClass.php' ;
+	$modInfo = new ConfigFromXoops;
 }
 
@@ -14,8 +14,9 @@
 	global $xoops_db;
 	
-	$modules_db = get_xoops_prefix() . 'modules';
+	$module_handler =& xoops_gethandler('module');
+	$module =& $module_handler->getByDirname($mydirname);
+	$moduleID = $module->getVar('mid');
+
 	$config_db = get_xoops_prefix() . 'config';
-
-	$moduleID = $xoops_db->get_var("SELECT mid FROM $modules_db WHERE dirname = '$module_dir'");
 	if (empty($moduleID)) return null;
 	$conf_value = $xoops_db->get_var("SELECT conf_value FROM $config_db WHERE (conf_modid = $moduleID) AND (conf_name = '$config_name')");
@@ -46,6 +47,6 @@
 function get_xoops_prefix()
 {
-	global $xoops_config;
-	$ret =$xoops_config->xoops_db_prefix . '_';
+	global $modInfo;
+	$ret = $modInfo->get_xoops_db_prefix();
 	return $ret;
 }
@@ -53,6 +54,6 @@
 function get_xoops_trust_path()
 {
-	global $xoops_config;
-	$ret =$xoops_config->xoops_trust_path;
+	global $modInfo;
+	$ret =$modInfo->get_xoops_trust_path();
 	return $ret;
 }
@@ -60,6 +61,6 @@
 function get_xoops_root_path()
 {
-	global $xoops_config;
-	$ret =$xoops_config->xoops_root_path;
+	global $modInfo;
+	$ret =$modInfo->get_xoops_root_path();
 	return $ret;
 }
@@ -72,6 +73,6 @@
 function get_xoops_url()
 {
-	global $xoops_config;
-	$ret =$xoops_config->xoops_url ;
+	global $modInfo;
+	$ret =$modInfo->get_xoops_url() ;
 	return $ret;
 }
@@ -79,6 +80,6 @@
 function get_xpress_url()
 {
-	global $xoops_config;
-	$ret =$xoops_config->module_url ;
+	global $modInfo;
+	$ret =$modInfo->get_module_url() ;
 	return $ret;
 }
@@ -86,10 +87,9 @@
 function get_xpress_modid()
 {
-	global $xoops_db;
-	
-	$modulename = get_xpress_dir_name();	
-	$sql = "SELECT mid FROM " . get_xoops_prefix() . "modules WHERE dirname = '$modulename'";
-	$mid = $xoops_db->get_var($sql);
-	return $mid;	
+	global $modInfo;
+	
+	$modulename = get_xpress_dir_name();
+	$mid = $modInfo->get_moduleID_ByDirname($modulename);
+	return $mid;
 }
 
@@ -369,6 +369,6 @@
 function get_block_file_path($mydirname,$file_name)
 {
-	global $xoops_config, $xpress_config;
-	$mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname;
+	global $modInfo, $xpress_config;
+	$mydirpath = $modInfo->get_xoops_root_path() . '/modules/' . $mydirname;
 	$select_theme = xpress_ThemeTemplate(get_xpress_theme_name($mydirname));
 	$xpress_default_theme = 'xpress_default';
Index: branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_upgrade.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_upgrade.php	(revision 748)
+++ branches/Ver3.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_upgrade.php	(revision 757)
@@ -6,7 +6,7 @@
 
 function list_xpress_update( $update=null ) {
-	global $xoops_config,$xpress_config;
-	
-	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
+	global $modInfo,$xpress_config;
+	
+	$xpress_version = $modInfo->get_module_full_version();
 	$lang = WPLANG;
 	
@@ -139,5 +139,5 @@
 
 function do_xpress_upgrade( $develop = false,$reinstall = false ) {
-	global $wp_filesystem,$xoops_config;
+	global $wp_filesystem,$modInfo;
 
 	if ( $reinstall )
@@ -191,5 +191,5 @@
 		show_message( __('Please update the module. ', 'xpressme') );
 		
-		$update_url = $xoops_config->module_url .'/admin/update.php';
+		$update_url = $modInfo->get_module_url() .'/admin/update.php';
 		show_message( '<strong>' . __('Actions:', 'xpressme') . '</strong> <a href="' . esc_url( $update_url ) . '">' . __('Go to Module Update', 'xpressme') . '</a>' );
 	}
@@ -216,8 +216,8 @@
 
 function xp_remote_get($url, $headers = ""){
-	global $xoops_config;
-	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
-
-	require_once( $xoops_config->module_path . '/wp-includes/class-snoopy.php');
+	global $modInfo;
+	$xpress_version = $modInfo->get_module_full_version();
+
+	require_once( $modInfo->get_module_path() . '/wp-includes/class-snoopy.php');
 
 	// Snoopy is an HTTP client in PHP
@@ -263,7 +263,7 @@
 function get_xpress_latest_version($check_url=null){
 	global $wp_version, $wpdb, $wp_local_package;
-	global $xoops_config;
-	
-	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
+	global $modInfo;
+	
+	$xpress_version = $modInfo->get_module_full_version();
 	$lang = WPLANG;
 	if(is_null($check_url))
@@ -362,8 +362,8 @@
 
 	global $wp_version, $wpdb, $wp_local_package;
-	global $xoops_config;
+	global $modInfo;
 
 	$php_query_string = $_SERVER['QUERY_STRING'];
-	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
+	$xpress_version = $modInfo->get_module_full_version();
 
 	$latest = get_option('xpressme_latest_version');
@@ -387,5 +387,5 @@
 		$latest_version=$latest['latest_version'];
 		$check_time=$latest['check_time'];
-		$upgrade_page = $xoops_config->module_url . "/wp-admin/admin.php?page=upgrade_page";
+		$upgrade_page = $modInfo->get_module_url() . "/wp-admin/admin.php?page=upgrade_page";
 
 		if (version_compare($xpress_version, $latest_version, '<')) {
