Index: branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php	(revision 451)
@@ -792,5 +792,5 @@
 
 	$week_begins = intval(get_option('start_of_week'));
-	$head_pattrn = '<thead>\s*<tr>\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*<\/tr>\s*<\/thead>';
+	$head_pattrn = '<thead>\s*<tr>\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*<\/tr>\s*<\/thead>';
 	if(preg_match('/'. $head_pattrn . '/s' ,$calendar,$head_match)){
 		$sun_index = 1 - $week_begins;
Index: branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 451)
@@ -365,3 +365,55 @@
 }
 
+function get_block_file_path($mydirname,$file_name)
+{
+	global $xoops_config, $xpress_config;
+	$mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname;
+	$select_theme = xpress_ThemeTemplate(get_xpress_theme_name($mydirname));
+	$xpress_default_theme = 'xpress_default';
+	$select_block = '/wp-content/themes/' . $select_theme . '/blocks/' . $file_name;
+	$default_block = '/wp-content/themes/xpress_default/blocks/' . $file_name;
+	$select_block_path = $mydirpath . $select_block;
+	$default_block_path =  $mydirpath . $default_block;
+
+	$block_file_data = array();
+	$block_file_data['file_path'] = $default_block_path;
+	$block_file_data['error'] = '';
+
+	if($select_theme != $xpress_default_theme){
+		if (file_exists($select_block_path)){
+			$select_block_version = get_block_version($select_block_path);
+			$default_block_version = get_block_version($default_block_path);
+			if (version_compare($select_block_version,$default_block_version, "<")){
+				$block_file_data['file_path'] = $default_block_path;
+				if ($xpress_config->is_block_error_display){
+					$error_str = '<div style="color:red">';
+					$error_str .= sprintf(__('Block file %1$s is an old version %2$s.<br />used block file %3$s of new version %4$s.','xpressme'),$select_block,$select_block_version,$default_block,$default_block_version);
+					$error_str .= '</div>';
+					$block_file_data['error'] = $error_str;
+				}
+			} else {
+				$block_file_data['file_path'] = $select_block_path;
+				$block_file_data['error'] = '';
+			}
+		}
+	}
+	return $block_file_data;
+}
+
+function get_block_version($file_path = ''){
+	$array_file = file($file_path);
+	$pattern = '^[\s|\/]*[B|b]lock\s+[V|v]ersion\s*[:|;]\s*([0-9|.]*)';
+	$version = '0.1';
+	if (empty($file_path)) return $version;
+	if (!file_exists($file_path)) return $version;
+	if (count($array_file) > 5) $file_count = 5; else $file_count = count($array_file);
+	for ($i = 0 ; $i < $file_count ; $i++){
+		if (preg_match('/' . $pattern . '/' ,$array_file[$i],$matchs)){
+			$version = $matchs[1];
+			break;
+		}
+	}
+	return $version;
+}
+
 ?>
Index: branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_upgrade.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_upgrade.php	(revision 451)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_upgrade.php	(revision 451)
@@ -0,0 +1,220 @@
+<?php
+function upgrade_page()
+{
+	global $xoops_config,$xpress_config;
+	
+	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
+	$lang = WPLANG;
+
+	$check_url = "http://ja.xpressme.info/version_check/index.php?version=$xpress_version&lang=$lang";
+
+	echo	'<div class="wrap">'."\n";
+	echo		'<div id="icon-options-general" class="icon32"><br /></div>'."\n";
+	echo		'<h2>' . __('XPressME Upgrade', 'xpressme') . "</h2><br>\n";
+	
+	if(get_xpress_latest_version()){
+		$latest = get_option('xpressme_latest_version');
+//print_r($latest);
+		if ($latest) {
+			$site_url=$latest['url'];
+			$package=$latest['package'];
+			$latest_version=$latest['latest_version'];
+			$check_time=$latest['check_time'];
+		}
+
+
+		if (version_compare($xpress_version, $latest_version, '>')){
+				echo '<h3 class="response">';
+				printf(__('You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.', 'xpressme') , $xpress_version , $latest['develop_url']);
+				echo '</h3>';
+
+		} else if (version_compare($xpress_version, $latest_version, '<')) {
+			echo	'<h3 class="response">'. __('There is a new version of XPressME Integration Kit available for upgrade', 'xpressme') . '</h3>';
+			echo '<p>';
+	//		printf(__('You can upgrade to version %s automatically or download the package and install it manually:'),$latest_version);
+			printf(__('You can upgrade to version %s download the package and install it manually:', 'xpressme'),$latest_version);
+			echo '</p>';
+			echo '<a class="button" href="' . $package . '">';
+			printf(__('Download %s', 'xpressme') , $latest_version);
+			echo '</a>';
+			
+			if ($latest['diff_response'] == 'diff_exists'){
+				echo '<p>';
+				printf(__('You can download the differential file from version %s to %s and upgrade it manually:', 'xpressme'),$xpress_version,$latest['diff_latest_version']);
+				echo '</p>';
+				echo '<a class="button" href="' . $latest['diff_package'] . '">';
+					printf(__('Download differential file for %s', 'xpressme') , $latest['diff_latest_version']);
+				echo '</a>';
+			}
+		} else {
+			echo	'<h3 class="response">'. __('You have the latest version of XPressME Integration Kit. You do not need to upgrade', 'xpressme') . '</h3>';
+		}
+		
+		if ($latest['develop_response'] == 'development_exists'
+			&& !empty($latest['develop_package'])
+			)
+		{
+			echo '<h3 class="response">';
+			printf(__('You can use the development version %s download the package and install it manually:', 'xpressme'),$latest['develop_latest_version']);
+			echo '</h3>';
+			echo '<a class="button" href="' . $latest['develop_package'] . '">';
+			printf(__('Download %s', 'xpressme') , $latest['develop_latest_version']);
+			echo '</a>';
+		}
+
+	} else {
+		echo '<h3 class="response">';
+		printf(__('There is no response from <a href="%s">version check API</a> now. sorry, please confirm it after.', 'xpressme'),$check_url);
+		echo	"</div>\n";
+	}
+}
+
+function xp_remote_get($url, $headers = ""){
+	global $xoops_config;
+	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
+
+	require_once( $xoops_config->module_path . '/wp-includes/class-snoopy.php');
+
+	// Snoopy is an HTTP client in PHP
+	$client = new Snoopy();
+	$client->agent = 'XPressME/' . $xpress_version;
+	$client->read_timeout = 2;
+	if (is_array($headers) ) {
+		$client->rawheaders = $headers;
+	}
+
+	@$client->fetch($url);
+	$response['response']['code'] = $client->status;
+	$response['body'] = $client->results;
+	return $response;
+	return $client;
+
+}
+
+function get_xpress_latest_version(){
+	global $wp_version, $wpdb, $wp_local_package;
+	global $xoops_config;
+	
+	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
+	$lang = WPLANG;
+
+	$check_url = "http://ja.xpressme.info/version_check/index.php?version=$xpress_version&lang=$lang";
+	$request_options = array(
+	'timeout' => 3,
+	'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
+	);
+
+	if (! function_exists('wp_remote_get')) {
+		$response = xp_remote_get($check_url);
+		
+		if (empty($response['body'])) return false;
+	} else {
+	
+		$response = wp_remote_get($check_url, $request_options);
+		
+		if ( is_wp_error( $response ) )
+			return false;
+	}
+	if ( 200 != $response['response']['code'] )
+		return false;
+	$body = trim( $response['body'] );
+	$body = str_replace(array("\r\n", "\r"), "\n", $body);
+	$returns = explode("\n", $body);
+
+	if ( isset( $returns[0] ) ) $response = $returns[0]; else $response = '';
+	if ( isset( $returns[1] ) ) $url = clean_url( $returns[1] ); else $url = '';
+	if ( isset( $returns[2] ) ) $package = clean_url( $returns[2] ); else $package = '';
+	if ( isset( $returns[3] ) ) $latest_version = $returns[3]; else  $latest_version = '';
+	if ( isset( $returns[4] ) ) $lang = $returns[4]; else $lang = '';
+	
+	// diff 
+	if ( isset( $returns[6] ) ) $diff_response = $returns[6]; else $diff_response = '';
+	if ( isset( $returns[7] ) ) $diff_url = clean_url( $returns[7] ); else $diff_url = '';
+	if ( isset( $returns[8] ) ) $diff_package = clean_url( $returns[8] ); else $diff_package = '';
+	if ( isset( $returns[9] ) ) $diff_latest_version = $returns[9]; else  $diff_latest_version = '';
+	if ( isset( $returns[10] ) ) $diff_lang = $returns[10]; else $diff_lang = '';
+
+	// developer 
+	if ( isset( $returns[12] ) ) $develop_response = $returns[12]; else $develop_response = '';
+	if ( isset( $returns[13] ) ) $develop_url = clean_url( $returns[13] ); else $develop_url = '';
+	if ( isset( $returns[14] ) ) $develop_package = clean_url( $returns[14] ); else $develop_package = '';
+	if ( isset( $returns[15] ) ) $develop_latest_version = $returns[15]; else  $develop_latest_version = '';
+	if ( isset( $returns[16] ) ) $develop_lang = $returns[16]; else $develop_lang = '';
+
+	$write_options = array (
+		'response' => $response ,
+		'url' => $url ,
+		'package' => $package ,
+		'latest_version' => $latest_version ,
+		'lang' => $lang ,
+		'diff_response' => $diff_response ,
+		'diff_url' => $diff_url ,
+		'diff_package' => $diff_package ,
+		'diff_latest_version' => $diff_latest_version ,
+		'diff_lang' => $diff_lang ,
+		'develop_response' => $develop_response ,
+		'develop_url' => $develop_url ,
+		'develop_package' => $develop_package ,
+		'develop_latest_version' => $develop_latest_version ,
+		'develop_lang' => $develop_lang ,
+		'check_time' => time()
+	);
+	
+	$latest_version = get_option('xpressme_latest_version');
+	if (!$latest_version) {
+		add_option('xpressme_latest_version', $write_options);
+	} else {
+		update_option('xpressme_latest_version', $write_options);
+	}
+	return true;
+}
+
+function xpress_update_check() {
+	if ( defined('WP_INSTALLING') )
+		return;
+	global $pagenow;
+
+	$php_query_string = $_SERVER['QUERY_STRING'];
+
+	if ( 'admin.php' == $pagenow && 'page=upgrade_page' == $php_query_string)
+		return;
+
+	global $wp_version, $wpdb, $wp_local_package;
+	global $xoops_config;
+
+	$php_query_string = $_SERVER['QUERY_STRING'];
+	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
+
+	$latest = get_option('xpressme_latest_version');
+	if (!$latest ) {
+		get_xpress_latest_version();
+		$latest = get_option('xpressme_latest_version');
+	}
+
+	if ($latest) {
+		$next_check = $latest['check_time'] + (60*60*24);
+		$now_time = time();
+		if ($next_check < $now_time ){
+			get_xpress_latest_version();
+			$latest = get_option('xpressme_latest_version');
+		}
+	}
+
+	if ($latest) {
+		$url=$latest['url'];
+		$package=$latest['package'];
+		$latest_version=$latest['latest_version'];
+		$check_time=$latest['check_time'];
+		$upgrade_page = $xoops_config->module_url . "/wp-admin/admin.php?page=upgrade_page";
+
+		if (version_compare($xpress_version, $latest_version, '<')) {
+			if ( current_user_can('manage_options') ){
+				$msg = sprintf( __('XPressME Integration Kit Version %1$s is available! <a href="%2$s">Please update now</a>.', 'xpressme'), $latest_version, $upgrade_page );
+			} else {
+				$msg = sprintf( __('XPressME Integration Kit Version %1$s is available! Please notify the site administrator.', 'xpressme'), $latest_version );
+			}
+			echo "<div id='update-nag'>$msg </div>";
+		}
+	}
+}
+?>
Index: branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 451)
@@ -8,6 +8,6 @@
 "Project-Id-Version: XPressME Plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-06 21:59+0900\n"
