Index: branches/Ver3.0/xpressme_integration_kit/include/add_xpress_config.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/add_xpress_config.php	(revision 755)
+++ branches/Ver3.0/xpressme_integration_kit/include/add_xpress_config.php	(revision 757)
@@ -20,15 +20,12 @@
 
 require_once dirname(dirname(dirname(dirname( __FILE__ )))).'/mainfile.php' ;
-require_once dirname( __FILE__ ).'/xoops3_define.php' ;
-get_xoops3_define();
 
 $_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' ;
-$xoops_config = new ConfigFromXoops;
-// TEST modInfo_class
+require_once dirname(dirname( __FILE__ )).'/class/wpConfigInfo_class.php' ;
+$wpConfigInfo = new wpConfigInfoClass;
 require_once dirname(dirname( __FILE__ )).'/class/modInfo_class.php' ;
-$mod_info = new modInfo;
+$modInfo = new modInfoClass;
 require_once dirname( __FILE__ ).'/set_cash_cookie_path.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 755)
+++ branches/Ver3.0/xpressme_integration_kit/include/add_xpress_process.php	(revision 757)
@@ -14,5 +14,5 @@
 }
 function safe_site_url(){
-	global $xoops_config,$blog_id,$blogname;
+	global $modInfo,$blog_id,$blogname;
 	
 	if (is_xpress_index_page_call()){
@@ -35,6 +35,6 @@
 		$siteurl = get_option('siteurl');
 		$home = get_option('home');
-		$module_url = $xoops_config->module_url;
-		$module_name = $xoops_config->module_name;
+		$module_url = $modInfo->get_module_url();
+		$module_name = $modInfo->get_module_name();
 		$schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
 		$guess_url = preg_replace('|/' . $module_name . '/.*|i', '/' . $module_name, $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
@@ -59,5 +59,5 @@
 		}
 		if ($site_url_error || $home_url_error){
-			include $xoops_config->xoops_root_path ."/header.php";
+			include $modInfo->get_xoops_header_path();
 			$form = '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n";
 			$form .= '<table cellspacing="1" cellpadding="1" border="0">';
@@ -94,5 +94,5 @@
 			$form .= '</form>' ."\n";
 			echo $form;
-			include $xoops_config->xoops_root_path . '/footer.php';
+			include $modInfo->get_xoops_footer_path();
 			exit();
 		}
@@ -103,7 +103,7 @@
 			$form .= '<input type="submit" value= "'.__('Permalink Settings').'" name="submit_redirect" />' ."\n";
 			$form .= '</form>' ."\n";
-			include $xoops_config->xoops_root_path ."/header.php";
+			include $modInfo->get_xoops_header_path();
 			echo $form;
-			include $xoops_config->xoops_root_path . '/footer.php';
+			include $modInfo->get_xoops_footer_path();
 			exit();
 		}
@@ -118,19 +118,10 @@
 	require_once( dirname( __FILE__ ).'/wp_check.php');
 	if (!is_wpdb_installed()){
-		include $xoops_config->xoops_root_path ."/header.php";
+		include $modInfo->get_xoops_header_path();
 		echo "<h2>Wordpress has not been installed yet. </h2>";
-		include $xoops_config->xoops_root_path . '/footer.php';
+		include $modInfo->get_xoops_footer_path();
 		exit();
 	}
 
-	//$_SERVER['REQUEST_METHOD'] = 'POST' is
-	//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.
@@ -161,5 +152,5 @@
 		xpress_pulugin_activation('xpressme/xpressme.php');
 		// reloaded 
-		header('Location: ' . $xoops_config->module_url . '/');
+		header('Location: ' . $modInfo->get_module_url() . '/');
 		
 		$err_str = "The activation of the XPressME plugin was executed.<br />\n";
@@ -172,8 +163,5 @@
 	ob_start();
 		$now_ob_level = ob_get_level();
-		if (version_compare($xoops_config->wp_version,'2.2', '<'))
-			require_once dirname( __FILE__ ).'/old_template-loader.php' ;
-		else
-			require_once( ABSPATH . WPINC . '/template-loader.php' );
+		require_once( ABSPATH . WPINC . '/template-loader.php' );
 		ob_end_flush_child($now_ob_level);
 		$wp_output = ob_get_contents();
@@ -202,9 +190,9 @@
 	// This Function in xpressme plugin
 	require_once( dirname( __FILE__ ).'/xpress_block_render.php' );	
-	xpress_unnecessary_block_cache_delete($xoops_config->module_name);
+	xpress_unnecessary_block_cache_delete($modInfo->get_module_dirname());
 	if (is_home()) {
-		xpress_block_cache_refresh($xoops_config->module_name);
+		xpress_block_cache_refresh($modInfo->get_module_dirname());
 		require_once( dirname( __FILE__ ).'/xpress_block_header.php' );	
-		set_xpress_block_header($xoops_config->module_name);
+		set_xpress_block_header($modInfo->get_module_dirname());
 	}
 	if ( ini_get( 'register_globals' ) )
@@ -213,6 +201,4 @@
 	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
 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/data.inc.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/data.inc.php	(revision 755)
+++ branches/Ver3.0/xpressme_integration_kit/include/data.inc.php	(revision 757)
@@ -31,13 +31,11 @@
 	global $xoopsDB;
 
+	$module_handler =& xoops_gethandler('module');
+	$module =& $module_handler->getByDirname($mydirname);
+	$module_id = $module->getVar('mid');
+	
 	$wp_prefix = preg_replace('/wordpress/','wp',$mydirname);
 	require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php');
 	include(XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/wp-includes/version.php');
-
-	$modules_table = $xoopsDB->prefix('modules');
-	$modSQL ="SELECT mid FROM " . $modules_table . " WHERE dirname LIKE '" . $mydirname . "'";
-	$modRes = $xoopsDB->query($modSQL, 0, 0);
-	$modRow = $xoopsDB->fetchArray($modRes);
-	$module_id = $modRow['mid'];
 
 	$table_config = $xoopsDB->prefix('config');
Index: branches/Ver3.0/xpressme_integration_kit/include/memory_limit.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/memory_limit.php	(revision 755)
+++ branches/Ver3.0/xpressme_integration_kit/include/memory_limit.php	(revision 757)
@@ -2,5 +2,4 @@
 	// Set XPressME memory limit
 	function xpress_set_memory_limmit(){
-		global $xoops_config;
 		global $xoopsDB,$xoopsModule,$xoopsModuleConfig;
 		
Index: branches/Ver3.0/xpressme_integration_kit/include/old_template-loader.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/old_template-loader.php	(revision 755)
+++ 	(revision )
@@ -1,67 +1,0 @@
-<?php
-if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
-	do_action('template_redirect');
-	if ( is_feed() ) {
-		include(ABSPATH . '/wp-feed.php');
-		return;
-	} else if ( is_trackback() ) {
-		include(ABSPATH . '/wp-trackback.php');
-		return;
-	} else if ( is_404() && $template = get_404_template() ) {
-		include($template);
-		return;
-	} else if ( is_search() && $template = get_search_template() ) {
-		include($template);
-		return;
-	} else if ( is_home() && $template = get_home_template() ) {
-		include($template);
-		return;
-	} else if ( is_attachment() && $template = get_attachment_template() ) {
-		include($template);
-		return;
-	} else if ( is_single() && $template = get_single_template() ) {
-		if ( is_attachment() )
-			add_filter('the_content', 'prepend_attachment');
-		include($template);
-		return;
-	} else if ( is_page() && $template = get_page_template() ) {
-		if ( is_attachment() )
-			add_filter('the_content', 'prepend_attachment');
-		include($template);
-		return;
-	} else if ( is_category() && $template = get_category_template()) {
-		include($template);
-		return;		
-	} else if ( is_author() && $template = get_author_template() ) {
-		include($template);
-		return;
-	} else if ( is_date() && $template = get_date_template() ) {
-		include($template);
-		return;
-	} else if ( is_archive() && $template = get_archive_template() ) {
-		include($template);
-		return;
-	} else if ( is_comments_popup() && $template = get_comments_popup_template() ) {
-		include($template);
-		return;
-	} else if ( is_paged() && $template = get_paged_template() ) {
-		include($template);
-		return;
-	} else if ( file_exists(TEMPLATEPATH . "/index.php") ) {
-		if ( is_attachment() )
-			add_filter('the_content', 'prepend_attachment');
-		include(TEMPLATEPATH . "/index.php");
-		return;
-	}
-} else {
-	// Process feeds and trackbacks even if not using themes.
-	if ( is_feed() ) {
-		include(ABSPATH . '/wp-feed.php');
-		return;
-	} else if ( is_trackback() ) {
-		include(ABSPATH . '/wp-trackback.php');
-		return;
-	}
-}
-
-?>
Index: branches/Ver3.0/xpressme_integration_kit/include/request_url.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/request_url.php	(revision 755)
+++ branches/Ver3.0/xpressme_integration_kit/include/request_url.php	(revision 757)
@@ -13,5 +13,5 @@
  */
 function check_page_call($check_file =''){
-	global $xoops_config;	// not object at install
+	global $modInfo;	// not object at install
 	if (empty($check_file)) return false;
 	$xpress_page = 	basename(dirname(dirname(__FILE__))) . '/' . $check_file;
Index: branches/Ver3.0/xpressme_integration_kit/include/set_cash_cookie_path.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/set_cash_cookie_path.php	(revision 755)
+++ branches/Ver3.0/xpressme_integration_kit/include/set_cash_cookie_path.php	(revision 757)
@@ -1,5 +1,5 @@
 <?php
-$modname= $xoops_config->module_name;
-$modurl = $xoops_config->module_url;
+$modname= $modInfo->get_module_dirname();
+$modurl = $modInfo->get_module_url();
 $hash = md5($modurl);
 /**
@@ -50,5 +50,5 @@
  */
 if ( !defined('COOKIEPATH') )
-	define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', $xoops_config->xoops_url . '/' ) );
+	define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', $modInfo->get_xoops_url() . '/' ) );
 
 /**
@@ -57,5 +57,5 @@
  */
 if ( !defined('SITECOOKIEPATH') )
-	define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', $xoops_config->xoops_url  . '/' ) );
+	define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', $modInfo->get_xoops_url()  . '/' ) );
 
 /**
Index: branches/Ver3.0/xpressme_integration_kit/include/wp_installer.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/wp_installer.php	(revision 755)
+++ branches/Ver3.0/xpressme_integration_kit/include/wp_installer.php	(revision 757)
@@ -46,5 +46,4 @@
 	//xpress
 	global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query,$wp_embed;
-	global $xoops_config;
 	$msgs = array();
 		
@@ -107,6 +106,6 @@
 	
 	// Rewrite Option for Xpress
-	$xoops_config_tbl = XOOPS_DB_PREFIX . '_config' ;
-	$sql = "SELECT conf_value FROM  $xoops_config_tbl WHERE `conf_name` = 'default_TZ'";
+	$xoops_conf_tbl = XOOPS_DB_PREFIX . '_config' ;
+	$sql = "SELECT conf_value FROM  $xoops_conf_tbl WHERE `conf_name` = 'default_TZ'";
 	$xoops_default_TZ = $wpdb->get_var($sql);
 	update_option('gmt_offset', $xoops_default_TZ);	
Index: branches/Ver3.0/xpressme_integration_kit/include/xpress_block_header.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/xpress_block_header.php	(revision 755)
+++ branches/Ver3.0/xpressme_integration_kit/include/xpress_block_header.php	(revision 757)
@@ -4,9 +4,9 @@
 	require_once dirname( __FILE__ ) .'/xml.php' ;
 	require_once dirname( __FILE__ ) .'/xpress_cache.php' ;
-	global $xoops_config;
+	global $mod_info;
 	
-	if (!is_object($xoops_config)){ // is call other modules
-		require_once dirname(dirname( __FILE__ )) .'/class/config_from_xoops.class.php' ;
-		$xoops_config = new ConfigFromXoops;
+	if (!is_object($mod_info)){ // is call other modules
+		require_once dirname(dirname( __FILE__ )) .'/class/modInfo_class.php' ;
+		$mod_info = new modInfoClass;
 	}
 	
@@ -46,12 +46,12 @@
 	function get_block_stylesheet_url($mydirname)
 	{
-		global $xoops_config;
-		$mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname;
+		global $mod_info;
+		$mydirpath = $mod_info->get_xoops_root_path() . '/modules/' . $mydirname;
 		$select_theme = get_xpress_theme_name($mydirname);
 		$style_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/blocks/block_style.css';
 		if (file_exists($style_file))
-			return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/' . $select_theme . '/blocks/block_style.css';
+			return $mod_info->get_xoops_url() . '/modules/' .$mydirname . '/wp-content/themes/' . $select_theme . '/blocks/block_style.css';
 		else	
-			return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/block_style.css';
+			return $mod_info->get_xoops_url() . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/block_style.css';
 	}
 
Index: branches/Ver3.0/xpressme_integration_kit/include/xpress_block_render.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/xpress_block_render.php	(revision 755)
+++ branches/Ver3.0/xpressme_integration_kit/include/xpress_block_render.php	(revision 757)
@@ -4,9 +4,9 @@
 	require_once dirname( __FILE__ ) .'/xml.php' ;
 	require_once dirname( __FILE__ ) .'/xpress_cache.php' ;
-	global $xoops_config;
-	
-	if (!is_object($xoops_config)){ // is call other modules
-		require_once 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( __FILE__ )) .'/class/modInfo_class.php' ;
+		$modInfo = new modInfoClass;
 	}
 	
@@ -68,13 +68,8 @@
 	{
 		global $xoopsDB;
-			$modules_tbl = $xoopsDB->prefix('modules');
-
-			$sql = "SELECT mid FROM $modules_tbl WHERE dirname = '$mydirname'";
-			$result =  $xoopsDB->query($sql, 0, 0);
-			if ($xoopsDB->getRowsNum($result)  > 0){
-				$row = $xoopsDB->fetchArray($result);
-				$mid = $row['mid'];
-			}
-			return $mid;
+		$module_handler =& xoops_gethandler('module');
+		$module =& $module_handler->getByDirname($mydirname);
+		$module_id = $module->getVar('mid');
+		return $module_id;
 	}
 
@@ -121,7 +116,7 @@
     function xpress_block_cache_found($mydirname,$block_name)
     {
-    	global $xoops_config;
+    	global $modInfo;
     	
-		$cache_dir = $xoops_config->xoops_cache_path . '/';
+		$cache_dir = $modInfo->get_xoops_cache_path() . '/';
     	$xml_name = $block_name . '.xml';
 
@@ -138,5 +133,5 @@
 	function xpress_block_render($mydirname,$block_function_name,$options)
 	{
-		global $wpdb,$xoops_config,$xoopsUserIsAdmin;
+		global $wpdb,$modInfo,$xoopsUserIsAdmin;
 		$func_file = $block_function_name;
 		$call_theme_function_name = str_replace(".php", "", $block_function_name);
@@ -183,7 +178,7 @@
 		
 		$tpl =& new XoopsTpl() ;
-		$tpl->template_dir = $xoops_config->module_path . '/templates';
+		$tpl->template_dir = $modInfo->get_module_templates_path();
 		if (!$tpl->template_exists($templates_file)){
-			$src_file_path = $xoops_config->module_path . '/templates/' .$mydirname. '_' . str_replace(".php", ".html", $block_function_name);
+			$src_file_path = $modInfo->get_module_templates_path() . '/' .$mydirname. '_' . str_replace(".php", ".html", $block_function_name);
 			$templates_file = add_xpress_tpl($mydirname,$templates_file,$src_file_path);
 		}
@@ -198,5 +193,5 @@
 	
 	function add_xpress_tpl($mydirname,$templates='',$src_file_path){
-		global $wpdb,$xoops_config , $xoops_db;
+		global $wpdb,$modInfo , $xoops_db;
 		
 		$mid = get_block_mid($mydirname);
@@ -210,5 +205,5 @@
 			$type = $temp_parm[0];
 		}
-		$temp_file_path = $xoops_config->module_path . '/templates/'. $filename;
+		$temp_file_path = $modInfo->get_module_templates_path() . '/'. $filename;
 		$pattern = '^' . $mydirname . '_';
 		if (preg_match('/' . $pattern . '/' , $filename, $match)){ // file prefix check
@@ -274,5 +269,5 @@
 	function xpress_unnecessary_block_cache_delete($mydirname)
 	{
-		global $xoops_db,$xoops_config;
+		global $xoops_db,$modInfo;
 		
 		$mid = get_xpress_modid();
@@ -289,5 +284,5 @@
 		$pattern = '(' . $pattern . ')';
 		
-		$cache_dir = $xoops_config->xoops_cache_path . '/';
+		$cache_dir = $modInfo->get_xoops_cache_path() . '/';
 		$cache_time = 0;
         if ($dh = opendir($cache_dir)) {
Index: branches/Ver3.0/xpressme_integration_kit/include/xpress_cache.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/xpress_cache.php	(revision 755)
+++ branches/Ver3.0/xpressme_integration_kit/include/xpress_cache.php	(revision 757)
@@ -4,6 +4,6 @@
 if(!function_exists("cache_is_writable")):
 	function cache_is_writable(){
-		global $xoops_config;
-		$cache_dir = $xoops_config->xoops_cache_path . '/';
+		global $modInfo;
+		$cache_dir = $modInfo->get_xoops_cache_path() . '/';
 		$filename = $cache_dir .'xpress_cache_test.txt';
 		$fp = @fopen($filename, "w");
@@ -30,7 +30,7 @@
     function xpress_cache_read($mydirname,$collation_key)
     {
-    	global $xoops_config;
+    	global $modInfo;
     	
-    	$cache_dir = $xoops_config->xoops_cache_path . '/';
+    	$cache_dir = $modInfo->get_xoops_cache_path() . '/';
         $filename = $cache_dir .$mydirname . '_' . $collation_key;
         if (xpress_cache_found($filename)) {
@@ -45,6 +45,6 @@
     function xpress_cache_write($mydirname,$collation_key,$content)
     {
-		global $xoops_config;
-		$cache_dir = $xoops_config->xoops_cache_path . '/';
+		global $modInfo;
+		$cache_dir = $modInfo->get_xoops_cache_path() . '/';
 		$cache_time = 0;
 
@@ -62,6 +62,6 @@
     function xpress_cache_clear($mydirname)
     {
-		global $xoops_config;
-		$cache_dir = $xoops_config->xoops_cache_path . '/';
+		global $modInfo;
+		$cache_dir = $modInfo->get_xoops_cache_path() . '/';
 		$cache_time = 0;
         if ($dh = opendir($cache_dir)) {
Index: branches/Ver3.0/xpressme_integration_kit/include/xpress_render.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/xpress_render.php	(revision 755)
+++ branches/Ver3.0/xpressme_integration_kit/include/xpress_render.php	(revision 757)
@@ -182,5 +182,5 @@
 //rendering for the module header and the body
 function xpress_render($contents){
-	global $xoops_config;
+	global $modInfo;
 	global $xoopsUser , $xoopsTpl,$xpress_config , $xoopsModule , $xoopsLogger, $xoopsConfig ; //for XOOPS
 	
@@ -190,5 +190,5 @@
 	xpress_remake_global_for_permlink();
 	$mydirname = basename(dirname(dirname(__FILE__)));
-	include $xoops_config->xoops_root_path ."/header.php";
+	include $modInfo->get_xoops_header_path();
 	$xoopsTpl->assign('xoops_breadcrumbs', $xoops_breadcrumbs);
 	$xoopsTpl->assign('xoops_module_header', get_xpress_module_header($contents));
@@ -265,5 +265,5 @@
 	//If notification_select.php is not executed in CMS other than XCL, the selector of in-line is not displayed. 
 	if (is_object($xoopsModule) && $xoopsModule->getVar('hasnotification') == 1 && is_object($xoopsUser)) {
-		require_once $xoops_config->xoops_root_path . '/include/notification_select.php';
+		require_once $modInfo->get_xoops_root_path() . '/include/notification_select.php';
 	}
 	
@@ -272,5 +272,5 @@
 	$xoopsTpl->clear_cache($templates_file);
 	echo $xoopsTpl->fetch( $templates_file ) ;
-	include $xoops_config->xoops_root_path . '/footer.php';
+	include $modInfo->get_xoops_footer_path();
 }
 
