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 732)
+++ /branches/Ver3.0/xpressme_integration_kit/class/config_from_xoops.class.php	(revision 733)
@@ -56,10 +56,4 @@
     }
     
-    function xpress_eval($str){
-    	$eval_str = '$ret = ' . $str . ' ;';
-    	eval($eval_str);
-    	return $ret;
-    }
-
     function ConfigFromXoops()	//for PHP4 constructor
     {  
@@ -76,33 +70,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;
-    	// end of /admin/index.php page detect
-    	
-    	if (file_exists($this->xp_config_file_path)){	// file exists xp-config.php
-    		$this->_get_value_by_xp_config_file();
-    	}else if (defined('XOOPS_MAINFILE_INCLUDED') && !$is_xoops_module_admin){ // loaded XOOPS mainfile.php
-    		$this->_get_value_by_xoops_define();
-    	} else {  // A set value is acquired from mainfile.php by the pattern match.
-			if(file_exists($this->xoops_mainfile_path)){
-    			$this->_get_value_by_xoops_mainfile();
-    			
-    			// Xoops2.5 secure.php 
-				if (!empty($this->xoops_var_path)){
-					$secure_path = $this->xoops_var_path . "/data/secure.php";
-    				if (file_exists($secure_path)){
-    					$this->_get_value_by_xoops_secure($secure_path);
-    				}
-				}
-
-    			// Value 'is_impress' and value 'external_define_path' used in the under
-    			// are set in _get_value_by_xoops_mainfile(). 
-				if ($this->is_impress){		// DB Config from Impress CMS impress_db_config file
-					$this->_get_value_by_impress_db_config_file();
-				} else if(!empty($this->external_define_path)){ // file exists mainfile.php in the trust pass.
-					$this->_get_value_by_trust_mainfile();
-				}
-			} // end of if file_exists
-			
-		}
-
+    	$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';
@@ -118,123 +84,4 @@
     }
 