-"PO-Revision-Date: 2009-10-06 22:00+0900\n"
+"POT-Creation-Date: 2009-11-20 12:51+0900\n"
+"PO-Revision-Date: 2009-11-20 12:51+0900\n"
 "Last-Translator: toemon <info@toemon.com>\n"
 "Language-Team: toemon <info@toemon.com>\n"
@@ -23,438 +23,474 @@
 "X-Poedit-SearchPath-0: .\n"
 
-#: xpressme.php:33
+#: xpressme.php:59
 msgid "Display Settings"
 msgstr "表示設定"
 
-#: xpressme.php:34
+#: xpressme.php:60
 msgid "Integration Settings"
 msgstr "統合設定"
 
-#: xpressme.php:35
+#: xpressme.php:61
 msgid "Other Settings"
 msgstr "その他の設定"
 
-#: xpressme.php:37
+#: xpressme.php:63
 msgid "Upgrade"
 msgstr "アップグレード"
 
-#: xpressme.php:38
+#: xpressme.php:64
 msgid "to Modules Admin"
 msgstr "モジュール管理へ"
 
-#: xpressme.php:138
+#: xpressme.php:164
 msgid "XPressME Display Setting"
 msgstr "XPressME 表示設定"
 
-#: xpressme.php:144
+#: xpressme.php:170
 msgid "Thema Sidebar Display"
 msgstr "テーマ表示時にサイドバー表示する。"
 
-#: xpressme.php:145
-#: xpressme.php:235
-#: xpressme.php:241
-#: xpressme.php:246
-#: xpressme.php:252
-#: xpressme_class.php:283
-#: xpressme_class.php:299
-#: xpressme_class.php:431
-#: xpressme_class.php:442
+#: xpressme.php:171
+#: xpressme.php:263
+#: xpressme.php:269
+#: xpressme.php:274
+#: xpressme.php:280
+#: xpressme_class.php:296
+#: xpressme_class.php:314
+#: xpressme_class.php:445
+#: xpressme_class.php:456
 msgid "YES"
 msgstr "はい"
 
-#: xpressme.php:146
-#: xpressme.php:236
-#: xpressme.php:242
-#: xpressme.php:247
-#: xpressme.php:253
-#: xpressme_class.php:284
-#: xpressme_class.php:300
-#: xpressme_class.php:432
-#: xpressme_class.php:443
+#: xpressme.php:172
+#: xpressme.php:264
+#: xpressme.php:270
+#: xpressme.php:275
+#: xpressme.php:281
+#: xpressme_class.php:297
+#: xpressme_class.php:315
+#: xpressme_class.php:446
+#: xpressme_class.php:457
 msgid "NO"
 msgstr "いいえ"
 
-#: xpressme.php:155
-#: xpressme.php:204
-#: xpressme.php:258
+#: xpressme.php:181
+#: xpressme.php:232
+#: xpressme.php:291
 msgid "Update Config"
 msgstr "更新"
 
-#: xpressme.php:156
-#: xpressme.php:205
-#: xpressme.php:259
+#: xpressme.php:182
+#: xpressme.php:233
+#: xpressme.php:292
 msgid "Preset Config"
 msgstr "プリセット"
 
-#: xpressme.php:188
+#: xpressme.php:214
 msgid "XPressME Integration Setting"
 msgstr "XPressME 統合設定"
 
-#: xpressme.php:193
+#: xpressme.php:218
 msgid "Media Upload Base Path"
 msgstr "メディアアップロードのベースパス設定"
 
-#: xpressme.php:194
+#: xpressme.php:222
 msgid "Use XOOPS UPLOAD PATH"
 msgstr "XOOPSのアップロードパスを使用する。"
 
-#: xpressme.php:195
+#: xpressme.php:223
 msgid "USE WordPress BASE_PATH"
 msgstr "WordPressのベースパスを使用する。"
 
-#: xpressme.php:229
+#: xpressme.php:257
 msgid "XPressME Other Setting"
 msgstr "XPressME その他の設定"
 
-#: xpressme.php:234
+#: xpressme.php:262
 msgid "The change tracking of the post is preserved"
 msgstr "投稿の変更履歴を有効にする。"
 
-#: xpressme.php:240
+#: xpressme.php:268
 msgid "Select Multi user mode"
 msgstr "マルチユーザーモードを選択"
 
-#: xpressme.php:245
+#: xpressme.php:273
 msgid "Is the posts author views counted?"
 msgstr "投稿者の閲覧をカウントしますか？"
 
-#: xpressme.php:251
+#: xpressme.php:279
 msgid "Is SQL debugging window displayed?"
 msgstr "SQLデバッグウィンドを表示しますか？"
 
-#: xpressme.php:275
-msgid "XPressME Upgrade"
-msgstr "XPressME アップグレード"
-
-#: xpressme.php:289
-#, php-format
-msgid "You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href=\"%2$s\">stay updated</a>."
-msgstr "お使いの XPressME Integration Kit は開発版 (%1$s) です。すばらしい ! どうぞ<a href=\"%2$s\">最新版を使い続けてください</a>。"
-
-#: xpressme.php:293
-msgid "There is a new version of XPressME Integration Kit available for upgrade"
-msgstr "新しいバージョンの XPressME Integration Kit にアップグレードが可能です"
-
-#: xpressme.php:296
-#, php-format
-msgid "You can upgrade to version %s download the package and install it manually:"
-msgstr "バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。"
-
-#: xpressme.php:299
-#, php-format
-msgid "Download %s"
-msgstr "%s をダウンロード"
-
-#: xpressme.php:302
-msgid "You have the latest version of XPressME Integration Kit. You do not need to upgrade"
-msgstr "最新バージョンの XPressME Integration Kit をご利用中です。アップグレードの必要はありません。"
-
-#: xpressme.php:306
-#, php-format
-msgid "There is no response from <a href=\"%s\">version check API</a> now. sorry, please confirm it after."
-msgstr "現在、<a href=\"%s\">version check API</a>からのレスポンスがありません。　申し訳ありませんが、しばらく後で確認してください。"
-
-#: xpressme.php:425
-#, php-format
-msgid "XPressME Integration Kit Version %1$s is available! <a href=\"%2$s\">Please update now</a>."
-msgstr "XPressME Integration Kit Version %1$s が利用可能です ! <a href=\"%2$s\">アップデートしてください</a>。"
-
-#: xpressme.php:427
-#, php-format
-msgid "XPressME Integration Kit Version %1$s is available! Please notify the site administrator."
-msgstr "XPressME Integration Kit Version %1$s が利用可能です ! サイト管理者に連絡してください。"
-
-#: xpressme_class.php:55
-#: xpressme_class.php:232
+#: xpressme.php:284
+msgid "Select warning display of block file version check"
+msgstr "ブロックファイルのバージョンチェック時における警告表示"
+
+#: xpressme.php:285
+msgid "Do display"
+msgstr "表示する"
+
+#: xpressme.php:286
+msgid "Do not display"
+msgstr "表示しない"
+
+#: xpressme_class.php:61
+#: xpressme_class.php:243
 msgid "Older Post"
 msgstr "前の投稿へ"
 
