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 389)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 392)
@@ -8,6 +8,6 @@
 "Project-Id-Version: XPressME Plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-09-09 14:10+0900\n"
-"PO-Revision-Date: 2009-09-09 14:11+0900\n"
+"POT-Creation-Date: 2009-10-06 21:59+0900\n"
+"PO-Revision-Date: 2009-10-06 22:00+0900\n"
 "Last-Translator: toemon <info@toemon.com>\n"
 "Language-Team: toemon <info@toemon.com>\n"
@@ -56,8 +56,8 @@
 #: xpressme.php:246
 #: xpressme.php:252
-#: xpressme_class.php:277
-#: xpressme_class.php:293
-#: xpressme_class.php:425
-#: xpressme_class.php:436
+#: xpressme_class.php:283
+#: xpressme_class.php:299
+#: xpressme_class.php:431
+#: xpressme_class.php:442
 msgid "YES"
 msgstr "はい"
@@ -68,8 +68,8 @@
 #: xpressme.php:247
 #: xpressme.php:253
-#: xpressme_class.php:278
-#: xpressme_class.php:294
-#: xpressme_class.php:426
-#: xpressme_class.php:437
+#: xpressme_class.php:284
+#: xpressme_class.php:300
+#: xpressme_class.php:432
+#: xpressme_class.php:443
 msgid "NO"
 msgstr "いいえ"
@@ -165,284 +165,292 @@
 msgstr "XPressME Integration Kit Version %1$s が利用可能です ! サイト管理者に連絡してください。"
 
-#: xpressme_class.php:54
-#: xpressme_class.php:229
+#: xpressme_class.php:55
+#: xpressme_class.php:232
 msgid "Older Post"
 msgstr "前の投稿へ"
 
-#: xpressme_class.php:55
-#: xpressme_class.php:232
+#: xpressme_class.php:56
+#: xpressme_class.php:235
 msgid "Newer Post"
 msgstr "次の投稿へ"
 
-#: xpressme_class.php:57
-#: xpressme_class.php:235
+#: xpressme_class.php:58
+#: xpressme_class.php:238
 msgid "Older Entries"
 msgstr "前ページへ"
 
-#: xpressme_class.php:58
-#: xpressme_class.php:238
+#: xpressme_class.php:59
+#: xpressme_class.php:241
 msgid "Newer Entries"
 msgstr "次ページへ"
 
-#: xpressme_class.php:72
 #: xpressme_class.php:73
-#: xpressme_class.php:241
+#: xpressme_class.php:74
+#: xpressme_class.php:244
 msgid "Read the rest of this entry &raquo;"
 msgstr "この投稿の続きを読む &raquo;"
 
-#: xpressme_class.php:336
+#: xpressme_class.php:342
 msgid "Single Post Navi Setting"
 msgstr "シングルポストナビの設定"
 
-#: xpressme_class.php:341
-#: xpressme_class.php:386
+#: xpressme_class.php:347
+#: xpressme_class.php:392
 msgid "Adjustment of Navi link display position"
 msgstr "リンクの表示位置設定"
 
-#: xpressme_class.php:344
+#: xpressme_class.php:350
 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right"
 msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示"
 
-#: xpressme_class.php:345
+#: xpressme_class.php:351
 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right"
 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示"
 
-#: xpressme_class.php:351
+#: xpressme_class.php:357
 msgid "Select Display name of PostNavi Link"
 msgstr "表示するリンクテキストを選択"
 
-#: xpressme_class.php:354
+#: xpressme_class.php:360
 msgid "Title of post"
 msgstr "投稿記事のタイトルを表示"
 
-#: xpressme_class.php:355
+#: xpressme_class.php:361
 msgid "Title of Navi"
 msgstr "ナビタイトルを表示"
 
-#: xpressme_class.php:361
+#: xpressme_class.php:367
 msgid "Display Navi Title of Old Post Link"
 msgstr "古い記事へのナビタイトルを設定"
 
-#: xpressme_class.php:368
+#: xpressme_class.php:374
 msgid "Display Navi Title of Newer Post Link"
 msgstr "より新しい記事へのナビタイトルを設定"
 
