Index: trunk/wp-content/plugins/xpressme/include/custom_functions.php
===================================================================
--- trunk/wp-content/plugins/xpressme/include/custom_functions.php	(revision 144)
+++ trunk/wp-content/plugins/xpressme/include/custom_functions.php	(revision 145)
@@ -31,4 +31,5 @@
 function xpress_is_theme_sidebar_disp(){
 	global $xpress_config;
+	if (is_wordpress_style()) return true;
 	return $xpress_config->is_theme_sidebar_disp;
 }	
@@ -276,18 +277,48 @@
 }
 
-function xpress_the_content($more_link_text = '',$excerpt_size = 0,$show = true)
-{
-	$content = get_the_content();	
-	if($excerpt_size > 0) {
-
-		$content = apply_filters('the_excerpt_rss', $content);
-		$content = strip_tags($content);
-
-		if (mb_strlen($content) > $excerpt_size){ 
-			$content = mb_substr($content, 0, $excerpt_size); 
-			$content .= '... ';
-			if (!empty($more_link_text)) $content .= '<p align="center"><a href="'. get_permalink() . "\">".$more_link_text .'</a></p>';
+function get_xpress_excerpt_contents($excerpt_length_word,$excerpt_length_character,$more_link_text = '') {
+	global $post,$xpress_config;
+	
+	$blog_encoding = get_option('blog_charset');
+	$text = get_the_content('');
+	$text = strip_shortcodes( $text );
+	$text = apply_filters('the_content', $text);
+	$text = str_replace(']]>', ']]&gt;', $text);
+	$text = strip_tags($text);
+	$is_almost_ascii = ($xpress_config->ascii_judged_rate < round(@(mb_strlen($text, $blog_encoding) / strlen($text)) * 100)) ? true : false;
+	if($is_almost_ascii) {
+		$words = explode(' ', $text, $excerpt_length_word + 1);
+
+		if(count($words) > $excerpt_length_word) {
+			array_pop($words);
+			array_push($words, ' ... ');
+			$text = implode(' ', $words);
+			if (!empty($more_link_text)) $text .= '<p align="center"><a href="'. get_permalink() . "\">".$more_link_text .'</a></p>';
+
 		}
 	}
+	elseif(mb_strlen($text, $blog_encoding) > $excerpt_length_character) {
+		$text = mb_substr($text, 0, $xpress_config->excerpt_length_character, $blog_encoding) . ' ... ';
+		if (!empty($more_link_text)) $text .= '<p align="center"><a href="'. get_permalink() . "\">".$more_link_text .'</a></p>';
+	}
+
+	return $text;
+}
+
+function xpress_the_content($more_link_text = null, $stripteaser = 0, $more_file = '',$show = true)
+{
+	global $post,$xpress_config;
+	
+	
+	if ($xpress_config->is_content_excerpt){
+		$excerpt_length_word = $xpress_config->excerpt_length_word;
+		$excerpt_length_character = $xpress_config->excerpt_length_character;
+		$more_link_text = $xpress_config->more_link_text;
+		$content = get_xpress_excerpt_contents($excerpt_length_word,$excerpt_length_character,$more_link_text);
+	} else {
+		$content = get_the_content($more_link_text,$stripteaser,$more_file);
+		$content = apply_filters('the_content', $content);
+		$content = str_replace(']]>', ']]&gt;', $content);
+	}	
 	if(empty($show)) return $content;
 	echo $content;
Index: trunk/wp-content/plugins/xpressme/include/xpress_common_functions.php
===================================================================
--- trunk/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 144)
+++ trunk/wp-content/plugins/xpressme/include/xpress_common_functions.php	(revision 145)
@@ -154,3 +154,79 @@
 	} 
 }
+function is_wordpress_style()
+{
+	global $xpress_config;
+	
+	if ($xpress_config->viewer_type == 'wordpress') return true;
+	if ($xpress_config->viewer_type == 'xoops') return false;
+	
+	// user select
+	$get_style = isset($_GET["style"]) ? $_GET["style"] : '';
+	$cookie_style = isset($_COOKIE["xpress_style"]) ? $_COOKIE["xpress_style"] : '';
+	
+	// set style
+	if (!empty($get_style)){
+		$style = $get_style;
+	} else {
+		if (!empty($cookie_style)){
+			$style = $cookie_style;
+		} else {
+			$style = 'x';
+		}
+	}
+	
+	// set cookie
+	if (empty($cookie_style)){
+		setcookie("xpress_style", $style);
+		$_COOKIE["xpress_style"] = $style;
+	} else {
+		if ($style != $cookie_style) {
+			setcookie("xpress_style", $style);
+			$_COOKIE["xpress_style"] = $style;
+		}
+	}
+	if ($style == 'w') {
+		return true;
+	} else { 
+		return false;
+	}
+}
+
+function wp_meta_add_xpress_menu()
+{
+	global $xpress_config;
+	if ($xpress_config->viewer_type == 'user_select'){
+		echo disp_mode_set();
+	}
+	if (function_exists('wp_theme_switcher') ) {	
+		echo '<li>' . __('Themes') . ':';
+		wp_theme_switcher('dropdown');
+	 	echo '</li>';
+	}
+}
+
+function disp_mode_set(){
+	global $xpress_config;
+	
+	$select ="";
+	if ($xpress_config->viewer_type == 'user_select'){
+		$style = isset($_GET["style"]) ? $_GET["style"] : (isset($_COOKIE["xpress_style"]) ? $_COOKIE["xpress_style"] : "");
+
+		switch($style) {
+		case 'w':
+			$select ='<li><a href="'.get_settings('siteurl').'/?style=x" title="'. __('Switch to XOOPS mode','xpressme').'">'.__('Switch to XOOPS mode','xpressme').'</a></li>';
+//			$select.='<img src="'. get_settings('siteurl').'/images/external.png" alt="'.__('Switch to XOOPS mode','xpressme') . '"></a></li>';
+			break;
+		case 'x':
+			$select='<li><a href="'.get_settings('siteurl').'/?style=w" title="'.__('Switch to WordPress mode','xpressme').'">'.__('Switch to WordPress mode','xpressme').'</a></li>';
+			break;
+		default:
+			$select='<li><a href="'.get_settings('siteurl').'/?style=w" title="'.__('Switch to WordPress mode','xpressme').'">'.__('Switch to WordPress mode','xpressme').'</a></li>';
+			break;
+		}
+	}
+	return $select;
+}
+
+
 ?>
Index: trunk/wp-content/plugins/xpressme/language/xpressme-ja.po
===================================================================
--- trunk/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 144)
+++ trunk/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 145)
@@ -3,5 +3,5 @@
 "Project-Id-Version: XPressME Plugin\n"
 "POT-Creation-Date: \n"