-#: xpressme_class.php:56
-#: xpressme_class.php:235
+#: xpressme_class.php:62
+#: xpressme_class.php:246
 msgid "Newer Post"
 msgstr "次の投稿へ"
 
-#: xpressme_class.php:58
-#: xpressme_class.php:238
+#: xpressme_class.php:64
+#: xpressme_class.php:249
 msgid "Older Entries"
 msgstr "前ページへ"
 
-#: xpressme_class.php:59
-#: xpressme_class.php:241
+#: xpressme_class.php:65
+#: xpressme_class.php:252
 msgid "Newer Entries"
 msgstr "次ページへ"
 
-#: xpressme_class.php:73
-#: xpressme_class.php:74
-#: xpressme_class.php:244
+#: xpressme_class.php:79
+#: xpressme_class.php:80
+#: xpressme_class.php:255
 msgid "Read the rest of this entry &raquo;"
 msgstr "この投稿の続きを読む &raquo;"
 
-#: xpressme_class.php:342
+#: xpressme_class.php:356
 msgid "Single Post Navi Setting"
 msgstr "シングルポストナビの設定"
 
-#: xpressme_class.php:347
-#: xpressme_class.php:392
+#: xpressme_class.php:361
+#: xpressme_class.php:406
 msgid "Adjustment of Navi link display position"
 msgstr "リンクの表示位置設定"
 
-#: xpressme_class.php:350
+#: xpressme_class.php:364
 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right"
 msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示"
 
-#: xpressme_class.php:351
+#: xpressme_class.php:365
 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right"
 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示"
 
-#: xpressme_class.php:357
+#: xpressme_class.php:371
 msgid "Select Display name of PostNavi Link"
 msgstr "表示するリンクテキストを選択"
 
-#: xpressme_class.php:360
+#: xpressme_class.php:374
 msgid "Title of post"
 msgstr "投稿記事のタイトルを表示"
 
-#: xpressme_class.php:361
+#: xpressme_class.php:375
 msgid "Title of Navi"
 msgstr "ナビタイトルを表示"
 
-#: xpressme_class.php:367
+#: xpressme_class.php:381
 msgid "Display Navi Title of Old Post Link"
 msgstr "古い記事へのナビタイトルを設定"
 
-#: xpressme_class.php:374
+#: xpressme_class.php:388
 msgid "Display Navi Title of Newer Post Link"
 msgstr "より新しい記事へのナビタイトルを設定"
 
-#: xpressme_class.php:387
+#: xpressme_class.php:401
 msgid "Posts List Page Navi Setting"
 msgstr "ポストリストページナビの設定"
 
-#: xpressme_class.php:395
+#: xpressme_class.php:409
 msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right"
 msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示"
 
-#: xpressme_class.php:396
+#: xpressme_class.php:410
 msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right"
 msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示"
 
-#: xpressme_class.php:402
+#: xpressme_class.php:416
 msgid "Display Navi Title of Old Page Link"
 msgstr "古いページへのナビタイトルを設定"
 
-#: xpressme_class.php:409
+#: xpressme_class.php:423
 msgid "Display Navi Title of Newer Page Link"
 msgstr "より新しいページへのナビタイトルを設定"
 
-#: xpressme_class.php:422
+#: xpressme_class.php:436
 msgid "Dashboard feed Display Setting"
 msgstr "ダッシュボード　フィード表示設定"
 
-#: xpressme_class.php:428
+#: xpressme_class.php:442
 msgid "Display XPressMe Integration Kit Blog"
 msgstr "XPressME Integration Kit ブログを表示する。"
 
-#: xpressme_class.php:439
+#: xpressme_class.php:453
 msgid "Display XPressMe Integration Kit Forum"
 msgstr "XPressME Integration Kit フォーラムを表示する。"
 
-#: xpressme_class.php:456
+#: xpressme_class.php:471
 msgid "Role Setting at Login"
 msgstr "ログイン時の権限設定"
 
-#: xpressme_class.php:459
+#: xpressme_class.php:474
 msgid "XOOPS Groupe"
 msgstr "XOOPSグループ名"
 
-#: xpressme_class.php:459
+#: xpressme_class.php:474
 msgid "WordPress Role"
 msgstr "WordPressでの権限"
 
-#: xpressme_class.php:459
+#: xpressme_class.php:474
 msgid "Role is set at each login"
 msgstr "ログイン時、常に権限を更新する"
 
-#: xpressme_class.php:485
-#: xpressme_class.php:489
-#: xpressme_class.php:492
+#: xpressme_class.php:500
+#: xpressme_class.php:504
+#: xpressme_class.php:507
 msgid "Default Role of WordPress"
 msgstr "WordPressのデフォルト権限"
 
-#: xpressme_class.php:486
-#: xpressme_class.php:490
-#: xpressme_class.php:493
+#: xpressme_class.php:501
+#: xpressme_class.php:505
+#: xpressme_class.php:508
 msgid "Group User Doesn't Register"
 msgstr "ユーザ登録しない"
 
-#: xpressme_class.php:524
+#: xpressme_class.php:521
+msgid "Only the Admin can set Group Role Setting"
+msgstr "管理者だけがグループ権限を設定できます。"
+
+#: xpressme_class.php:541
 msgid "WordPress MU cannot integrate the comments."
 msgstr "WordPress MUはコメント統合できません。"
 
-#: xpressme_class.php:526
+#: xpressme_class.php:543
 msgid "Do Not Comment Integration."
 msgstr "コメント統合しません。"
 
-#: xpressme_class.php:561
+#: xpressme_class.php:578
 msgid "Comment integration with D3Forum"
 msgstr "D3Forumとのコメント統合"
 
-#: xpressme_class.php:563
+#: xpressme_class.php:580
 msgid "Select the forum of D3Forum that does the comment integration from the following lists."
 msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。"
 
-#: xpressme_class.php:568
+#: xpressme_class.php:585
 msgid "Select the Type of display of D3Forum comment."
 msgstr "D3Forumの表示タイプを選択"
 
-#: xpressme_class.php:570
-#: xpressme_class.php:573
+#: xpressme_class.php:587
+#: xpressme_class.php:590
 msgid "Flat"
 msgstr "フラット"
 
-#: xpressme_class.php:571
-#: xpressme_class.php:574
+#: xpressme_class.php:588
+#: xpressme_class.php:591
 msgid "Threaded"
 msgstr "スレッド"
 
-#: xpressme_class.php:577
+#: xpressme_class.php:594
 msgid "Select the order of display of D3Forum comment."
 msgstr "D3Forumコメントの表示順を選択"
 
-#: xpressme_class.php:579
-#: xpressme_class.php:582
+#: xpressme_class.php:596
+#: xpressme_class.php:599
 msgid "DESC"
 msgstr "降順"
 
-#: xpressme_class.php:580
-#: xpressme_class.php:583
+#: xpressme_class.php:597
+#: xpressme_class.php:600
 msgid "ASC"
 msgstr "昇順"
 
-#: xpressme_class.php:586
+#: xpressme_class.php:603
 msgid "Number of displays of D3Forum comments."
 msgstr "D3Forumのコメント表示数"
 
-#: xpressme_class.php:589
+#: xpressme_class.php:606
 msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. "
 msgstr "WordPressコメントとD3Forumポスト間の一括転送（エクスポート・インポート）"
 
-#: xpressme_class.php:590
+#: xpressme_class.php:607
 msgid "Export to D3Forum"
 msgstr "D3Forumへ一括エクスポート"
 
-#: xpressme_class.php:591
+#: xpressme_class.php:608
 msgid "Import from D3Forum"
 msgstr "D3Forumから一括インポート"
 
-#: xpressme_class.php:604
+#: xpressme_class.php:621
 msgid "Contents Excerpt Setting"
 msgstr "記事抜粋の設定"
 