-#: xpressme_class.php:381
+#: xpressme_class.php:387
 msgid "Posts List Page Navi Setting"
 msgstr "ポストリストページナビの設定"
 
-#: xpressme_class.php:389
+#: xpressme_class.php:395
 msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right"
 msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示"
 
-#: xpressme_class.php:390
+#: xpressme_class.php:396
 msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right"
 msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示"
 
-#: xpressme_class.php:396
+#: xpressme_class.php:402
 msgid "Display Navi Title of Old Page Link"
 msgstr "古いページへのナビタイトルを設定"
 
-#: xpressme_class.php:403
+#: xpressme_class.php:409
 msgid "Display Navi Title of Newer Page Link"
 msgstr "より新しいページへのナビタイトルを設定"
 
-#: xpressme_class.php:416
+#: xpressme_class.php:422
 msgid "Dashboard feed Display Setting"
 msgstr "ダッシュボード　フィード表示設定"
 
-#: xpressme_class.php:422
+#: xpressme_class.php:428
 msgid "Display XPressMe Integration Kit Blog"
 msgstr "XPressME Integration Kit ブログを表示する。"
 
-#: xpressme_class.php:433
+#: xpressme_class.php:439
 msgid "Display XPressMe Integration Kit Forum"
 msgstr "XPressME Integration Kit フォーラムを表示する。"
 
-#: xpressme_class.php:450
+#: xpressme_class.php:456
 msgid "Role Setting at Login"
 msgstr "ログイン時の権限設定"
 
-#: xpressme_class.php:453
+#: xpressme_class.php:459
 msgid "XOOPS Groupe"
 msgstr "XOOPSグループ名"
 
-#: xpressme_class.php:453
+#: xpressme_class.php:459
 msgid "WordPress Role"
 msgstr "WordPressでの権限"
 
-#: xpressme_class.php:453
+#: xpressme_class.php:459
 msgid "Role is set at each login"
 msgstr "ログイン時、常に権限を更新する"
 
-#: xpressme_class.php:479
-#: xpressme_class.php:483
-#: xpressme_class.php:486
+#: xpressme_class.php:485
+#: xpressme_class.php:489
+#: xpressme_class.php:492
 msgid "Default Role of WordPress"
 msgstr "WordPressのデフォルト権限"
 
-#: xpressme_class.php:480
-#: xpressme_class.php:484
-#: xpressme_class.php:487
+#: xpressme_class.php:486
+#: xpressme_class.php:490
+#: xpressme_class.php:493
 msgid "Group User Doesn't Register"
 msgstr "ユーザ登録しない"
 
-#: xpressme_class.php:518
+#: xpressme_class.php:524
 msgid "WordPress MU cannot integrate the comments."
 msgstr "WordPress MUはコメント統合できません。"
 
-#: xpressme_class.php:520
+#: xpressme_class.php:526
 msgid "Do Not Comment Integration."
 msgstr "コメント統合しません。"
 
-#: xpressme_class.php:555
+#: xpressme_class.php:561
 msgid "Comment integration with D3Forum"
 msgstr "D3Forumとのコメント統合"
 
-#: xpressme_class.php:557
+#: xpressme_class.php:563
 msgid "Select the forum of D3Forum that does the comment integration from the following lists."
 msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。"
 
-#: xpressme_class.php:562
+#: xpressme_class.php:568
 msgid "Select the Type of display of D3Forum comment."
 msgstr "D3Forumの表示タイプを選択"
 
-#: xpressme_class.php:564
-#: xpressme_class.php:567
+#: xpressme_class.php:570
+#: xpressme_class.php:573
 msgid "Flat"
 msgstr "フラット"
 
-#: xpressme_class.php:565
-#: xpressme_class.php:568
+#: xpressme_class.php:571
+#: xpressme_class.php:574
 msgid "Threaded"
 msgstr "スレッド"
 
-#: xpressme_class.php:571
+#: xpressme_class.php:577
 msgid "Select the order of display of D3Forum comment."
 msgstr "D3Forumコメントの表示順を選択"
 
