Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 445)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 448)
@@ -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: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 445)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 448)
@@ -8,6 +8,6 @@
 "Project-Id-Version: XPressME Plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-11-19 20:53+0900\n"
-"PO-Revision-Date: 2009-11-19 20:53+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"
@@ -56,8 +56,8 @@
 #: xpressme.php:274
 #: xpressme.php:280
-#: xpressme_class.php:293
-#: xpressme_class.php:311
-#: xpressme_class.php:442
-#: xpressme_class.php:453
+#: xpressme_class.php:296
+#: xpressme_class.php:314
+#: xpressme_class.php:445
+#: xpressme_class.php:456
 msgid "YES"
 msgstr "はい"
@@ -68,8 +68,8 @@
 #: xpressme.php:275
 #: xpressme.php:281
-#: xpressme_class.php:294
-#: xpressme_class.php:312
-#: xpressme_class.php:443
-#: xpressme_class.php:454
+#: xpressme_class.php:297
+#: xpressme_class.php:315
+#: xpressme_class.php:446
+#: xpressme_class.php:457
 msgid "NO"
 msgstr "いいえ"
@@ -77,5 +77,5 @@
 #: xpressme.php:181
 #: xpressme.php:232
-#: xpressme.php:286
+#: xpressme.php:291
 msgid "Update Config"
 msgstr "更新"
@@ -83,5 +83,5 @@
 #: xpressme.php:182
 #: xpressme.php:233
-#: xpressme.php:287
+#: xpressme.php:292
 msgid "Preset Config"
 msgstr "プリセット"
@@ -123,296 +123,308 @@
 msgstr "SQLデバッグウィンドを表示しますか？"
 
-#: xpressme_class.php:60
-#: xpressme_class.php:240
+#: 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:61
-#: xpressme_class.php:243
+#: xpressme_class.php:62
+#: xpressme_class.php:246
 msgid "Newer Post"
 msgstr "次の投稿へ"
 
-#: xpressme_class.php:63
-#: xpressme_class.php:246
+#: xpressme_class.php:64
+#: xpressme_class.php:249
 msgid "Older Entries"
 msgstr "前ページへ"
 
-#: xpressme_class.php:64
-#: xpressme_class.php:249
+#: xpressme_class.php:65
+#: xpressme_class.php:252
 msgid "Newer Entries"
 msgstr "次ページへ"
 
-#: xpressme_class.php:78
 #: xpressme_class.php:79
-#: xpressme_class.php:252
+#: xpressme_class.php:80
+#: xpressme_class.php:255
 msgid "Read the rest of this entry &raquo;"
 msgstr "この投稿の続きを読む &raquo;"
 
-#: xpressme_class.php:353
+#: xpressme_class.php:356
 msgid "Single Post Navi Setting"
 msgstr "シングルポストナビの設定"
 
-#: xpressme_class.php:358
-#: xpressme_class.php:403
+#: xpressme_class.php:361
+#: xpressme_class.php:406
 msgid "Adjustment of Navi link display position"
 msgstr "リンクの表示位置設定"
 
-#: xpressme_class.php:361
+#: 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:362
+#: 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:368
+#: xpressme_class.php:371
 msgid "Select Display name of PostNavi Link"
 msgstr "表示するリンクテキストを選択"
 
-#: xpressme_class.php:371
+#: xpressme_class.php:374
 msgid "Title of post"
 msgstr "投稿記事のタイトルを表示"
 
-#: xpressme_class.php:372
+#: xpressme_class.php:375
 msgid "Title of Navi"
 msgstr "ナビタイトルを表示"
 
-#: xpressme_class.php:378
+#: xpressme_class.php:381
 msgid "Display Navi Title of Old Post Link"
 msgstr "古い記事へのナビタイトルを設定"
 
-#: xpressme_class.php:385
+#: xpressme_class.php:388
 msgid "Display Navi Title of Newer Post Link"
 msgstr "より新しい記事へのナビタイトルを設定"
 
-#: xpressme_class.php:398
+#: xpressme_class.php:401
 msgid "Posts List Page Navi Setting"
 msgstr "ポストリストページナビの設定"
 
-#: xpressme_class.php:406
+#: 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:407
+#: 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:413
+#: xpressme_class.php:416
 msgid "Display Navi Title of Old Page Link"
 msgstr "古いページへのナビタイトルを設定"
 