-#: xpressme_class.php:609
+#: xpressme_class.php:626
 msgid "Is the excerpt display done with the archive of contents?"
 msgstr "記事のアーカイブで抜粋表示を行いますか？"
 
-#: xpressme_class.php:616
+#: xpressme_class.php:633
 msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. "
 msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。"
 
-#: xpressme_class.php:623
+#: xpressme_class.php:640
 msgid "Excerpt length of word for ASCII contents"
 msgstr "ASCIIコンテンツの抜粋単語数"
 
-#: xpressme_class.php:630
+#: xpressme_class.php:647
 msgid "Excerpt length of character for multibyte contents"
 msgstr "マルチバイトコンテンツの抜粋文字数"
 
-#: xpressme_class.php:637
+#: xpressme_class.php:654
 msgid "This text is displayed in the link that reads contents not excerpted.(Is not displayed for the blank.)"
 msgstr "抜粋されていないコンテンツを読むためのリンクに表示されるテキスト(空白の場合リンクを表示しません)"
 
-#: xpressme_class.php:644
+#: xpressme_class.php:661
 msgid "This text is displayed in the link that more tag (&lt;!--more--&gt;). "
 msgstr "more タグ (&lt;!--more--&gt;)のリンクに表示されるテキスト"
 
-#: xpressme_class.php:656
+#: xpressme_class.php:673
 msgid "Display Mode Setting"
 msgstr "表示モード設定"
 
-#: xpressme_class.php:659
+#: xpressme_class.php:676
 msgid "Select the XPressME Display Mode."
 msgstr "XPressMEの表示モードの選択"
 
-#: xpressme_class.php:664
+#: xpressme_class.php:681
 msgid "Xoops Mode"
 msgstr "XOOPSモード"
 
-#: xpressme_class.php:668
+#: xpressme_class.php:685
 msgid "WordPress Mode"
 msgstr "WordPressモード"
 
-#: xpressme_class.php:672
+#: xpressme_class.php:689
 msgid "User select"
 msgstr "ユーザによる選択"
 
-#: xpressme_class.php:677
+#: xpressme_class.php:694
 msgid "Select the theme used in the XOOPS Mode."
 msgstr "XOOPSモードで使用するテーマを選択"
 
-#: xpressme_class.php:682
+#: xpressme_class.php:699
 msgid "Use WordPress Selected Themes"
 msgstr "WordPressで選択したテーマを使う"
 
-#: xpressme_class.php:700
+#: xpressme_class.php:717
 msgid "Header Meta Option"
 msgstr "ヘッダメタ　オプション"
 
-#: xpressme_class.php:705
+#: xpressme_class.php:722
 msgid "Select the Header keyword."
 msgstr "ヘッダで使用するキーワードの選択"
 
-#: xpressme_class.php:710
+#: xpressme_class.php:727
 msgid "Xoops KeyWord"
 msgstr "XOOPSのキーワード"
 
-#: xpressme_class.php:713
+#: xpressme_class.php:730
 msgid "WordPress KeyWord"
 msgstr "WordPressのキーワード"
 
-#: xpressme_class.php:716
+#: xpressme_class.php:733
 msgid "WordPress & Xoops KeyWord"
 msgstr "WordPressｊとXOOPSのキーワード"
 
-#: xpressme_class.php:722
+#: xpressme_class.php:739
 msgid "Select the Header Description."
 msgstr "ヘッダで使用するディスクリプション（説明）の選択"
 
-#: xpressme_class.php:727
+#: xpressme_class.php:744
 msgid "Xoops Description"
 msgstr "XOOPSのディスクリプション"
 
-#: xpressme_class.php:730
+#: xpressme_class.php:747
 msgid "WordPress Description"
 msgstr "WordPressのディスクリプション"
 
-#: xpressme_class.php:733
+#: xpressme_class.php:750
 msgid "WordPress & Xoops Description"
 msgstr "WordPressとXOOPSのディスクリプション"
 
-#: xpressme_class.php:739
+#: xpressme_class.php:756
 msgid "Select the Header Robots Index."
 msgstr "ヘッダで使用するロボットインデックスの選択"
 
-#: xpressme_class.php:744
+#: xpressme_class.php:761
 msgid "Xoops Robots Index"
 msgstr "XOOPSのロボットインデックス"
 
-#: xpressme_class.php:747
+#: xpressme_class.php:764
 msgid "WordPress Robots Index"
 msgstr "WordPressのロボットインデックス"
 
-#: xpressme_class.php:776
+#: xpressme_class.php:793
 #, php-format
 msgid "Unable to create directory %s. Is its parent directory writable by the server?"
 msgstr "%s ディレクトリーが作成できません。サーバーの親ディレクトリー書き込み権限があるか確認くださいr?"
 
+#: xpressme_widget_class.php:17
+msgid "XPressME User Menu Widget"
+msgstr "XPressME ユーザメニュー ウィジェット"
+
+#: xpressme_widget_class.php:19
+msgid "XPressME MENU"
+msgstr "XPressME メニュー"
+
+#: xpressme_widget_class.php:143
+#: xpressme_widget_class.php:195
+#: xpressme_widget_class.php:200
+#: xpressme_widget_class.php:205
+msgid "Link"
+msgstr "リンク"
+
+#: xpressme_widget_class.php:144
+#: xpressme_widget_class.php:160
+msgid "Site Home"
+msgstr "サイトホーム"
+
+#: xpressme_widget_class.php:145
+#: xpressme_widget_class.php:165
+msgid "Add New"
+msgstr "新規投稿"
+
+#: xpressme_widget_class.php:146
+#: xpressme_widget_class.php:170
+msgid "User Profile"
+msgstr "ユーザプロファイル"
+
+#: xpressme_widget_class.php:147
+#: xpressme_widget_class.php:176
+msgid "WordPress Admin"
+msgstr "WordPress管理"
+
+#: xpressme_widget_class.php:148
+#: xpressme_widget_class.php:181
+msgid "Module Admin"
+msgstr "モジュール管理"
+
+#: xpressme_widget_class.php:149
+#: xpressme_widget_class.php:186
+msgid "XPressME Setting"
+msgstr "XPressME設定"
+
+#: xpressme_widget_class.php:150
+msgid "Display Mode Select"
+msgstr "表示モード選択"
+
+#: xpressme_widget_class.php:152
+#: xpressme_widget_class.php:171
+msgid "Auto Setting"
+msgstr "自動設定"
+
+#: xpressme_widget_class.php:157
+msgid "User Menu"
+msgstr "ユーザメニュー"
+
+#: xpressme_widget_class.php:245
+msgid "Title:"
+msgstr "タイトル:"
+
 #: include/custom_functions.php:74
 #, php-format
@@ -463,80 +499,80 @@
 
 #: include/custom_functions.php:429
-#: include/custom_functions.php:454
+#: include/custom_functions.php:459
 #, php-format
 msgid "views :%d"
 msgstr "閲覧数 :%d"
 
-#: include/custom_functions.php:608
+#: include/custom_functions.php:623
 msgid "Main"
 msgstr "メイン"
 
-#: include/custom_functions.php:611
+#: include/custom_functions.php:626
 #, php-format
 msgid "Archive for the &#8216;%s&#8217; Category"
 msgstr "カテゴリー &#8216;%s&#8217; のアーカイブ"
 
-#: include/custom_functions.php:614
+#: include/custom_functions.php:629
 #, php-format
 msgid "Posts Tagged &#8216;%s&#8217;"
 msgstr "&#8216;%s&#8217; タグのついている投稿"
 
-#: include/custom_functions.php:617
+#: include/custom_functions.php:632
 #, php-format
 msgid "Archive for %s|Daily archive page"
 msgstr "%sの日別アーカイブ"
 
-#: include/custom_functions.php:617
+#: include/custom_functions.php:632
 msgid "F jS, Y"
 msgstr "Y年n月j日"
 
-#: include/custom_functions.php:619
+#: include/custom_functions.php:634
 #, php-format
 msgid "Archive for %s|Monthly archive page"
 msgstr "%sの月別アーカイブ"
 
-#: include/custom_functions.php:619
+#: include/custom_functions.php:634
 msgid "F, Y"
 msgstr "Y年n月"
 
-#: include/custom_functions.php:621
+#: include/custom_functions.php:636
 #, php-format
 msgid "Archive for %s|Yearly archive page"
 msgstr "%sの年別アーカイブ "
 
-#: include/custom_functions.php:621
+#: include/custom_functions.php:636
 msgid "Y"
 msgstr "Y年"
 
-#: include/custom_functions.php:624
+#: include/custom_functions.php:639
 #, php-format
 msgid "Archive for the &#8216;%s&#8217; Author"
 msgstr "投稿者 &#8216;%s&#8217; のアーカイブ"
 
-#: include/custom_functions.php:627
+#: include/custom_functions.php:642
 #, php-format
 msgid "Search Results of word &#8216;%s&#8217;"
 msgstr "&#8216;%s&#8217; の検索結果"
 
