Index: trunk/xpressme_integration_kit/class/config_from_xoops.class.php
===================================================================
--- trunk/xpressme_integration_kit/class/config_from_xoops.class.php	(revision 356)
+++ trunk/xpressme_integration_kit/class/config_from_xoops.class.php	(revision 357)
@@ -62,7 +62,16 @@
     	$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;
+    	// 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')){ // loaded XOOPS mainfile.php
+    	}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.