-#: xpressme_class.php:573
-#: xpressme_class.php:576
+#: xpressme_class.php:579
+#: xpressme_class.php:582
 msgid "DESC"
 msgstr "降順"
 
-#: xpressme_class.php:574
-#: xpressme_class.php:577
+#: xpressme_class.php:580
+#: xpressme_class.php:583
 msgid "ASC"
 msgstr "昇順"
 
-#: xpressme_class.php:580
+#: xpressme_class.php:586
 msgid "Number of displays of D3Forum comments."
 msgstr "D3Forumのコメント表示数"
 
-#: xpressme_class.php:583
+#: xpressme_class.php:589
 msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. "
 msgstr "WordPressコメントとD3Forumポスト間の一括転送（エクスポート・インポート）"
 
-#: xpressme_class.php:584
+#: xpressme_class.php:590
 msgid "Export to D3Forum"
 msgstr "D3Forumへ一括エクスポート"
 
-#: xpressme_class.php:585
+#: xpressme_class.php:591
 msgid "Import from D3Forum"
 msgstr "D3Forumから一括インポート"
 
-#: xpressme_class.php:598
+#: xpressme_class.php:604
 msgid "Contents Excerpt Setting"
 msgstr "記事抜粋の設定"
 
-#: xpressme_class.php:603
+#: xpressme_class.php:609
 msgid "Is the excerpt display done with the archive of contents?"
 msgstr "記事のアーカイブで抜粋表示を行いますか？"
 
-#: xpressme_class.php:610
+#: xpressme_class.php:616
 msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. "
 msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。"
 
-#: xpressme_class.php:617
+#: xpressme_class.php:623
 msgid "Excerpt length of word for ASCII contents"
 msgstr "ASCIIコンテンツの抜粋単語数"
 
-#: xpressme_class.php:624
+#: xpressme_class.php:630
 msgid "Excerpt length of character for multibyte contents"
 msgstr "マルチバイトコンテンツの抜粋文字数"
 
-#: xpressme_class.php:631
+#: xpressme_class.php:637
 msgid "This text is displayed in the link that reads contents not excerpted.(Is not displayed for the blank.)"
 msgstr "抜粋されていないコンテンツを読むためのリンクに表示されるテキスト(空白の場合リンクを表示しません)"
 
-#: xpressme_class.php:638
+#: xpressme_class.php:644
 msgid "This text is displayed in the link that more tag (&lt;!--more--&gt;). "
 msgstr "more タグ (&lt;!--more--&gt;)のリンクに表示されるテキスト"
 
-#: xpressme_class.php:650
+#: xpressme_class.php:656
 msgid "Display Mode Setting"
 msgstr "表示モード設定"
 
-#: xpressme_class.php:653
+#: xpressme_class.php:659
 msgid "Select the XPressME Display Mode."
 msgstr "XPressMEの表示モードの選択"
 
-#: xpressme_class.php:658
+#: xpressme_class.php:664
 msgid "Xoops Mode"
 msgstr "XOOPSモード"
 
-#: xpressme_class.php:662
+#: xpressme_class.php:668
 msgid "WordPress Mode"
 msgstr "WordPressモード"
 
-#: xpressme_class.php:666
+#: xpressme_class.php:672
 msgid "User select"
 msgstr "ユーザによる選択"
 
-#: xpressme_class.php:676
+#: xpressme_class.php:677
+msgid "Select the theme used in the XOOPS Mode."
+msgstr "XOOPSモードで使用するテーマを選択"
+
+#: xpressme_class.php:682
+msgid "Use WordPress Selected Themes"
+msgstr "WordPressで選択したテーマを使う"
+
+#: xpressme_class.php:700
 msgid "Header Meta Option"
 msgstr "ヘッダメタ　オプション"
 
-#: xpressme_class.php:681
+#: xpressme_class.php:705
 msgid "Select the Header keyword."
 msgstr "ヘッダで使用するキーワードの選択"
 
-#: xpressme_class.php:686
+#: xpressme_class.php:710
 msgid "Xoops KeyWord"
 msgstr "XOOPSのキーワード"
 
