Index: branches/Ver2.1/extras/for_wordpress_mu/src/include/xpress_mu_function.php
===================================================================
--- branches/Ver2.1/extras/for_wordpress_mu/src/include/xpress_mu_function.php	(revision 374)
+++ branches/Ver2.1/extras/for_wordpress_mu/src/include/xpress_mu_function.php	(revision 398)
@@ -44,5 +44,5 @@
 		update_blog_option( 1, 'stylesheet', 'xpress_mu_home');
 		
-		mu_create_blog( $domain, $base, $weblog_title, $user_id, array( 'blog_public' => 1, 'public' => 1 ) );
+		mu_create_blog( $domain, $base, $weblog_title, $admin_user_id, array( 'blog_public' => 1, 'public' => 1 ) );
 }
 endif;
@@ -187,5 +187,5 @@
 if( ! function_exists( 'install_mu_blog_defaults' ) ) :
 function install_mu_blog_defaults($blog_id, $user_id) {
-	global $wpdb, $wp_rewrite, $current_site, $table_prefix;
+	global $wpdb, $wp_rewrite, $current_site, $table_prefix , $xoops_config;
 	if(!is_object($wp_rewrite)){
 		$wp_rewrite   =& new WP_Rewrite();
@@ -213,42 +213,75 @@
 	$first_post = str_replace( "SITE_URL", clean_url("http://" . $current_site->domain . $current_site->path), $first_post );
 	$first_post = str_replace( "SITE_NAME", $current_site->site_name, $first_post );
-	$wpdb->insert( $wpdb->posts, array(
-		'post_author' => $user_id, 
-		'post_date' => $now, 
-		'post_date_gmt' => $now_gmt,
-		'post_content' => stripslashes( $first_post ), 
-		'post_excerpt' => '', 
-		'post_title' => __('Hello world!'),
-		'post_category' => 0, 
-		'post_name' => __('hello-world'),
-		'post_modified' => $now,
-		'post_modified_gmt' => $now_gmt,
-		'comment_count' => 1
-	) );	
+
+	// insert First page &  First post
+	if (version_compare($xoops_config->wp_version,'2.8', '<')){
+		$wpdb->insert( $wpdb->posts, array(
+			'post_author' => $user_id, 
+			'post_date' => $now, 
+			'post_date_gmt' => $now_gmt,
+			'post_content' => stripslashes( $first_post ), 
+			'post_excerpt' => '', 
+			'post_title' => __('Hello world!'),
+			'post_category' => 0, 
+			'post_name' => __('hello-world'),
+			'post_modified' => $now,
+			'post_modified_gmt' => $now_gmt,
+			'comment_count' => 1
+		) );
+		$wpdb->insert( $wpdb->posts, array(
+			'post_author' => $user_id, 
+			'post_date' => $now, 
+			'post_date_gmt' => $now_gmt,
+			'post_content' => __('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'), 
+			'post_excerpt' => '', 
+			'post_title' => __('About'),
+			'post_category' => 0, 
+			'post_name' => __('about'),
+			'post_modified' => $now,
+			'post_modified_gmt' => $now_gmt,
+			'post_status' => 'publish',
+			'post_type' => 'page',
+			'to_ping' => '',
+			'pinged' => '',
+			'post_content_filtered' => ''
+		) );
+	}else {	
+		$wpdb->insert( $wpdb->posts, array(
+			'post_author' => $user_id, 
+			'post_date' => $now, 
+			'post_date_gmt' => $now_gmt,
+			'post_content' => stripslashes( $first_post ), 
+			'post_excerpt' => '', 
+			'post_title' => __('Hello world!'),
+			'post_name' => __('hello-world'),
+			'post_modified' => $now,
+			'post_modified_gmt' => $now_gmt,
+			'comment_count' => 1
+		) );	
+		$wpdb->insert( $wpdb->term_relationships, array('object_id' => 1, 'term_taxonomy_id' => 1));
+		update_option( "post_count", 1 );
+			$wpdb->insert( $wpdb->posts, array(
+			'post_author' => $user_id, 
+			'post_date' => $now, 
+			'post_date_gmt' => $now_gmt,
+			'post_content' => __('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'), 
+			'post_excerpt' => '', 
+			'post_title' => __('About'),
+			'post_name' => __('about'),
+			'post_modified' => $now,
+			'post_modified_gmt' => $now_gmt,
+			'post_status' => 'publish',
+			'post_type' => 'page',
+			'to_ping' => '',
+			'pinged' => '',
+			'post_content_filtered' => ''
+		) );
+	}
 	$wpdb->insert( $wpdb->term_relationships, array('object_id' => 1, 'term_taxonomy_id' => 1));
 	update_option( "post_count", 1 );
 
-	// First page
-	$wpdb->insert( $wpdb->posts, array(
-		'post_author' => $user_id, 
-		'post_date' => $now, 
-		'post_date_gmt' => $now_gmt,
-		'post_content' => __('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'), 
-		'post_excerpt' => '', 
-		'post_title' => __('About'),
-		'post_category' => 0, 
-		'post_name' => __('about'),
-		'post_modified' => $now,
-		'post_modified_gmt' => $now_gmt,
-		'post_status' => 'publish',
-		'post_type' => 'page',
-		'to_ping' => '',
-		'pinged' => '',
-		'post_content_filtered' => ''
-	) );
-	
 	// Flush rules to pick up the new page.
 	$wp_rewrite->init();
-	$wp_rewrite->flush_rules();
+	$wp_rewrite->flush_rules(false);
 
 	// Default comment