-"PO-Revision-Date: 2009-03-30 17:58+0900\n"
+"PO-Revision-Date: 2009-03-31 17:36+0900\n"
 "Last-Translator: toemon <toychee@toemon.com>\n"
 "Language-Team: \n"
@@ -15,280 +15,327 @@
 "X-Poedit-SearchPath-0: .\n"
 
-#: xpressme_class.php:36
+#: xpressme_class.php:42
 msgid "XPressME Settings"
 msgstr "XPressME設定"
 
-#: xpressme_class.php:53
-#: xpressme_class.php:167
+#: xpressme_class.php:59
+#: xpressme_class.php:186
 msgid "Older Post"
 msgstr "前の投稿へ"
 
-#: xpressme_class.php:54
-#: xpressme_class.php:169
-#, fuzzy
+#: xpressme_class.php:60
+#: xpressme_class.php:188
 msgid "Newer Post"
 msgstr "次の投稿へ"
 
-#: xpressme_class.php:56
-#: xpressme_class.php:172
+#: xpressme_class.php:62
+#: xpressme_class.php:191
 msgid "Older Entries"
 msgstr "前ページへ"
 
-#: xpressme_class.php:57
-#: xpressme_class.php:174
+#: xpressme_class.php:63
+#: xpressme_class.php:193
 msgid "Newer Entries"
 msgstr "次ページへ"
 
