Index: trunk/wp-content/plugins/xpressme/xpressme_class.php
===================================================================
--- trunk/wp-content/plugins/xpressme/xpressme_class.php	(revision 143)
+++ 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',