-#: xpressme_class.php:420
+#: xpressme_class.php:423
 msgid "Display Navi Title of Newer Page Link"
 msgstr "より新しいページへのナビタイトルを設定"
 
-#: xpressme_class.php:433
+#: xpressme_class.php:436
 msgid "Dashboard feed Display Setting"
 msgstr "ダッシュボード　フィード表示設定"
 
-#: xpressme_class.php:439
+#: xpressme_class.php:442
 msgid "Display XPressMe Integration Kit Blog"
 msgstr "XPressME Integration Kit ブログを表示する。"
 
-#: xpressme_class.php:450
+#: xpressme_class.php:453
 msgid "Display XPressMe Integration Kit Forum"
 msgstr "XPressME Integration Kit フォーラムを表示する。"
 
-#: xpressme_class.php:468
+#: xpressme_class.php:471
 msgid "Role Setting at Login"
 msgstr "ログイン時の権限設定"
 
-#: xpressme_class.php:471
+#: xpressme_class.php:474
 msgid "XOOPS Groupe"
 msgstr "XOOPSグループ名"
 
-#: xpressme_class.php:471
+#: xpressme_class.php:474
 msgid "WordPress Role"
 msgstr "WordPressでの権限"
 
-#: xpressme_class.php:471
+#: xpressme_class.php:474
 msgid "Role is set at each login"
 msgstr "ログイン時、常に権限を更新する"
 
-#: xpressme_class.php:497
-#: xpressme_class.php:501
+#: xpressme_class.php:500
 #: xpressme_class.php:504
+#: xpressme_class.php:507
 msgid "Default Role of WordPress"
 msgstr "WordPressのデフォルト権限"
 
-#: xpressme_class.php:498
-#: xpressme_class.php:502
+#: xpressme_class.php:501
 #: xpressme_class.php:505
+#: xpressme_class.php:508
 msgid "Group User Doesn't Register"
 msgstr "ユーザ登録しない"
 
-#: xpressme_class.php:518
+#: xpressme_class.php:521
 msgid "Only the Admin can set Group Role Setting"
 msgstr "管理者だけがグループ権限を設定できます。"
 
-#: xpressme_class.php:538
+#: xpressme_class.php:541
 msgid "WordPress MU cannot integrate the comments."
 msgstr "WordPress MUはコメント統合できません。"
 
-#: xpressme_class.php:540
+#: xpressme_class.php:543
 msgid "Do Not Comment Integration."
 msgstr "コメント統合しません。"
 
-#: xpressme_class.php:575
+#: xpressme_class.php:578
 msgid "Comment integration with D3Forum"
 msgstr "D3Forumとのコメント統合"
 
-#: xpressme_class.php:577
+#: xpressme_class.php:580
 msgid "Select the forum of D3Forum that does the comment integration from the following lists."
 msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。"
 
-#: xpressme_class.php:582
+#: xpressme_class.php:585
 msgid "Select the Type of display of D3Forum comment."
 msgstr "D3Forumの表示タイプを選択"
 
-#: xpressme_class.php:584
 #: xpressme_class.php:587
+#: xpressme_class.php:590
 msgid "Flat"
 msgstr "フラット"
 
-#: xpressme_class.php:585
 #: xpressme_class.php:588
+#: xpressme_class.php:591
 msgid "Threaded"
 msgstr "スレッド"
 
-#: xpressme_class.php:591
+#: xpressme_class.php:594
 msgid "Select the order of display of D3Forum comment."
 msgstr "D3Forumコメントの表示順を選択"
 
-#: xpressme_class.php:593
 #: xpressme_class.php:596
+#: xpressme_class.php:599
 msgid "DESC"
 msgstr "降順"
 
-#: xpressme_class.php:594
 #: xpressme_class.php:597
+#: xpressme_class.php:600
 msgid "ASC"
 msgstr "昇順"
 
-#: xpressme_class.php:600
+#: xpressme_class.php:603
 msgid "Number of displays of D3Forum comments."
 msgstr "D3Forumのコメント表示数"
 
-#: xpressme_class.php:603
+#: 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:604
+#: xpressme_class.php:607
 msgid "Export to D3Forum"
 msgstr "D3Forumへ一括エクスポート"
 
-#: xpressme_class.php:605
+#: xpressme_class.php:608
 msgid "Import from D3Forum"
 msgstr "D3Forumから一括インポート"
 