-#: xpressme_class.php:218
-#: xpressme_class.php:234
-#: xpressme_class.php:530
-#: xpressme_class.php:535
-#: xpressme_class.php:545
-#: xpressme_class.php:550
+#: xpressme_class.php:77
+msgid "more"
+msgstr "続きを読む"
+
+#: xpressme_class.php:244
+#: xpressme_class.php:260
+#: xpressme_class.php:628
+#: xpressme_class.php:633
+#: xpressme_class.php:643
+#: xpressme_class.php:648
 msgid "YES"
 msgstr "はい"
 
-#: xpressme_class.php:219
-#: xpressme_class.php:235
-#: xpressme_class.php:531
-#: xpressme_class.php:536
-#: xpressme_class.php:546
-#: xpressme_class.php:551
+#: xpressme_class.php:245
+#: xpressme_class.php:261
+#: xpressme_class.php:629
+#: xpressme_class.php:634
+#: xpressme_class.php:644
+#: xpressme_class.php:649
 msgid "NO"
 msgstr "いいえ"
 
-#: xpressme_class.php:277
+#: xpressme_class.php:303
 msgid "Single Post Navi Setting"
 msgstr "シングルポストナビの設定"
 
-#: xpressme_class.php:282
-#: xpressme_class.php:327
+#: xpressme_class.php:308
+#: xpressme_class.php:353
 msgid "Adjustment of Navi link display position"
 msgstr "リンクの表示位置設定"
 
-#: xpressme_class.php:285
+#: xpressme_class.php:311
 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right"
 msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示"
 
-#: xpressme_class.php:286
+#: xpressme_class.php:312
 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right"
 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示"
 
-#: xpressme_class.php:292
+#: xpressme_class.php:318
 msgid "Select Display name of PostNavi Link"
 msgstr "表示するリンクテキストを選択"
 
-#: xpressme_class.php:295
+#: xpressme_class.php:321
 msgid "Title of post"
 msgstr "投稿記事のタイトルを表示"
 
-#: xpressme_class.php:296
+#: xpressme_class.php:322
 msgid "Title of Navi"
 msgstr "ナビタイトルを表示"
 
-#: xpressme_class.php:302
+#: xpressme_class.php:328
 msgid "Display Navi Title of Old Post Link"
 msgstr "古い記事へのナビタイトルを設定"
 
-#: xpressme_class.php:309
+#: xpressme_class.php:335
 msgid "Display Navi Title of Newer Post Link"
 msgstr "より新しい記事へのナビタイトルを設定"
 
-#: xpressme_class.php:322
+#: xpressme_class.php:348
 msgid "Posts List Page Navi Setting"
 msgstr "ポストリストページナビの設定"
 
-#: xpressme_class.php:330
+#: xpressme_class.php:356
 msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right"
 msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示"
 
-#: xpressme_class.php:331
+#: xpressme_class.php:357
 msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right"
 msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示"
 
-#: xpressme_class.php:337
+#: xpressme_class.php:363
 msgid "Display Navi Title of Old Page Link"
 msgstr "古いページへのナビタイトルを設定"
 
-#: xpressme_class.php:344
+#: xpressme_class.php:370
 msgid "Display Navi Title of Newer Page Link"
 msgstr "より新しいページへのナビタイトルを設定"
 
-#: xpressme_class.php:359
+#: xpressme_class.php:385
 msgid "Role Setting at Login"
 msgstr "ログイン時の権限設定"
 
-#: xpressme_class.php:362
+#: xpressme_class.php:388
 msgid "XOOPS Groupe"
 msgstr "XOOPSグループ名"
 
-#: xpressme_class.php:362
+#: xpressme_class.php:388
 msgid "WordPress Role"
 msgstr "WordPressでの権限"
 