-#: include/custom_functions.php:633
-#: include/custom_functions.php:635
+#: include/custom_functions.php:648
+#: include/custom_functions.php:650
 #, php-format
 msgid "Article of %s"
 msgstr "%sの記事"
 
-#: include/custom_functions.php:657
+#: include/custom_functions.php:672
 #, php-format
 msgid "From %1$s on site %2$s"
 msgstr "サイト %2$s の %1$s より"
 
-#: include/custom_functions.php:678
+#: include/custom_functions.php:693
 msgid "No Trackback/Pingback"
 msgstr "トラックバック・ピンバックはありません"
 
-#: include/custom_functions.php:679
+#: include/custom_functions.php:694
 msgid "One Trackback/Pingback"
 msgstr "トラックバック・ピンバック 1 件"
 
-#: include/custom_functions.php:680
+#: include/custom_functions.php:695
 msgid "% TrackBack/Pingback"
 msgstr "トラックバック・ピンバック % 件"
@@ -584,4 +620,71 @@
 msgstr "WordPressモードへ切替"
 
+#: include/xpress_common_functions.php:390
+#, php-format
+msgid "Block file %1$s is an old version %2$s.<br />used block file %3$s of new version %4$s."
+msgstr "ブロックファイル %1$s は古いバージョン %2$s の為、<br /> 新しいバージョン %4$s　のブロックファイル %3$s を使用します。"
+
+#: include/xpress_upgrade.php:13
+msgid "XPressME Upgrade"
+msgstr "XPressME アップグレード"
+
+#: include/xpress_upgrade.php:28
+#, php-format
+msgid "You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href=\"%2$s\">stay updated</a>."
+msgstr "お使いの XPressME Integration Kit は開発版 (%1$s) です。すばらしい ! どうぞ<a href=\"%2$s\">最新版を使い続けてください</a>。"
+
+#: include/xpress_upgrade.php:32
+msgid "There is a new version of XPressME Integration Kit available for upgrade"
+msgstr "新しいバージョンの XPressME Integration Kit にアップグレードが可能です"
+
+#: include/xpress_upgrade.php:35
+#, php-format
+msgid "You can upgrade to version %s download the package and install it manually:"
+msgstr "バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。"
+
+#: include/xpress_upgrade.php:38
+#: include/xpress_upgrade.php:61
+#, php-format
+msgid "Download %s"
+msgstr "%s をダウンロード"
+
+#: include/xpress_upgrade.php:43
+#, php-format
+msgid "You can download the differential file from version %s to %s and upgrade it manually:"
+msgstr "バージョン%sから%sへの差分ファイルをダウンロードし、手動でアップグレードすることができます："
+
+#: include/xpress_upgrade.php:46
+#, php-format
+msgid "Download differential file for %s"
+msgstr "%sの差分ファイルをダウンロード"
+
+#: include/xpress_upgrade.php:50
+msgid "You have the latest version of XPressME Integration Kit. You do not need to upgrade"
+msgstr "最新バージョンの XPressME Integration Kit をご利用中です。アップグレードの必要はありません。"
+
+#: include/xpress_upgrade.php:58
+#, php-format
+msgid "You can use the development version %s download the package and install it manually:"
+msgstr "開発バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。"
+
+#: include/xpress_upgrade.php:67
+#, php-format
+msgid "There is no response from <a href=\"%s\">version check API</a> now. sorry, please confirm it after."
+msgstr "現在、<a href=\"%s\">version check API</a>からのレスポンスがありません。　申し訳ありませんが、しばらく後で確認してください。"
+
+#: include/xpress_upgrade.php:212
+#, php-format
+msgid "XPressME Integration Kit Version %1$s is available! <a href=\"%2$s\">Please update now</a>."
+msgstr "XPressME Integration Kit Version %1$s が利用可能です ! <a href=\"%2$s\">アップデートしてください</a>。"
+
+#: include/xpress_upgrade.php:214
+#, php-format
+msgid "XPressME Integration Kit Version %1$s is available! Please notify the site administrator."
+msgstr "XPressME Integration Kit Version %1$s が利用可能です ! サイト管理者に連絡してください。"
+
+#~ msgid "Title"
+#~ msgstr "タイトル"
+#~ msgid "URL"
+#~ msgstr "URL"
 #~ msgid "more"
 #~ msgstr "続きを読む"
Index: branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 451)
@@ -22,4 +22,30 @@
 require_once dirname( __FILE__ ).'/include/functions_for_wp_old.php' ;
 
+if (!is_wordpress_style() && ( !empty($xpress_config->theme_select) || $xpress_config->theme_select != 'use_wordpress_select') ){
+	add_filter('stylesheet', 'xpress_Stylesheet');
+	add_filter('template', 'xpress_ThemeTemplate');
+}
+function xpress_Stylesheet($stylesheet) {
+	global $xpress_config;
+	$theme = $xpress_config->theme_select;
+    $theme = get_theme($theme);
+
+    if (empty($theme)) {
+        return $stylesheet;
+    }
+    return $theme['Stylesheet'];
+}
+
+function xpress_ThemeTemplate($template) {
+	global $xpress_config;
+	$theme = $xpress_config->theme_select;
+    $theme = get_theme($theme);
+
+    if (empty($theme)) {
+        return $template;
+    }
+    return $theme['Template'];
+}
+
 function my_plugin_menu()
 {
@@ -190,12 +216,14 @@
 		echo		'<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n" ;
 		echo			'<table class="form-table">'."\n";
+		$upload_title = __('Media Upload Base Path','xpressme');
+		if($xoops_config->is_wpmu) $upload_title = $upload_title . '(WPMU is not select)';
 		echo				$xpress_config->yes_no_radio_option('is_use_xoops_upload_path',
-												__('Media Upload Base Path','xpressme'),
+												$upload_title,
 												__('Use XOOPS UPLOAD PATH','xpressme'),
-												__('USE WordPress BASE_PATH','xpressme')
-												);
-		
-		echo				$xpress_config->groupe_role_option();		
-		
+												__('USE WordPress BASE_PATH','xpressme'),
+												$xoops_config->is_wpmu
+												);
+		$lock = ($xoops_config->module_url != get_bloginfo('url'));
+		echo				$xpress_config->groupe_role_option($lock);	
 		echo				$xpress_config->d3forum_option($do_message);		
 		echo			"</table>\n";
@@ -253,4 +281,9 @@
 												__('NO','xpressme')		
 												);
+		echo				$xpress_config->yes_no_radio_option('is_block_error_display',
+												__('Select warning display of block file version check','xpressme'),
+												__('Do display','xpressme'),
+												__('Do not display','xpressme')		
+												);
 		echo			"</table>\n";
 		
@@ -264,175 +297,10 @@
 }
 