-	// A set value is acquired from XOOPS mainfile.php by the pattern match.
-	function _get_value_by_xoops_mainfile(){
-		$array_file = file($this->xoops_mainfile_path);
-		$pattern = '^\s*define\s*\(\s*(\'[^\']+\'|"[^"]+")\s*,\s*([^\s]+.*)\s*\)\s*;';
-		$impress_include_pattern = '^\s*(include_once|include)\s*[\(\s]\s*XOOPS_TRUST_PATH\s*.\s*[\'"]([^\'"]+)[\'"]\s*[\)\s]\s*;';
-		$external_define_file_pattern = '^\s*(include_once|include|require_once|require_once)\s*\((.*mainfile\.php.*)\)';
-		for ($i = 0 ; $i <count($array_file) ; $i++){
-			if (preg_match('/' . $pattern . '/' ,$array_file[$i],$matchs)){
-				$keys = $matchs[1];
-				if (preg_match('/^\'[^\']*\'$/',$keys)) $keys = preg_replace('/\'/', '', $keys);
-				if (preg_match('/^"[^"]*"$/',$keys)) $keys = preg_replace('/"/', '', $keys);
-				$key_value = $matchs[2];
-
-				switch ($keys){
-					case  'XOOPS_ROOT_PATH':
-						$this->xoops_root_path = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_URL':
-						$this->xoops_url = $this->xpress_eval($key_value);
-						$this->module_url = $this->xoops_url . '/modules/' . $this->module_name;
-						break;
-					case  'XOOPS_PATH':
-						$this->xoops_path = $this->xpress_eval($key_value);						
-					case  'XOOPS_TRUST_PATH':
-						$this->xoops_trust_path = $this->xpress_eval($key_value);
-						if ($this->xoops_trust_path ==  'XOOPS_PATH')
-							$this->xoops_trust_path = $this->xoops_path;
-						break;
-					case  'XOOPS_DB_PREFIX':
-						$this->xoops_db_prefix = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_NAME':
-						$this->xoops_db_name = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_USER':
-						$this->xoops_db_user = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_PASS':
-						$this->xoops_db_pass = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_HOST':
-						$this->xoops_db_host = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_SALT':
-						$this->xoops_db_salt = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_SALT':
-						$this->xoops_salt = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_VAR_PATH':
-						$this->xoops_var_path = $this->xpress_eval($key_value);
-						break;
-					default :
-						
-				}	// end of switch
-			}	 // end of if preg_match
-			
-			// Check External Define File
-			if (preg_match('/' . $external_define_file_pattern . '/' ,$array_file[$i],$trust_main_matchs)){
-				$include_path = $this->xpress_eval($trust_main_matchs[2]);
-				if (file_exists($include_path))
-					$this->external_define_path = $include_path;
-			}
-			
-			// Check ImpressCMS
-			if (preg_match('/' . $impress_include_pattern . '/' ,$array_file[$i],$impres_matchs)){
-				$this->is_impress = true;
-				$this->impress_db_config_file = $this->xoops_trust_path . $impres_matchs[2];
-			}
-		} // end of for loop		
-	}
-	// A set value is acquired from XOOPS mainfile.php by the pattern match.
-	function _get_value_by_xoops_secure($secure_path){
-		$array_file = file($secure_path);
-		$pattern = '^\s*define\s*\(\s*(\'[^\']+\'|"[^"]+")\s*,\s*([^\s]+.*)\s*\)\s*;';
-		$impress_include_pattern = '^\s*(include_once|include)\s*\(\s*XOOPS_TRUST_PATH\s*.\s*[\'"]([^\'"]+)[\'"]\s*\)';
-		$external_define_file_pattern = '^\s*(include_once|include|require_once|require_once)\s*\((.*mainfile\.php.*)\)';
-		for ($i = 0 ; $i <count($array_file) ; $i++){
-			if (preg_match('/' . $pattern . '/' ,$array_file[$i],$matchs)){
-				$keys = $matchs[1];
-				if (preg_match('/^\'[^\']*\'$/',$keys)) $keys = preg_replace('/\'/', '', $keys);
-				if (preg_match('/^"[^"]*"$/',$keys)) $keys = preg_replace('/"/', '', $keys);
-				$key_value = $matchs[2];
-
-				switch ($keys){
-					case  'XOOPS_DB_PREFIX':
-						$this->xoops_db_prefix = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_NAME':
-						$this->xoops_db_name = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_USER':
-						$this->xoops_db_user = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_PASS':
-						$this->xoops_db_pass = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_HOST':
-						$this->xoops_db_host = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_SALT':
-						$this->xoops_db_salt = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_SALT':
-						$this->xoops_salt = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_CHARSET':
-						$this->xoops_db_charset = $this->xpress_eval($key_value);
-						break;
-					case  'XOOPS_DB_PCONNECT':
-						$this->xoops_db_pconnect = $this->xpress_eval($key_value);
-						break;
-					default :
-						
-				}	// end of switch
-			}	 // end of if preg_match
-			
-		} // end of for loop		
-	}
 	// A set value is acquired from XOOPS define value .
 	function _get_value_by_xoops_define(){
@@ -250,77 +97,4 @@
 		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 = '';
-	}
-	// A set value is acquired from xp-config.php .
-	function _get_value_by_xp_config_file(){
-	    require_once($this->xp_config_file_path);
-		$this->xoops_root_path =XP_XOOPS_ROOT_PATH;
-		$this->xoops_url = XP_XOOPS_URL;
-		$this->module_url = $this->xoops_url . '/modules/' . $this->module_name;
-		if(defined('XP_XOOPS_TRUST_PATH')) $this->xoops_trust_path = XP_XOOPS_TRUST_PATH; else $this->xoops_trust_path = '';
-		$this->xoops_db_prefix = XP_XOOPS_DB_PREFIX;
-		$this->xoops_db_name = XP_XOOPS_DB_NAME;
-		$this->xoops_db_user = XP_XOOPS_DB_USER;
-		$this->xoops_db_pass = XP_XOOPS_DB_PASS;
-		$this->xoops_db_host = XP_XOOPS_DB_HOST;
-		if(defined('XP_XOOPS_DB_SALT')) $this->xoops_db_salt = XP_XOOPS_DB_SALT; else $this->xoops_db_salt = '';
-		if(defined('XOOPS_SALT')) $this->xoops_salt = XP_XOOPS_SALT; else $this->xoops_salt = '';
-	}
-	
-	// A set value is acquired from config file in the trust pass by the pattern match.
-    function _get_value_by_impress_db_config_file(){
-		if(file_exists($this->impress_db_config_file)){
-			$array_file = file($this->impress_db_config_file);
-			$pattern = '^\s*define\s*\(\s*(\'[^\']+\'|"[^"]+")\s*,\s*(\'[^\']*\'|"[^"]*"|[^\'"])\s*\)\s*;';
-			for ($i = 0 ; $i <count($array_file) ; $i++){
-				if (preg_match('/' . $pattern . '/' ,$array_file[$i],$matchs)){
-					$keys = $matchs[1];
-					if (preg_match('/^\'[^\']*\'$/',$keys)) $keys = preg_replace('/\'/', '', $keys);
-					if (preg_match('/^"[^"]*"$/',$keys)) $keys = preg_replace('/"/', '', $keys);
-					$key_value = $matchs[2];
-
-					switch ($keys){
-						case  'SDATA_DB_SALT':
-							$this->xoops_db_salt = $this->xpress_eval($key_value);
-							break;
-						case  'SDATA_DB_PREFIX':
-							$this->xoops_db_prefix = $this->xpress_eval($key_value);
-							break;
-						case  'SDATA_DB_NAME':
-							$this->xoops_db_name = $this->xpress_eval($key_value);
-							break;
-						case  'SDATA_DB_USER':
-							$this->xoops_db_user = $this->xpress_eval($key_value);
-							break;
-						case  'SDATA_DB_PASS':
-							$this->xoops_db_pass = $this->xpress_eval($key_value);
-							break;
-						case  'SDATA_DB_HOST':
-							$this->xoops_db_host = $this->xpress_eval($key_value);
-							break;
-						default :
-							
-					}	// end of switch
-				}
-			} // end of for
-		} // end of if file_exists
-    }
-    
-    function _get_value_by_trust_mainfile(){
-		// When the definition is written in mainfile.php in the trust passing
-		if(file_exists($this->external_define_path)){
-			require_once($this->external_define_path);
-			
-			$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 = '';
-		} // end of if file_exists
 	}
 	