-#: xpressme_class.php:362
+#: xpressme_class.php:388
 msgid "Role is set at each login"
 msgstr "ログイン時、常に権限を更新する"
 
-#: xpressme_class.php:388
-#: xpressme_class.php:392
-#: xpressme_class.php:395
+#: xpressme_class.php:414
+#: xpressme_class.php:418
+#: xpressme_class.php:421
 msgid "Default Role of WordPress"
 msgstr "WordPressのデフォルト権限"
 
-#: xpressme_class.php:389
-#: xpressme_class.php:393
-#: xpressme_class.php:396
+#: xpressme_class.php:415
+#: xpressme_class.php:419
+#: xpressme_class.php:422
 msgid "Group User Doesn't Register"
 msgstr "ユーザ登録しない"
 
-#: xpressme_class.php:425
+#: xpressme_class.php:451
 msgid "Do Not Comment Integration."
 msgstr "コメント統合しません。"
 
-#: xpressme_class.php:459
+#: xpressme_class.php:485
 msgid "Comment integration with D3Forum"
 msgstr "D3Forumとのコメント統合"
 
-#: xpressme_class.php:461
+#: xpressme_class.php:487
 msgid "Select the forum of D3Forum that does the comment integration from the following lists."
 msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。"
 
-#: xpressme_class.php:465
+#: xpressme_class.php:491
 msgid "Select the Type of display of D3Forum comment."
 msgstr "D3Forumの表示タイプを選択"
 
-#: xpressme_class.php:467
-#: xpressme_class.php:470
+#: xpressme_class.php:493
+#: xpressme_class.php:496
 msgid "Flat"
 msgstr "フラット"
 
-#: xpressme_class.php:468
-#: xpressme_class.php:471
+#: xpressme_class.php:494
+#: xpressme_class.php:497
 msgid "Threaded"
 msgstr "スレッド"
 
-#: xpressme_class.php:474
+#: xpressme_class.php:500
 msgid "Select the order of display of D3Forum comment."
 msgstr "D3Forumコメントの表示順を選択"
 
-#: xpressme_class.php:476
-#: xpressme_class.php:479
+#: xpressme_class.php:502
+#: xpressme_class.php:505
 msgid "DESC"
 msgstr "降順"
 
-#: xpressme_class.php:477
-#: xpressme_class.php:480
+#: xpressme_class.php:503
+#: xpressme_class.php:506
 msgid "ASC"
 msgstr "昇順"
 
-#: xpressme_class.php:483
+#: xpressme_class.php:509
 msgid "Number of displays of D3Forum comments."
 msgstr "D3Forumのコメント表示数"
 
-#: xpressme_class.php:487
+#: xpressme_class.php:513
 msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. "
 msgstr "WordPressコメントとD3Forumポスト間の一括転送（エクスポート・インポート）"
 
-#: xpressme_class.php:488
+#: xpressme_class.php:514
 msgid "Export to D3Forum"
 msgstr "D3Forumへ一括エクスポート"
 
-#: xpressme_class.php:489
+#: xpressme_class.php:515
 msgid "Import from D3Forum"
 msgstr "D3Forumから一括インポート"
 