-function upgrade_page()
-{
-	global $xoops_config,$xpress_config;
-	
-	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
-	$check_url = "http://ja1.xpressme.info/version_check/?version=$xpress_version";
-
-	echo	'<div class="wrap">'."\n";
-	echo		'<div id="icon-options-general" class="icon32"><br /></div>'."\n";
-	echo		'<h2>' . __('XPressME Upgrade', 'xpressme') . "</h2><br>\n";
-	
-	if(get_xpress_latest_version()){
-		$latest = get_option('xpressme_latest_version');
-		if ($latest) {
-			$site_url=$latest['url'];
-			$package=$latest['package'];
-			$latest_version=$latest['latest_version'];
-			$check_time=$latest['check_time'];
-		}
-
-
-		if (version_compare($xpress_version, $latest_version, '>')){
-				echo '<h3 class="response">';
-				printf(__('You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.', 'xpressme') , $xpress_version , $site_url);
-				echo '</h3>';
-
-		} else if (version_compare($xpress_version, $latest_version, '<')) {
-			echo	'<h3 class="response">'. __('There is a new version of XPressME Integration Kit available for upgrade', 'xpressme') . '</h3>';
-			echo '<p>';
-	//		printf(__('You can upgrade to version %s automatically or download the package and install it manually:'),$latest_version);
-			printf(__('You can upgrade to version %s download the package and install it manually:', 'xpressme'),$latest_version);
-			echo '</p>';
-			echo '<a class="button" href="' . $package . '">';
-			printf(__('Download %s', 'xpressme') , $latest_version);
-			echo '</a>';
-		} else {
-			echo	'<h3 class="response">'. __('You have the latest version of XPressME Integration Kit. You do not need to upgrade', 'xpressme') . '</h3>';
-		}
-	} else {
-		echo '<h3 class="response">';
-		printf(__('There is no response from <a href="%s">version check API</a> now. sorry, please confirm it after.', 'xpressme'),$check_url);
-		echo	"</div>\n";
-	}
-}
-
-function xp_remote_get($url, $headers = ""){
-	global $xoops_config;
-	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
-
-	require_once( $xoops_config->module_path . '/wp-includes/class-snoopy.php');
-
-	// Snoopy is an HTTP client in PHP
-	$client = new Snoopy();
-	$client->agent = 'XPressME/' . $xpress_version;
-	$client->read_timeout = 2;
-	if (is_array($headers) ) {
-		$client->rawheaders = $headers;
-	}
-
-	@$client->fetch($url);
-	$response['response']['code'] = $client->status;
-	$response['body'] = $client->results;
-	return $response;
-	return $client;
-
-}
-
-function get_xpress_latest_version(){
-	global $wp_version, $wpdb, $wp_local_package;
-	global $xoops_config;
-	
-	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
-
-	$check_url = "http://ja.xpressme.info/version_check/?version=$xpress_version";
-	$request_options = array(
-	'timeout' => 3,
-	'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
-	);
-
-	if (! function_exists('wp_remote_get')) {
-		$response = xp_remote_get($check_url);
-		
-		if (empty($response['body'])) return false;
-	} else {
-	
-		$response = wp_remote_get($check_url, $request_options);
-		
-		if ( is_wp_error( $response ) )
-			return false;
-	}
-	if ( 200 != $response['response']['code'] )
-		return false;
-	$body = trim( $response['body'] );
-	$body = str_replace(array("\r\n", "\r"), "\n", $body);
-	$returns = explode("\n", $body);
-	$response = $returns[0];
-	if ( isset( $returns[1] ) )
-		$url = clean_url( $returns[1] );
-	if ( isset( $returns[2] ) )
-		$package = clean_url( $returns[2] );
-	if ( isset( $returns[3] ) )
-		$latest_version = $returns[3];
-
-	$write_options = array (
-		'url' => $url ,
-		'package' => $package ,
-		'latest_version' => $latest_version ,
-		'check_time' => time()
-	);
-	
-	$latest_version = get_option('xpressme_latest_version');
-	if (!$latest_version) {
-		add_option('xpressme_latest_version', $write_options);
-	} else {
-		update_option('xpressme_latest_version', $write_options);
-	}
-	return true;
-}
-
-function xpress_update_check() {
-	if ( defined('WP_INSTALLING') )
-		return;
-	global $pagenow;
-
-	$php_query_string = $_SERVER['QUERY_STRING'];
-
-	if ( 'admin.php' == $pagenow && 'page=upgrade_page' == $php_query_string)
-		return;
-
-	global $wp_version, $wpdb, $wp_local_package;
-	global $xoops_config;
-
-	$php_query_string = $_SERVER['QUERY_STRING'];
-	$xpress_version = $xoops_config->module_version . $xoops_config->module_codename;
-
-	$latest = get_option('xpressme_latest_version');
-	if (!$latest ) {
-		get_xpress_latest_version();
-		$latest = get_option('xpressme_latest_version');
-	}
-
-	if ($latest) {
-		$next_check = $latest['check_time'] + (60*60*24);
-		$now_time = time();
-		if ($next_check < $now_time ){
-			get_xpress_latest_version();
-			$latest = get_option('xpressme_latest_version');
-		}
-	}
-
-	if ($latest) {
-		$url=$latest['url'];
-		$package=$latest['package'];
-		$latest_version=$latest['latest_version'];
-		$check_time=$latest['check_time'];
-		$upgrade_page = $xoops_config->module_url . "/wp-admin/admin.php?page=upgrade_page";
-
-		if (version_compare($xpress_version, $latest_version, '<')) {
-			if ( current_user_can('manage_options') ){
-				$msg = sprintf( __('XPressME Integration Kit Version %1$s is available! <a href="%2$s">Please update now</a>.', 'xpressme'), $latest_version, $upgrade_page );
-			} else {
-				$msg = sprintf( __('XPressME Integration Kit Version %1$s is available! Please notify the site administrator.', 'xpressme'), $latest_version );
-			}
-			echo "<div id='update-nag'>$msg </div>";
-		}
-	}
-}
-
+include_once dirname( __FILE__ ).'/include/xpress_upgrade.php' ;
 add_action( 'admin_notices', 'xpress_update_check', 3 );
 
 include_once dirname( __FILE__ ).'/include/dashboard_feed.php' ;
 
+include_once dirname( __FILE__ ).'/xpressme_widget_class.php' ;
+
 ?>
Index: branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php	(revision 451)
@@ -36,4 +36,5 @@
 	var $is_dashboard_forum_disp;
 	var $theme_select;
+	var $is_block_error_display;
 	//constructor
 	function XPressME_Class()
@@ -86,4 +87,5 @@
 		$this->is_dashboard_forum_disp = true;
 		$this->theme_select = 'use_wordpress_select';
+		$this->is_block_error_display = true;
 	}
 	
@@ -143,5 +145,6 @@
 			'is_dashboard_blog_disp' => $this->is_dashboard_blog_disp,
 			'is_dashboard_forum_disp' => $this->is_dashboard_forum_disp,