-#: xpressme_class.php:689
+#: xpressme_class.php:713
 msgid "WordPress KeyWord"
 msgstr "WordPressのキーワード"
 
-#: xpressme_class.php:692
+#: xpressme_class.php:716
 msgid "WordPress & Xoops KeyWord"
 msgstr "WordPressｊとXOOPSのキーワード"
 
-#: xpressme_class.php:698
+#: xpressme_class.php:722
 msgid "Select the Header Description."
 msgstr "ヘッダで使用するディスクリプション（説明）の選択"
 
-#: xpressme_class.php:703
+#: xpressme_class.php:727
 msgid "Xoops Description"
 msgstr "XOOPSのディスクリプション"
 
-#: xpressme_class.php:706
+#: xpressme_class.php:730
 msgid "WordPress Description"
 msgstr "WordPressのディスクリプション"
 
-#: xpressme_class.php:709
+#: xpressme_class.php:733
 msgid "WordPress & Xoops Description"
 msgstr "WordPressとXOOPSのディスクリプション"
 
-#: xpressme_class.php:715
+#: xpressme_class.php:739
 msgid "Select the Header Robots Index."
 msgstr "ヘッダで使用するロボットインデックスの選択"
 
-#: xpressme_class.php:720
+#: xpressme_class.php:744
 msgid "Xoops Robots Index"
 msgstr "XOOPSのロボットインデックス"
 
-#: xpressme_class.php:723
+#: xpressme_class.php:747
 msgid "WordPress Robots Index"
 msgstr "WordPressのロボットインデックス"
 
-#: xpressme_class.php:752
+#: xpressme_class.php:776
 #, php-format
 msgid "Unable to create directory %s. Is its parent directory writable by the server?"
Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 389)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 392)
@@ -21,4 +21,30 @@
 require_once dirname( __FILE__ ).'/include/pluggable-override.php' ;
 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()
Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php	(revision 389)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php	(revision 392)
@@ -35,4 +35,5 @@
 	var $is_dashboard_blog_disp;
 	var $is_dashboard_forum_disp;
+	var $theme_select;
 	//constructor
 	function XPressME_Class()
@@ -79,4 +80,5 @@
 		$this->is_dashboard_blog_disp = true;
 		$this->is_dashboard_forum_disp = true;
+		$this->theme_select = 'use_wordpress_select';
 	}
 	
@@ -132,5 +134,6 @@
 			'meta_robot_type' => $this->meta_robot_type,
 			'is_dashboard_blog_disp' => $this->is_dashboard_blog_disp,
-			'is_dashboard_forum_disp' => $this->is_dashboard_forum_disp
+			'is_dashboard_forum_disp' => $this->is_dashboard_forum_disp,
+			'theme_select' => $this->theme_select
 		);
 		if ($mode == 'add_new') {
@@ -241,4 +244,7 @@
 								$set_value = __('Read the rest of this entry &raquo;', 'xpressme');
 								break;
+							case 'theme_select':
+								$set_value = 'use_wordpress_select';
+								break;
 								
 							default:
@@ -668,4 +674,22 @@
 		$form .= "</select><br />\n";
 		
+		// Theme Select
+		$form .=  __('Select the theme used in the XOOPS Mode.', 'xpressme') ."\n";
+		$form .= '<select name="ch_theme_select">' . "\n";
+		
+		$form .= '<option value="use_wordpress_select" ';
+		if ($this->theme_select == 'use_wordpress_select') $form .= ' selected="selected"';
+		$form .= '>'.__('Use WordPress Selected Themes', 'xpressme') ."</option>\n";
+		
+		$themes = get_themes();
+		$theme_names = array_keys($themes);
+		natcasesort($theme_names);
+		foreach ($theme_names as $theme_name) {
+			if ($theme_name == 'My Themes') continue;
+			$form .= '<option value="' . $theme_name .'" ';
+			if ($this->theme_select == $theme_name) $form .= ' selected="selected"';
+			$form .= '>'.$theme_name ."</option>\n";
+		}
+		$form .= "</select><br />\n";
 		$form .= "</td></tr>\n";
 	    return $form;