-#: xpressme_class.php:520
+#: xpressme_class.php:527
+msgid "Contents Excerpt Setting"
+msgstr "記事抜粋の設定"
+
+#: xpressme_class.php:532
+msgid "Is the excerpt display done with the archive of contents?"
+msgstr "記事のアーカイブで抜粋表示を行いますか？"
+
+#: xpressme_class.php:539
+msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. "
+msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。"
+
+#: xpressme_class.php:546
+msgid "Excerpt length of word for ASCII contents"
+msgstr "ASCIIコンテンツの抜粋単語数"
+
+#: xpressme_class.php:553
+msgid "Excerpt length of character for multibyte contents"
+msgstr "マルチバイトコンテンツの抜粋文字数"
+
+#: xpressme_class.php:560
+msgid "More Link Text (Is not displayed for the blank.)"
+msgstr "Moreリンクテキスト（ブランクの場合リンクを表示しません。）"
+
+#: xpressme_class.php:572
+msgid "Display Mode Setting"
+msgstr "表示モード設定"
+
+#: xpressme_class.php:575
+msgid "Select the XPressME Display Mode."
+msgstr "XPressMEの表示モードの選択"
+
+#: xpressme_class.php:580
+msgid "Xoops Mode"
+msgstr "XOOPSモード"
+
+#: xpressme_class.php:584
+msgid "WordPress Mode"
+msgstr "WordPressモード"
+
+#: xpressme_class.php:588
+msgid "User select"
+msgstr "ユーザによる選択"
+
+#: xpressme_class.php:617
 msgid "XPressME Configuration Page"
 msgstr "XPressMEの設定ページ"
 
-#: xpressme_class.php:524
+#: xpressme_class.php:622
 msgid "Media Upload Base Path"
 msgstr "メディアアップロードのベースパス設定"
 
-#: xpressme_class.php:525
+#: xpressme_class.php:623
 msgid "Use XOOPS UPLOAD PATH"
 msgstr "XOOPSのアップロードパスを使用する。"
 
-#: xpressme_class.php:526
+#: xpressme_class.php:624
 msgid "USE WordPress BASE_PATH"
 msgstr "WordPressのベースパスを使用する。"
 
-#: xpressme_class.php:529
+#: xpressme_class.php:627
 msgid "Thema Sidebar Display"
 msgstr "テーマ表示時にサイドバー表示する。"
 
-#: xpressme_class.php:534
+#: xpressme_class.php:632
 msgid "The change tracking of the post is preserved"
 msgstr "投稿の変更履歴を有効にする。"
 
-#: xpressme_class.php:544
+#: xpressme_class.php:642
 msgid "Is the posts author views counted?"
 msgstr "投稿者の閲覧をカウントしますか？"
 
-#: xpressme_class.php:549
+#: xpressme_class.php:647
 msgid "Is SQL debugging window displayed?"
 msgstr "SQLデバッグウィンドを表示しますか？"
 
-#: xpressme_class.php:561
+#: xpressme_class.php:659
 msgid "Update Config"
 msgstr "更新"
 
-#: xpressme_class.php:562
+#: xpressme_class.php:660
 msgid "Preset Config"
 msgstr "プリセット"
 
-#: include/custom_functions.php:231
+#: include/custom_functions.php:232
 #, php-format
 msgid "views :%d"
 msgstr "閲覧数 :%d"
 
-#: include/custom_functions.php:317
+#: include/custom_functions.php:348
 msgid "Main"
 msgstr "メイン"
 
-#: include/custom_functions.php:319
+#: include/custom_functions.php:350
 #, php-format
 msgid "Archive for the &#8216;%s&#8217; Category"
 msgstr "カテゴリー &#8216;%s&#8217; のアーカイブ"
 
-#: include/custom_functions.php:321
+#: include/custom_functions.php:352
 #, php-format
 msgid "Posts Tagged &#8216;%s&#8217;"
 msgstr "&#8216;%s&#8217; タグのついている投稿"
 
-#: include/custom_functions.php:323
+#: include/custom_functions.php:354
 #, php-format
 msgid "Archive for %s|Daily archive page"
 msgstr "%sの日別アーカイブ"
 
-#: include/custom_functions.php:323
+#: include/custom_functions.php:354
 msgid "F jS, Y"
 msgstr "Y年n月j日"
 
-#: include/custom_functions.php:325
+#: include/custom_functions.php:356
 #, php-format
 msgid "Archive for %s|Monthly archive page"
 msgstr "%sの月別アーカイブ"
 
-#: include/custom_functions.php:325
+#: include/custom_functions.php:356
 msgid "F, Y"
 msgstr "Y年n月"
 
-#: include/custom_functions.php:327
+#: include/custom_functions.php:358
 #, php-format
 msgid "Archive for %s|Yearly archive page"
 msgstr "%sの年別アーカイブ "
 