-			'theme_select' => $this->theme_select
+			'theme_select' => $this->theme_select,
+			'is_block_error_display' => $this->is_block_error_display
 		);
 		if ($mode == 'add_new') {
Index: branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_widget_class.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_widget_class.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_widget_class.php	(revision 451)
@@ -16,5 +16,5 @@
 	function XPress_Menu_Widget(){
 		$widget_ops = array('classname' => 'widget_xpress', 'description' => __( "XPressME User Menu Widget") );
-		$control_ops = array('width' => 400, 'height' => 300);
+		$control_ops = array('width' => 600, 'height' => 300);
 		$this->WP_Widget('XPress_Menu', __('XPressME MENU'), $widget_ops, $control_ops);
 	}
@@ -26,4 +26,5 @@
 	function widget($args, $instance){
 		global $xpress_config,$xoops_config;
+		global $current_user;
 
 		extract($args);
@@ -38,10 +39,66 @@
 
 		# Make the XPressME MENU widget
+		$menu = array();
+		for($i = 0; $i < 10; $i++) {
+			$menu[$i]['Type'] = $instance['Type_' . $i];
+			$menu[$i]['Title'] = $instance['Title_' . $i];
+			$menu[$i]['URL'] = $instance['URL_' . $i];
+			$menu[$i]['Visible'] = $instance['Visible_' . $i];
+			$menu[$i]['Weight'] = $instance['Weight_' . $i];
+		}			
 		echo '<ul>';
 		for($i = 0; $i < 10; $i++) {
-			$link_name = $instance['name' . $i];
-			$link_url = $instance['link' . $i];
-			if (!empty($link_name))	echo '<li><a href="' . $link_url . '">' . $link_name . '</a></li>';
+			$type = $menu[$i]['Type'];
+			if ($menu[$i]['Visible'] && !empty($menu[$i]['Title']) ){
+				switch($type){
+					case 0:
+					case 1:
+						echo '<li><a href="' . $menu[$i]['URL'] . '">' . $menu[$i]['Title'] . '</a></li>';
+						break;
+					case 2:	// Add New
+						if (is_user_logged_in()){
+							if ($current_user->user_level > 0){
+								if (xpress_is_wp_version('<','2.1') ){
+									echo '<li><a href="'.get_settings('siteurl').'/wp-admin/post.php" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>';
+								} else {
+									echo '<li><a href="'.get_settings('siteurl').'/wp-admin/post-new.php" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>';
+								}
+							}
+						}
+						break;
+					case 3: // User Profile
+						if (is_user_logged_in()) { 
+							echo '<li><a href="'.get_settings('siteurl').'/wp-admin/profile.php" title="' . $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>';
+						}
+						break;
+					case 4: // WordPress Admin
+						if (is_user_logged_in()){
+							if ($current_user->user_level > 7){
+								echo '<li><a href="'.get_settings('siteurl').'/wp-admin/" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>';
+							}
+						}
+						break;
+					case 5: // Module Admin
+						if($GLOBALS["xoopsUserIsAdmin"]){
+							echo '<li><a href="'.get_settings('siteurl').'/admin/index.php"  title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>';
+						}
+						break;
+					case 6: // XPressME Setting
+						if (is_user_logged_in()){
+							if ($current_user->user_level > 7){
+								echo '<li><a href="'.get_settings('siteurl').'/wp-admin/admin.php?page=xpressme\\xpressme.php" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>';
+							}
+						}
+						break;
+					case 7: // Display Mode Select
+						if ($xpress_config->viewer_type == 'user_select'){
+							echo disp_mode_set();
+						}
+						break;
+					default:
+				}
+			}
 		}
+
 		echo '</ul>';
 		# After the widget
@@ -58,6 +115,12 @@
 		
 		for($i = 0; $i < 10; $i++) {
-			$instance['name'. $i] = strip_tags(stripslashes($new_instance['name'. $i]));
-			$instance['link' . $i] = strip_tags(stripslashes($new_instance['link'. $i]));
+			$instance['Type_'. $i] = strip_tags(stripslashes($new_instance['Type_'. $i]));
+			$instance['Title_' . $i] = strip_tags(stripslashes($new_instance['Title_'. $i]));
+			if ($instance['Type_'. $i] < 2){
+				$instance['URL_' . $i] = strip_tags(stripslashes($new_instance['URL_'. $i]));
+			} else {
+				$instance['URL_' . $i] = '';
+			}
+			$instance['Visible_' . $i] = strip_tags(stripslashes($new_instance['Visible_'. $i]));
 		}
 
@@ -71,40 +134,167 @@
 	function form($instance){
 		global $xpress_config,$xoops_config;
+		
+		if (xpress_is_wp_version('<','2.1') ){
+			$addnew = get_settings('siteurl').'/wp-admin/post.php';
+		} else {
+			$addnew = get_settings('siteurl').'/wp-admin/post-new.php';
+		}
+		$type = array();
+		$type[0] = __('Link', 'xpressme');
+		$type[1] = __('Site Home', 'xpressme');
+		$type[2] = __('Add New', 'xpressme');
+		$type[3] = __('User Profile', 'xpressme');
+		$type[4] = __('WordPress Admin', 'xpressme');
+		$type[5] = __('Module Admin', 'xpressme');
+		$type[6] = __('XPressME Setting', 'xpressme');
+		$type[7] = __('Display Mode Select', 'xpressme');
+		
+		$auto_setting = __('Auto Setting', 'xpressme');
+		
 		//Defaults
 		$instance = wp_parse_args( (array) $instance, 
 		array(
-			'title'=> __('User Menu'),
-			'name0' => __('Site Home'),
-			'link0' => $xoops_config->xoops_url,
-			'name1' => '',
-			'link1' => '',
-			'name2' => '',
-			'link2' => '',
-			'name3' => '',
-			'link3' => '',
-			'name4' => '',
-			'link4' => '',
-			'name5' => '',
-			'link5' => '',
-			'name6' => '',
-			'link6' => '',
-			'name7' => '',
-			'link7' => '',
-			'name8' => '',
-			'link8' => '',
-			'name9' => '',
-			'link9' => ''
+			'title'=> __('User Menu', 'xpressme'),
+			
+			'Type_0' =>1 , 
+			'Title_0' => __('Site Home', 'xpressme'),
+			'URL_0' => get_xoops_url(),
+			'Visible_0' => 1,
+			
+			'Type_1' =>2 , 
+			'Title_1' => __('Add New', 'xpressme'),
+			'URL_1' => $auto_setting,
+			'Visible_1' => 1,
+				
+			'Type_2' =>3 , 
+			'Title_2' => __('User Profile', 'xpressme'),
+			'URL_2' => __('Auto Setting', 'xpressme'),
+			'Visible_2' => 1,
+				
+			'Weight_2' => 3,
+			'Type_3' =>4 , 
+			'Title_3' => __('WordPress Admin', 'xpressme'),
+			'URL_3' => $auto_setting,
+			'Visible_3' => 1,
+				
+			'Type_4' =>5 , 
+			'Title_4' => __('Module Admin', 'xpressme'),
+			'URL_4' => $auto_setting,
+			'Visible_4' => 1,
+				
+			'Type_5' =>6 , 
+			'Title_5' => __('XPressME Setting', 'xpressme'),
+			'URL_5' => $auto_setting,
+			'Visible_5' => 1,
+				
+			'Type_6' =>7 , 
+			'Title_6' => $auto_setting,
+			'URL_6' => $auto_setting,
+			'Visible_6' => 1,
+			'Type_7' =>0 , 
+			'Title_7' => __('Link', 'xpressme'),
+			'URL_7' => '',
+			'Visible_7' => 0,
+				
+			'Type_8' =>0 , 
+			'Title_8' => __('Link', 'xpressme'),
+			'URL_8' => '',
+			'Visible_8' => 0,
+				
+			'Type_9' =>0 , 
+			'Title_9' => __('Link', 'xpressme'),
+			'URL_9' => '',
+			'Visible_9' => 0,
 		) );
-
-		$title = htmlspecialchars($instance['title']);
+		
+		echo '
+		<script type="text/javascript">
+		    function TypeSelect(type_id,title_id,url_id){
+				var type=document.getElementById(type_id);
+				var title=document.getElementById(title_id);
+				var link_url=document.getElementById(url_id);
+				var auto_set = \''. $auto_setting .'\';
+				title.value = type[type.value].text;
+				if(type.value > 1){
+					link_url.value = auto_set;
+					link_url.disabled = true;
+					link_url.style.backgroundColor = \'transparent\';
+		        } else {
+		        	if (link_url.value == auto_set) link_url.value = \'\';
+					link_url.disabled = false;
+					link_url.style.backgroundColor = \'#FFFFEE\';
+				}
+		        if(type.value == 1){
+					link_url.value = \''.get_xoops_url() . '\';
+		        }
+				if(type.value == 7){
+					title.value = auto_set;
+					title.disabled = true;
+					title.style.backgroundColor = \'transparent\';
+		        } else {
+		        	if (title.value == auto_set) title.value = \'\';
+					title.disabled = false;
+					title.style.backgroundColor = \'#FFFFEE\';
+				}
+
+		    }
+		</script>';
 
 		// Output the options
 		echo '<p><label for="' . $this->get_field_name('title') . '">'. "\n";
-		echo __('Title:') . '<input style="width: 200px;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>'. "\n";
-		echo '<label>' . __('Title') . '</label>' . '<label style="margin-left:120px;">' . __('URL') . '</label>' . "\n";
+		echo __('Title:') . '<input style="width: 200px;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $instance['title'] . '" /></label></p>'. "\n";
+		echo "
+		    <table width='100%' class='outer' cellpadding='4' cellspacing='1' border=\"1\" bordercolor=\"#888888\">
+		    <tr valign='middle' align='center' style=\"background-color:#2E323B;color:#FFFFFF\">
+		    <th width='10%'>Type</th>
+		    <th width='15%'>Title</th>
+		    <th width='10%'>URL</th>
+		    <th width='10px'>Visible</th>
+			</tr>
+		";
 		for($i = 0; $i < 10; $i++) {
-		echo '<p><input style="width: 100px;" id="' . $this->get_field_id('name' . $i) . '" name="' . $this->get_field_name('name' . $i) . '" type="text" value="' . $instance['name'. $i] . '" />:'. "\n";
-		echo '<input style="width: 280px;" id="' . $this->get_field_id('link' . $i) . '" name="' . $this->get_field_name('link' . $i) . '" type="text" value="' . $instance['link'. $i] . '" /></p>'. "\n";
+			$even = $i % 2;
+			if ($even) {
+				$back_color = ' style="background-color:#E3E3E3"';
+			} else {
+				$back_color = ' style="background-color:#F5F5F5"';
+			}
+			$text_back_color = ' style="background-color:#FFFFEE"';
+			echo "<tr $back_color>";
+
+			$select_arg = "'" . $this->get_field_id('Type_' . $i) . "','" . $this->get_field_id('Title_' . $i) . "','" . $this->get_field_id('URL_' . $i) . "'";
+			echo '<th><select id="' . $this->get_field_id('Type_' . $i) . '" name="' . $this->get_field_name('Type_' . $i) . '" ' .$back_color . 'onchange="TypeSelect(' . $select_arg . ')">';
+			for ($j = 0; $j < 8; $j++) {
+				if ($instance['Type_'. $i] == $j) $select = ' selected="selected"'; else $select = '';
+				echo '<option ' . $select . 'value="'. $j . '">' . $type[$j] . '</option>';
+			}
+			echo '</select></th>';
+			
+			if ($instance['Type_'. $i] == 7) {
+				$title_disible = 'disabled=disabled';
+				$title_back_color = $back_color;
+				$title_value = $auto_setting;
+
+			} else {
+				$title_disible = '';
+				$title_back_color = $text_back_color;
+				$title_value = $instance['Title_'. $i];
+			}
+			echo '<th style="padding:2px"><input size="24" id="' . $this->get_field_id('Title_' . $i) . '" name="' . $this->get_field_name('Title_' . $i) . '" type="text" value="' . $title_value . '" ' .$title_back_color . $title_disible .  '/></th>'. "\n";
+			if ($instance['Type_'. $i] > 1) {
+				$url_disible = 'disabled=disabled';
+				$url_back_color = $back_color;
+				$url_value = $auto_setting;
+			} else {
+				$url_disible = '';
+				$url_back_color = $text_back_color;
+				$url_value = $instance['URL_'. $i];
+			}
+			echo '<th style="padding:2px"><input size="40" id="' . $this->get_field_id('URL_' . $i) . '" name="' . $this->get_field_name('URL_' . $i) . '" type="text" value="' . $url_value . '" ' .$url_back_color . $url_disible . '/></th>'. "\n";
+			if ($instance['Visible_'. $i]) $check = ' checked="checked"'; else $check = '';
+			echo '<th><input size="4" id="' . $this->get_field_id('Visible_' . $i) . '" name="' . $this->get_field_name('Visible_' . $i) . '" type="checkbox" value="1"' . $check . ' /></th>'. "\n";
+			echo '</tr>';
 		}
+		echo 	'</table>';
 	}
 
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/archives_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/archives_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/archives_block_theme.php	(revision 451)
@@ -1,3 +1,4 @@
 <?php
+// Block Version: 1.0
 function archives_block($options)
 {
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/authors_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/authors_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/authors_block_theme.php	(revision 451)
@@ -1,3 +1,4 @@
 <?php
+// Block Version: 1.0
 function authors_block($options)
 {
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/calender_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/calender_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/calender_block_theme.php	(revision 451)
@@ -1,3 +1,4 @@
 <?php
+// Block Version: 1.0
 function calender_block($options)
 {
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php	(revision 451)
@@ -1,4 +1,4 @@
 <?php
-
+// Block Version: 1.0
 function category_block($options)
 {
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/enhanced_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/enhanced_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/enhanced_block_theme.php	(revision 451)
@@ -1,3 +1,4 @@
 <?php
+// Block Version: 1.0
 function enhanced_block($options)
 {
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/meta_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/meta_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/meta_block_theme.php	(revision 451)
@@ -1,3 +1,4 @@
 <?php
+// Block Version: 1.0
 function meta_block($options)
 {
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/page_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/page_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/page_block_theme.php	(revision 451)
@@ -1,4 +1,4 @@
 <?php
-
+// Block Version: 1.0
 function page_block($options)
 {
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php	(revision 451)
@@ -1,3 +1,4 @@
 <?php
+// Block Version: 1.0
 function popular_posts_block($options)
 {
@@ -9,5 +10,7 @@
 	$time_format = empty( $options[5] ) ? '' : $options[5] ;
 	$tag_select = $options[6] ;
-	$selected = array_slice($options, 7); // get allowed cats
+	$cat_select = empty( $options[7] ) ? '0' : $options[7] ;
+	
+	$selected = explode(',' , $cat_select);
 
 	$mydirpath = get_xpress_dir_path();
@@ -15,10 +18,7 @@
 	if (empty($date_format)) $date_format = get_settings('date_format');
 	if (empty($time_format)) $time_format = get_settings('time_format');
-	if (array_search(0,$selected)===0) {
-		$cat_select = false;
-	}else {
-		$cat_select = true;			
-	}
-	$cat_id = implode(',',$selected);
+	if (array_search(0,$selected)===0) $cat_select = 0;
+	
+	$cat_select;
 	$block = array();
 	$item_no = 0;	
@@ -58,5 +58,5 @@
 
 	 	if ($cat_select) {
-	 		$where .= " AND ($term_taxonomy.term_id IN ($cat_id))";
+	 		$where .= " AND ($term_taxonomy.term_id IN ($cat_select))";
 		}
 		
@@ -75,5 +75,5 @@
 		
 	 	if ($cat_select) {
-	 		$where .= " AND ($post2cat_tb.category_id IN ($cat_id))";
+	 		$where .= " AND ($post2cat_tb.category_id IN ($cat_select))";
 		}
 	}
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php	(revision 451)
@@ -1,5 +1,4 @@
 <?php
-//if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
-
+// Block Version: 1.0
 function recent_comments_block($options)
 {
@@ -10,5 +9,7 @@
 	$date_format = empty( $options[4] ) ? '' : $options[4] ;
 	$time_format = empty( $options[5] ) ? '' : $options[5] ;
-    $selected = array_slice($options,6); // get allowed cats
+	$com_select = empty( $options[6] ) ? '0' : $options[6] ;
+
+	$selected = explode(',' , $com_select);
 
 	$mydirpath = get_xpress_dir_path();
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php	(revision 451)
@@ -1,19 +1,20 @@
 <?php
-//if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
-
+// Block Version: 1.0
 function recent_posts_content_block($options)
 {
 	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
 	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] );
-	$day_select = ($options[2])?intval($options[2]):0;
-	$day_size = ($options[3])?intval($options[3]):0;
-	$disp_count =  ($options[4])?intval($options[4]):10;
-	$excerpt = empty( $options[5] ) ? false : true ;
-	$excerpt_size =  ($options[6])?intval($options[6]):100;
-	$date_format = empty( $options[7] ) ? '' : $options[7] ;
-	$time_format = empty( $options[8] ) ? '' : $options[8] ;
-	$tag_select = $options[9] ;
-    $selected = array_slice($options,10); // get allowed cats
-
+	$disp_count =  ($options[2])?intval($options[2]):10;
+	$excerpt = empty( $options[3] ) ? false : true ;
+	$excerpt_size =  ($options[4])?intval($options[4]):100;
+	$date_format = empty( $options[5] ) ? '' : $options[5] ;
+	$time_format = empty( $options[6] ) ? '' : $options[6] ;
+	$tag_select = $options[7] ;
+	$cat_select = empty( $options[8] ) ? '0' : $options[8] ;
+	$day_select = ($options[9])?intval($options[9]):0;
+	$day_size = ($options[10])?intval($options[10]):0;
+
+	$selected = explode(',' , $cat_select);
+	
 	$mydirpath = get_xpress_dir_path();
 	
@@ -21,5 +22,6 @@
 	if (empty($time_format)) $time_format = get_settings('time_format');
 	if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&";
-	
+	if (array_search(0,$selected)===0) $cat_select = 0;
+
 	$selected_author_id = xpress_selected_author_id('echo=0');	
 	if (!empty($selected_author_id)){
@@ -37,9 +39,8 @@
 	if (!is_null($wpdb)){
 		$wp_query->in_the_loop = true;		//for use the_tags() in multi lopp 
-		if (array_search(0,$selected)===0) {
+		if ($cat_select) {
+			$r = new WP_Query($author_where . $tag_where ."cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
+		} else {
 			$r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
-		} else {
-			$cat_id = implode(',',$selected);
-			$r = new WP_Query($author_where . $tag_where ."cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
 		}
 		while($r->have_posts()){			
@@ -52,6 +53,6 @@
 			if ($day_select == 2){
 				$post_date = mktime (0, 0, 0, get_the_time("m"), get_the_time("d"), get_the_time("Y"));
-				if (empty($lastes_date)) $lastes_date = $post_date;
-				$base_date = $lastes_date - $between_days;
+				if (empty($latest_date)) $latest_date = $post_date;
+				$base_date = $latest_date - $between_days;
 				if ($post_date < $base_date) continue;
 			}
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php	(revision 451)
@@ -1,3 +1,4 @@
 <?php
+// Block Version: 1.0
 function recent_posts_list_block($options)
 {
@@ -10,5 +11,7 @@
 	$time_format = empty( $options[6] ) ? '' : $options[6] ;
 	$tag_select = $options[7] ;
-	$selected = array_slice($options,8); // get allowed cats
+	$cat_select = empty( $options[8] ) ? '0' : $options[8] ;
+	
+	$selected = explode(',' , $cat_select);
 
 	$mydirpath = get_xpress_dir_path();
@@ -17,4 +20,5 @@
 	if (empty($time_format)) $time_format = get_settings('time_format');
 	if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&";
+	if (array_search(0,$selected)===0) $cat_select = 0;
 
 	$selected_author_id = xpress_selected_author_id('echo=0');	
@@ -30,10 +34,8 @@
 	if (!is_null($wpdb)){
 		$wp_query->in_the_loop = true;		//for use the_tags() in multi lopp 
-		if (array_search(0,$selected)===0) {
+		if ($cat_select) {
+			$r = new WP_Query($author_where . $tag_where . "cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
+		} else {
 			$r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
-
-		} else {
-			$cat_id = implode(',',$selected);
-			$r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");
 		}
 		while($r->have_posts()){			
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/search_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/search_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/search_block_theme.php	(revision 451)
@@ -1,4 +1,4 @@
 <?php
-
+// Block Version: 1.0
 function search_block($options)
 {
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/sidebar_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/sidebar_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/sidebar_block_theme.php	(revision 451)
@@ -1,3 +1,4 @@
 <?php
+// Block Version: 1.0
 function sidebar_block($options)
 {
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/tag_cloud_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/tag_cloud_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/tag_cloud_block_theme.php	(revision 451)
@@ -1,3 +1,4 @@
 <?php
+// Block Version: 1.0
 function tag_cloud_block($options)
 {
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php	(revision 451)
@@ -1,3 +1,4 @@
 <?php
+// Block Version: 1.0
 function widget_block($options)
 {
@@ -5,5 +6,7 @@
 	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_widget.html' : trim( $options[1] );
 	$title_show = empty( $options[2] ) ? false : true ;
-    $selected = array_slice($options,3); // get allowed cats
+	$widget_select = empty( $options[3] ) ? '' : $options[3] ;
+
+	$selected = explode(',' , $widget_select);
 
 	$output = '';
Index: branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/style.css
===================================================================
--- branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/style.css	(revision 428)
+++ branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/style.css	(revision 451)
@@ -456,4 +456,5 @@
 	text-align: right;
 	font-size: 9pt;
+	background-color: #fff;
 	}
 
@@ -462,4 +463,5 @@
 	text-align: left;
 	font-size: 9pt;
+	background-color: #fff;
 	}
 
@@ -467,4 +469,7 @@
 	display: block;
 	text-decoration: none;
+	font-weight: bold;
+	font-size: 14px;
+	background-color: #ddd;
 	}
 