Index: /branches/Ver3.0/xpressme_integration_kit/include/add_xpress_config.php
===================================================================
--- /branches/Ver3.0/xpressme_integration_kit/include/add_xpress_config.php	(revision 732)
+++ /branches/Ver3.0/xpressme_integration_kit/include/add_xpress_config.php	(revision 733)
@@ -1,3 +1,15 @@
 <?php
+//load XOOPS
+$request_method =  (isset($_SERVER['REQUEST_METHOD'])) ? $_SERVER['REQUEST_METHOD'] : '';
+$_SERVER['REQUEST_METHOD'] = 'POST';  // The xoops data base is opened in the mode that can be written.  
+if ( defined('WP_ADMIN') )	
+	$php_script_name = $_SERVER['SCRIPT_NAME'];
+	if (strstr($php_script_name,'wp-admin/async-upload.php') !== false) {
+		
+	$xoopsOption['nocommon'] = 1; // The WP file uploading must work normally.  
+	}
+require_once dirname(dirname(dirname(dirname( __FILE__ )))).'/mainfile.php' ;
+$_SERVER['REQUEST_METHOD'] = $request_method; //It returns it to former data. 
+
 require_once dirname( __FILE__ ).'/xpress_debug_log.php' ;
 require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ;
Index: /branches/Ver3.0/xpressme_integration_kit/include/add_xpress_process.php
===================================================================
--- /branches/Ver3.0/xpressme_integration_kit/include/add_xpress_process.php	(revision 732)
+++ /branches/Ver3.0/xpressme_integration_kit/include/add_xpress_process.php	(revision 733)
@@ -121,8 +121,10 @@
 	//When notifying by a private message, Notification_reserve_send();
 	//it is evaded that the data base becomes read-only as a result of the check on the referrer and the method. 