-#: include/custom_functions.php:327
+#: include/custom_functions.php:358
 msgid "Y"
 msgstr "Y年"
 
-#: include/custom_functions.php:329
+#: include/custom_functions.php:360
 #, php-format
 msgid "Archive for the &#8216;%s&#8217; Author"
 msgstr "投稿者 &#8216;%s&#8217; のアーカイブ"
 
-#: include/custom_functions.php:331
+#: include/custom_functions.php:362
 #, php-format
 msgid "Search Results of word &#8216;%s&#8217;"
Index: trunk/wp-content/plugins/xpressme/xpressme.php
===================================================================
--- trunk/wp-content/plugins/xpressme/xpressme.php	(revision 144)
+++ trunk/wp-content/plugins/xpressme/xpressme.php	(revision 145)
@@ -27,4 +27,5 @@
 	remove_action( 'pre_post_update', 'wp_save_post_revision' );			// Not Save Post Revision
 }
+add_action("wp_meta" , "wp_meta_add_xpress_menu");			// add xpress menu  in wp_meta
 
 //XOOPS Bloack Cache Refresh
Index: trunk/wp-content/plugins/xpressme/xpressme_class.php
===================================================================
--- trunk/wp-content/plugins/xpressme/xpressme_class.php	(revision 144)
+++ trunk/wp-content/plugins/xpressme/xpressme_class.php	(revision 145)
@@ -22,4 +22,10 @@
 	var $d3forum_forum_id;
 	var $d3forum_external_link_format;
+	var $is_content_excerpt;
+	var $ascii_judged_rate;
+	var $excerpt_length_word;
+	var $excerpt_length_character;
+	var $more_link_text;
+	var $viewer_type;
 	//constructor
 	function XPressME_Class()
@@ -47,5 +53,5 @@
 	{
 		$this->is_use_xoops_upload_path = true;
-		$this->is_theme_sidebar_disp = true;
+		$this->is_theme_sidebar_disp = false;
 		$this->is_save_post_revision = true;
 		$this->is_postnavi_title_disp = true;
@@ -65,4 +71,11 @@
 		$this->is_d3forum_desc = true;
 		$this->d3forum_views_num = 10;
+		$this->is_content_excerpt = true;
+		$this->ascii_judged_rate = 90;
+		$this->excerpt_length_word = 40;
+		$this->excerpt_length_character = 120;
+		$this->more_link_text = __('more', 'xpressme');
+		$this->viewer_type = 'xoops';
+
 	}
 	
@@ -105,5 +118,11 @@
 			'is_d3forum_flat' => $this->is_d3forum_flat,
 			'is_d3forum_desc' => $this->is_d3forum_desc,
-			'd3forum_views_num' =>$this->d3forum_views_num
+			'd3forum_views_num' =>$this->d3forum_views_num,
+			'is_content_excerpt' => $this->is_content_excerpt,
+			'ascii_judged_rate' => $this->ascii_judged_rate,
+			'excerpt_length_word' => $this->excerpt_length_word,
+			'excerpt_length_character' => $this->excerpt_length_character,
+			'more_link_text' => $this->more_link_text,
+			'viewer_type' => $this->viewer_type
 		);
 		if ($mode == 'add_new') {
@@ -193,4 +212,11 @@
 		$this->d3forum_views_num = stripslashes(trim($_POST['ch_d3forum_view_num']));
 		
+		$this->is_content_excerpt = stripslashes(trim($_POST['ch_is_content_excerpt']));
+		$this->ascii_judged_rate = stripslashes(trim($_POST['ch_ascii_judged_rate']));
+		$this->excerpt_length_word = stripslashes(trim($_POST['ch_excerpt_length_word']));
+		$this->excerpt_length_character = stripslashes(trim($_POST['ch_excerpt_length_character']));
+		$this->more_link_text = stripslashes(trim($_POST['ch_more_link_text']));
+		$this->viewer_type = stripslashes(trim($_POST['ch_viewer_type']));
+		
 		global $xoops_db;
 		$table = get_wp_prefix() . 'group_role';	
@@ -226,5 +252,5 @@
 		$form .=  $this->yes_no_radio_option_sub($option_name,$yes,$no);
 		$form .=  "</td>\n";
-		$form .=  "</tr><tr>\n";
+		$form .=  "</tr>\n";
 			
 	    return $form;
@@ -257,5 +283,5 @@
 		$form .= $this->text_option_sub($option_name);
 		$form .=  "</td>\n";
-		$form .=  "</tr><tr>\n";
+		$form .=  "</tr>\n";
 			
 	    return $form;
@@ -496,4 +522,75 @@
 		return $form;
 	}
