Index: trunk/xpressme_integration_kit/include/oninstall.php
===================================================================
--- trunk/xpressme_integration_kit/include/oninstall.php	(revision 848)
+++ trunk/xpressme_integration_kit/include/oninstall.php	(revision 852)
@@ -47,13 +47,13 @@
 	global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query,$wp_embed;
 	global $xoops_config;
-		
+
 	define("WP_INSTALLING", true);
 	define('WP_FIRST_INSTALL', true); // For WPMU2.8
-	
+
 	$site_url= XOOPS_URL."/modules/".$mydirname;
 	$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
 	$path = $mydirpath . '/';
 	$site_name = ucfirst($mydirname) . ' ' . _MI_XP2_NAME;
-	
+
 // permission and wordpress files check
 	require_once ($path . 'include/pre_check.php');
@@ -66,5 +66,5 @@
 		return false;
 	}
-	
+
 // install WordPress
 	if (file_exists($path . 'wp-load.php')) {
@@ -77,12 +77,12 @@
 	make_db_current_silent();
 	$ret[] = "The data base of wordpress was made by prefix $table_prefix.<br />";
-	
+
 	$option_desc = __('WordPress web address');
-	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'siteurl','$site_url', 'yes')");	
+	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'siteurl','$site_url', 'yes')");
 	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'home','$site_url', 'yes')");
 
 	populate_options();
 	populate_roles();
-	
+
 // create XPressME table
 	$xp_prefix = preg_replace('/wordpress/','wp',$mydirname);
@@ -104,5 +104,5 @@
 	dbDelta($views_queries);
 	$ret[] = "$views_table table of XPressME was made.<br />";
-	
+
 	$d3forum_link = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_d3forum_link' ;
 	$views_queries ="CREATE TABLE $d3forum_link (
@@ -116,5 +116,5 @@
 	dbDelta($views_queries);
 	$ret[] = "$d3forum_link table of XPressME was made.<br />";
-	
+
 	$group_role = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_group_role' ;
 	$views_queries ="CREATE TABLE $group_role (
@@ -130,5 +130,5 @@
 	dbDelta($views_queries);
 	$ret[] = "$group_role table of XPressME was made.<br />";
-	
+
 	$notify_reserve = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_notify_reserve' ;
 	$queries ="CREATE TABLE $notify_reserve (
@@ -143,5 +143,5 @@
   		omit_user_id varchar(20) NOT NULL default '' ,
   		KEY notify_reserve_id (notify_reserve_id)
-		)TYPE=MyISAM";
+		)$charset_collate;";
 	dbDelta($queries);
 	$ret[] = "$notify_reserve table of XPressME was made.<br />";
@@ -149,9 +149,9 @@
 	$sql = "INSERT INTO $group_role (groupid, role) VALUES (1, 'administrator')";
 	$wpdb->query($sql);
-	
+
 // make templates
 	include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/xpress_templates_make.php' ;
 	$t_mess = xpress_templates_make($mid,$mydirname);
-	
+
 // Admin User Data write
 	// Change uid field
@@ -160,7 +160,7 @@
 	$email = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("email"):'foo@exsample.com';
 	$pass_md5 = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("pass"):'';
-	
+
 	add_filter('sanitize_user', "sanitize_user_multibyte" ,10,3);