+/*
 	$request_method =  (isset($_SERVER['REQUEST_METHOD'])) ? $_SERVER['REQUEST_METHOD'] : '';
 	$_SERVER['REQUEST_METHOD'] = 'POST';
 	require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php. 
 	$_SERVER['REQUEST_METHOD'] = $request_method;
+*/
 	xpress_set_memory_limmit(); // Set memory limmit.(Limmit Value from XPressMe modele config.)
 	unset($offset);		//This Trap is provides the case where $offset is defined on the XOOPS side.
@@ -205,6 +207,6 @@
 	exit();		// The return to wp-blog-header.php is stolen here
 }
-if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path;		// for Notification_triggerEvent
-if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path;	// for Notification_triggerEvent
+//if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path;		// for Notification_triggerEvent
+//if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path;	// for Notification_triggerEvent
 xpress_set_memory_limmit(); // Set memory limmit.(Limmit Value from XPressMe modele config.)
 require_once(ABSPATH.'wp-settings.php');
Index: /branches/Ver3.0/xpressme_integration_kit/include/oninstall.php
===================================================================
--- /branches/Ver3.0/xpressme_integration_kit/include/oninstall.php	(revision 732)
+++ /branches/Ver3.0/xpressme_integration_kit/include/oninstall.php	(revision 733)
@@ -49,5 +49,4 @@
 		
 	define("WP_INSTALLING", true);
-	define('WP_FIRST_INSTALL', true); // For WPMU2.8
 	
 	$site_url= XOOPS_URL."/modules/".$mydirname;
Index: anches/Ver3.0/xpressme_integration_kit/xp-config-sample.php
===================================================================
--- /branches/Ver3.0/xpressme_integration_kit/xp-config-sample.php	(revision 732)
+++ 	(revision )
@@ -1,61 +1,0 @@
-<?php
-/*
- *	This file is a sample of xp-config.php. 
- *	Please use xp-config.php when XPressME cannot acquire the data base connection information more automatically than XOOPS. 
- *
- *  Each definition sets the same value as the one set to mainfile.php of XOOPS.
- */
- 
- 
- if ( !defined("XPESS_MAINFILE_INCLUDED") ) {
-    define("XPESS_MAINFILE_INCLUDED",1);
-
-    // XOOPS Physical Path
-    // Physical path to your main XOOPS directory WITHOUT trailing slash
-    // Example: define('XP_XOOPS_ROOT_PATH', '/path/to/xoops/directory');
-    define('XP_XOOPS_ROOT_PATH', '');
-	
-    // XOOPS Trusted Path
-    // This is option. If you need this path, input value. The trusted path
-    // should be a safety directory which web browsers can't access directly.
-    define('XP_XOOPS_TRUST_PATH', '');
-
-    // XOOPS Virtual Path (URL)
-    // Virtual path to your main XOOPS directory WITHOUT trailing slash
-    // Example: define('XP_XOOPS_URL', 'http://url_to_xoops_directory');
-    define('XP_XOOPS_URL', 'http://');
-
-    // Database
-    // Choose the database to be used
-    define('XP_XOOPS_DB_TYPE', 'mysql');
-
-    // Table Prefix
-    // This prefix will be added to all new tables created to avoid name conflict in the database. If you are unsure, just use the default 'xoops'.
-    define('XP_XOOPS_DB_PREFIX', '');
-
-	// SALT
-	// This plays a supplementary role to generate secret code and token.
-    define('XP_XOOPS_SALT', '');
-
-    // Database Hostname
-    // Hostname of the database server. If you are unsure, 'localhost' works in most cases.
-    define('XP_XOOPS_DB_HOST', 'localhost');
-
-    // Database Username
-    // Your database user account on the host
-    define('XP_XOOPS_DB_USER', '');
-
-    // Database Password
-    // Password for your database user account
-    define('XP_XOOPS_DB_PASS', '');
-
-    // Database Name
-    // The name of database on the host. The installer will attempt to create the database if not exist
-    define('XP_XOOPS_DB_NAME', '');
-
-	// Password Salt Key $mainSalt
-	// This salt will be appended to passwords in the icms_encryptPass() function.
-	// Do NOT change this once your site is Live, doing so will invalidate everyones Password.
-	define( 'XP_XOOPS_DB_SALT', '' );
-}
-?>