+	
+	function excerpt_option(){
+		$form = '';
+		$form .= '<tr><th><label for="excerpt">' .__('Contents Excerpt Setting', 'xpressme') . '</label></th>';
+		$form .= "<td>\n";
+		$form .= "<table>\n";
+		$form .= "<tr>\n";
+		
+		$form .= "<td>" . __('Is the excerpt display done with the archive of contents?','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->yes_no_radio_option_sub('is_content_excerpt');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('When ASCII character more than the set ratio is included, it is judged ASCII contents. ','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('ascii_judged_rate');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('Excerpt length of word for ASCII contents','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('excerpt_length_word');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+		
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('Excerpt length of character for multibyte contents','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('excerpt_length_character');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+
+		$form .= "<tr>\n";
+		$form .= "<td>" . __('More Link Text (Is not displayed for the blank.)','xpressme') . "</td>\n";		
+		$form .= "<td>\n";
+		$form .=  $this->text_option_sub('more_link_text');
+		$form .= "</td>\n";
+		$form .= "</tr>\n";
+
+		$form .= "</table></td></tr>\n";
+	    return $form;
+	}
+
+	function viewer_type_option(){
+		$form  = "<tr>\n";
+		$form .= '<th><label for="viewer_type">' .__('Display Mode Setting', 'xpressme') . '</label></th>';
+		$form .= "<td>\n";
+		
+		$form .=  __('Select the XPressME Display Mode.', 'xpressme') ."\n";
+		$form .= '<select name="ch_viewer_type">' . "\n";
+		
+		$form .= '<option value="xoops" ';
+		if ($this->viewer_type == 'xoops') $form .= ' selected="selected"';
+		$form .= '>'.__('Xoops Mode', 'xpressme') ."</option>\n";
+
+		$form .= '<option value="wordpress" ';
+		if ($this->viewer_type == 'wordpress') $form .= ' selected="selected"';
+		$form .= '>'.__('WordPress Mode', 'xpressme') ."</option>\n";
+		
+		$form .= '<option value="user_select" ';
+		if ($this->viewer_type == 'user_select') $form .= ' selected="selected"';
+		$form .= '>'.__('User select', 'xpressme') ."</option>\n";
+
+		$form .= "</select><br />\n";
+		
+		$form .= "</td></tr>\n";
+	    return $form;
+	}
 
 	function option_page()
@@ -504,5 +601,5 @@
 			$this->SettingValueWrite('update');
 		} else if (isset($_POST['submit_reset'])) {
-			$this->fck_setDefault();
+			$this->setDefault();
 			$this->SettingValueWrite('update');
 		} else if (isset($_POST['export_d3f'])) {
@@ -521,4 +618,5 @@
 		echo		'<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n" ;
 		echo			'<table class="form-table">'."\n";
+		echo				$this->viewer_type_option();
 		echo				$this->yes_no_radio_option('is_use_xoops_upload_path',
 												__('Media Upload Base Path','xpressme'),
@@ -539,5 +637,5 @@
 		echo 				$this->single_post_navi_option();
 		echo 				$this->posts_page_navi_option();
-
+		echo 				$this->excerpt_option();
 		
 		echo				$this->yes_no_radio_option('is_author_view_count',