-	
+
 	if (!function_exists('username_exists')){
 		require_once($mydirpath . '/wp-includes/registration-functions.php');
@@ -177,12 +177,12 @@
 	$user->set_role('administrator');
 	'User ' . $user_name . ' of the administrator was made.';
-	// over write xoops md5 password 
+	// over write xoops md5 password
 	$sql = "UPDATE $wpdb->users SET user_pass ='$pass_md5' WHERE ID = $user_id";
 	$wpdb->query($sql);
 	$ret[] = 'The password of XOOPS was copied.<br />';
-	
-	
+
+
 // Set Default data
-	// make WordPress Default data	
+	// make WordPress Default data
 	if (function_exists('wp_install_defaults')){
 		wp_install_defaults($user_id);
@@ -190,12 +190,12 @@
 		wp_install_old_defaults($user_id);
 	}
-	
+
 	$ret[] = 'The first sample post & comment was written.<br />';
-	
+
 	// 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_default_TZ = $wpdb->get_var($sql);
-	update_option('gmt_offset', $xoops_default_TZ);	
+	update_option('gmt_offset', $xoops_default_TZ);
 
 	if (WPLANG == 'ja_EUC') {
@@ -208,5 +208,5 @@
 	update_option("blog_charset", $setup_charset);
 
-	update_option('blogname', $site_name );	
+	update_option('blogname', $site_name );
 	update_option('blogdescription', 'WordPress for XOOPS');
 	update_option("admin_email", $GLOBALS["xoopsConfig"]['adminmail']);
@@ -217,5 +217,5 @@
 	update_option('default_pingback_flag', 0);
 	$ret[] = 'The initial data was written in the data base of wordpress.<br />';
-	
+
 	update_option("template", "xpress_default");
 	update_option("stylesheet", "xpress_default");
@@ -223,5 +223,5 @@
 //	update_option('uploads_use_yearmonth_folders', 1);
 	update_option('upload_path', 'wp-content/uploads');
-			
+
 // activate the xpressme plugin
 	require_once dirname( __FILE__ ).'/xpress_active_plugin.php';
Index: trunk/xpressme_integration_kit/include/onupdate.php
===================================================================
--- trunk/xpressme_integration_kit/include/onupdate.php	(revision 848)
+++ trunk/xpressme_integration_kit/include/onupdate.php	(revision 852)
@@ -23,5 +23,5 @@
 	$db =& XoopsDatabaseFactory::getDatabaseConnection() ;
 	$mid = $module->getVar('mid') ;
-	
+
 
 
@@ -39,5 +39,5 @@
 	}
 
-//Site_url and home of an optional table are repaired. 
+//Site_url and home of an optional table are repaired.
 	$site_url= XOOPS_URL."/modules/".$mydirname;
 	xpress_put_siteurl($mydirname,$site_url);
@@ -61,9 +61,9 @@
 	$t_mess = xpress_clean_templates_file($mydirname,$mod_version);
 	$msgs = array_merge($msgs,$t_mess);
-	
+
 	$t_mess = xpress_templates_make($mid,$mydirname);
 	$msgs = array_merge($msgs,$t_mess);
 
-// The activation processing of the XPressME plugin is omitted. 
+// The activation processing of the XPressME plugin is omitted.
 // Because the XPressME plugin is done with wp-config in activation
 
@@ -73,5 +73,5 @@
 //		$msgs[] = 'The xpressme plug-in was activated.';
 //	}
-	
+
 	return true ;
 }
@@ -110,5 +110,5 @@
 
 		$sql = "SELECT option_value FROM $option_table WHERE option_name = '" . $option_name . "'";
-		
+
 		$result =  $xoopsDB->query($sql, 0, 0);
 		if ($xoopsDB->getRowsNum($result)  > 0){
@@ -163,5 +163,5 @@
 	}
 
-	switch ( $xoops_block_check->get_op() ) 
+	switch ( $xoops_block_check->get_op() )
 	{
 		case "remove_block":
@@ -194,5 +194,5 @@
   		post_views bigint(20) unsigned NOT NULL default '0',
   		KEY post_id (post_id)
-		) TYPE=MyISAM";
+		) ENGINE=MyISAM";
 		$db->queryF( $queries ) ;
 		$msgs[] = "$views_table table of XPressME was made.";
@@ -203,5 +203,5 @@
 			$msgs[] = "$views_table  ADD blog_id .";
 		}
-		
+
 		// The table is repaired.
 		$non_blogid_sql ="SELECT * FROM $views_table WHERE blog_id IS NULL OR blog_id < 1";
@@ -222,5 +222,5 @@
 		}
 	}
-	
+
 	$d3forum_link = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_d3forum_link' ;
 	if (! enhanced_table_check($mydirname,'d3forum_link')){
@@ -232,5 +232,5 @@
 			blog_id bigint(20) unsigned NOT NULL default '0',
 	  		KEY post_id (post_id)
-			)TYPE=MyISAM";
+			)ENGINE=MyISAM";
 		$db->queryF( $queries ) ;
 		$msgs[] = "$d3forum_link table of XPressME was made.";
@@ -265,5 +265,5 @@
 			login_all smallint(5) unsigned NOT NULL default '0' ,
 	  		KEY groupid (groupid)
-			)TYPE=MyISAM";
+			)ENGINE=MyISAM";
 		$db->queryF( $queries ) ;
 		$sql = "INSERT INTO $group_role (groupid, role) VALUES (1, 'administrator')";
@@ -280,5 +280,5 @@
 		$db->queryF( $update_sql ) ;
 	}
-	
+
 	if (! enhanced_table_check($mydirname,'notify_reserve')){
 		$notify_reserve = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_notify_reserve' ;
@@ -294,5 +294,5 @@
 	  		omit_user_id varchar(20) NOT NULL default '' ,
 	  		KEY notify_reserve_id (notify_reserve_id)
-			)TYPE=MyISAM";
+			)ENGINE=MyISAM";
 		$db->queryF( $queries ) ;
 		$msgs[] = "$notify_reserve table of XPressME was made.";
@@ -305,5 +305,5 @@
 function enhanced_table_check($mydirname,$table_name){
 		global $xoopsModule;
-		
+
 		$xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
 		$xpress_prefix = $xoopsDB->prefix(preg_replace('/wordpress/','wp',$mydirname) . '_');