-#: xpressme_class.php:618
+#: xpressme_class.php:621
 msgid "Contents Excerpt Setting"
 msgstr "記事抜粋の設定"
 
-#: xpressme_class.php:623
+#: xpressme_class.php:626
 msgid "Is the excerpt display done with the archive of contents?"
 msgstr "記事のアーカイブで抜粋表示を行いますか？"
 
-#: xpressme_class.php:630
+#: 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:637
+#: xpressme_class.php:640
 msgid "Excerpt length of word for ASCII contents"
 msgstr "ASCIIコンテンツの抜粋単語数"
 
-#: xpressme_class.php:644
+#: xpressme_class.php:647
 msgid "Excerpt length of character for multibyte contents"
 msgstr "マルチバイトコンテンツの抜粋文字数"
 
-#: xpressme_class.php:651
+#: 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:658
+#: 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:670
+#: xpressme_class.php:673
 msgid "Display Mode Setting"
 msgstr "表示モード設定"
 
-#: xpressme_class.php:673
+#: xpressme_class.php:676
 msgid "Select the XPressME Display Mode."
 msgstr "XPressMEの表示モードの選択"
 
-#: xpressme_class.php:678
+#: xpressme_class.php:681
 msgid "Xoops Mode"
 msgstr "XOOPSモード"
 
-#: xpressme_class.php:682
+#: xpressme_class.php:685
 msgid "WordPress Mode"
 msgstr "WordPressモード"
 
-#: xpressme_class.php:686
+#: xpressme_class.php:689
 msgid "User select"
 msgstr "ユーザによる選択"
 
-#: xpressme_class.php:691
+#: xpressme_class.php:694
 msgid "Select the theme used in the XOOPS Mode."
 msgstr "XOOPSモードで使用するテーマを選択"
 
-#: xpressme_class.php:696
+#: xpressme_class.php:699
 msgid "Use WordPress Selected Themes"
 msgstr "WordPressで選択したテーマを使う"
 
-#: xpressme_class.php:714
+#: xpressme_class.php:717
 msgid "Header Meta Option"
 msgstr "ヘッダメタ　オプション"
 
-#: xpressme_class.php:719
+#: xpressme_class.php:722
 msgid "Select the Header keyword."
 msgstr "ヘッダで使用するキーワードの選択"
 
-#: xpressme_class.php:724
+#: xpressme_class.php:727
 msgid "Xoops KeyWord"
 msgstr "XOOPSのキーワード"
 
-#: xpressme_class.php:727
+#: xpressme_class.php:730
 msgid "WordPress KeyWord"
 msgstr "WordPressのキーワード"
 
-#: xpressme_class.php:730
+#: xpressme_class.php:733
 msgid "WordPress & Xoops KeyWord"
 msgstr "WordPressｊとXOOPSのキーワード"
 
-#: xpressme_class.php:736
+#: xpressme_class.php:739
 msgid "Select the Header Description."
 msgstr "ヘッダで使用するディスクリプション（説明）の選択"
 
-#: xpressme_class.php:741
+#: xpressme_class.php:744
 msgid "Xoops Description"
 msgstr "XOOPSのディスクリプション"
 
-#: xpressme_class.php:744
+#: xpressme_class.php:747
 msgid "WordPress Description"
 msgstr "WordPressのディスクリプション"
 
-#: xpressme_class.php:747
+#: xpressme_class.php:750
 msgid "WordPress & Xoops Description"
 msgstr "WordPressとXOOPSのディスクリプション"
 
-#: xpressme_class.php:753
+#: xpressme_class.php:756
 msgid "Select the Header Robots Index."
 msgstr "ヘッダで使用するロボットインデックスの選択"
 
-#: xpressme_class.php:758
+#: xpressme_class.php:761
 msgid "Xoops Robots Index"
 msgstr "XOOPSのロボットインデックス"
 
-#: xpressme_class.php:761
+#: xpressme_class.php:764
 msgid "WordPress Robots Index"
 msgstr "WordPressのロボットインデックス"
 
-#: xpressme_class.php:790
+#: xpressme_class.php:793
 #, php-format
 msgid "Unable to create directory %s. Is its parent directory writable by the server?"
@@ -607,4 +619,9 @@
 msgid "Switch to WordPress mode"
 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
Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 445)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 448)
@@ -281,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";
 		
Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php	(revision 445)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php	(revision 448)
@@ -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') {
