Index: trunk/wp-content/plugins/xpressme/language/xpressme-ja.po
===================================================================
--- trunk/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 79)
+++ trunk/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 81)
@@ -3,5 +3,5 @@
 "Project-Id-Version: XPressME Plugin\n"
 "POT-Creation-Date: \n"
-"PO-Revision-Date: 2009-01-31 10:14+0900\n"
+"PO-Revision-Date: 2009-01-31 22:42+0900\n"
 "Last-Translator: toemon <toychee@toemon.com>\n"
 "Language-Team: \n"
@@ -20,113 +20,120 @@
 
 #: xpressme_class.php:47
-#: xpressme_class.php:133
+#: xpressme_class.php:139
 msgid "to Old Post"
 msgstr "前の投稿へ"
 
 #: xpressme_class.php:48
-#: xpressme_class.php:135
+#: xpressme_class.php:141
 msgid "to Newer Post"
 msgstr "次の投稿へ"
 
-#: xpressme_class.php:141
-#: xpressme_class.php:276
-#: xpressme_class.php:281
-#: xpressme_class.php:302
+#: xpressme_class.php:167
+#: xpressme_class.php:280
+#: xpressme_class.php:285
+#: xpressme_class.php:306
 msgid "YES"
 msgstr "はい"
 
-#: xpressme_class.php:142
-#: xpressme_class.php:277
-#: xpressme_class.php:282
-#: xpressme_class.php:303
+#: xpressme_class.php:168
+#: xpressme_class.php:281
+#: xpressme_class.php:286
+#: xpressme_class.php:307
 msgid "NO"
 msgstr "いいえ"
 
-#: xpressme_class.php:186
+#: xpressme_class.php:208
 msgid "Role Setting at Login"
 msgstr "ログイン時の権限設定"
 
-#: xpressme_class.php:189
+#: xpressme_class.php:211
 msgid "XOOPS Groupe"
 msgstr "XOOPSグループ名"
 
-#: xpressme_class.php:189
+#: xpressme_class.php:211
 msgid "WordPress Role"
 msgstr "WordPressでの権限"
 
-#: xpressme_class.php:189
-msgid "Only First Login"
-msgstr "最初のログイン時のみ"
+#: xpressme_class.php:211
+msgid "Role is set at each login"
+msgstr "ログイン時、常に権限を更新する"
 
-#: xpressme_class.php:210
-#: xpressme_class.php:212
-msgid "&mdash; No role for this blog &mdash;"
-msgstr "&mdash; このブログでの権限なし &mdash;"
+#: xpressme_class.php:232
+#: xpressme_class.php:236
+#: xpressme_class.php:239
+msgid "Default Role of WordPress"
+msgstr "WordPressのデフォルト権限"
 
-#: xpressme_class.php:266
+#: xpressme_class.php:233
+#: xpressme_class.php:237
+#: xpressme_class.php:240
+msgid "Group User Doesn't Register"
+msgstr "ユーザ登録しない"
+
+#: xpressme_class.php:270
 msgid "XPressME Configuration Page"
 msgstr "XPressMEの設定ページ"
 
-#: xpressme_class.php:270
+#: xpressme_class.php:274
 msgid "Media Upload Base Path"
 msgstr "メディアアップロードのベースパス設定"
 
-#: xpressme_class.php:271
+#: xpressme_class.php:275
 msgid "Use XOOPS UPLOAD PATH"
 msgstr "XOOPSのアップロードパスを使用する。"
 
-#: xpressme_class.php:272
+#: xpressme_class.php:276
 msgid "USE WordPress BASE_PATH"
 msgstr "WordPressのベースパスを使用する。"
 
-#: xpressme_class.php:275
+#: xpressme_class.php:279
 msgid "Thema Sidebar Display"
 msgstr "テーマ表示時にサイドバー表示する。"
 
-#: xpressme_class.php:280
+#: xpressme_class.php:284
 msgid "The change tracking of the post is preserved"
 msgstr "投稿の変更履歴を有効にする。"
 
-#: xpressme_class.php:285
+#: xpressme_class.php:289
 msgid "Display Navi Title of Old Post Link"
 msgstr "古い記事へのナビタイトルを設定"
 
-#: xpressme_class.php:288
+#: xpressme_class.php:292
 msgid "Display Navi Title of Newer Post Link"
 msgstr "新しい記事へのナビタイトルを設定"
 
-#: xpressme_class.php:291
+#: xpressme_class.php:295
 msgid "Select Display name of PostNavi Link"
 msgstr "投稿記事リンクナビのタイトル設定"
 
-#: xpressme_class.php:292
+#: xpressme_class.php:296
 msgid "Title of post"
 msgstr "投稿記事のタイトルを表示"
 
-#: xpressme_class.php:293
+#: xpressme_class.php:297
 msgid "Title of Navi"
 msgstr "ナビタイトルを表示"
 
-#: xpressme_class.php:296
+#: xpressme_class.php:300
 msgid "Adjustment of Navi link display position"
 msgstr "投稿記事ナビリンクの表示位置設定"
 
-#: xpressme_class.php:297
+#: xpressme_class.php:301
 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right"
 msgstr "古い記事へのリンクを左に、より新しい記事へのリンクを右に表示"
 
-#: xpressme_class.php:298
+#: xpressme_class.php:302
 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right"
 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示"
 
-#: xpressme_class.php:301
+#: xpressme_class.php:305
 msgid "Is the posts author views counted?"
 msgstr "投稿者の閲覧をカウントしますか？"
 
-#: xpressme_class.php:310
+#: xpressme_class.php:314
 msgid "Update Config"
 msgstr "更新"
 
-#: xpressme_class.php:311
+#: xpressme_class.php:315
 msgid "Preset Config"
 msgstr "プリセット"
Index: trunk/wp-content/plugins/xpressme/xpressme_class.php
===================================================================
--- trunk/wp-content/plugins/xpressme/xpressme_class.php	(revision 79)
+++ trunk/wp-content/plugins/xpressme/xpressme_class.php	(revision 81)
@@ -62,4 +62,6 @@
 			}
 		}
+		if (!empty($xoops_db))	// at install trap
+			$this->GroupeRoleRead();
 	}
 	
@@ -103,9 +105,12 @@
 			$role = '';
 			foreach ($before_groupes as $before_groupe) {
-				if ($groupe->groupid == $before_groupe->groupid) $role = $before_groupe->role;
+				if ($groupe->groupid == $before_groupe->groupid) {
+					$role = $before_groupe->role;
+					$login_all = $before_groupe->login_all;
+				}
 			}
 			
 			$insert_sql  = "INSERT INTO  $table ";
-			$insert_sql .= "(groupid , name , description , group_type , role) ";
+			$insert_sql .= "(groupid , name , description , group_type , role , login_all) ";
 			$insert_sql .= "VALUES (";
 			$insert_sql .= $groupe->groupid . ', ';
@@ -113,5 +118,6 @@
 			$insert_sql .= "'" . $groupe->description . "' , ";
 			$insert_sql .= "'" . $groupe->group_type . "' , ";
-			$insert_sql .= "'" . $role . "')";
+			$insert_sql .= "'" . $role . "' , ";
+			$insert_sql .= $login_all . ")";
 			$xoops_db->query($insert_sql);
 		}
@@ -136,4 +142,24 @@
 		$this->is_author_view_count = stripslashes(trim($_POST['ch_is_author_view_count']));
 		
+		global $xoops_db;
+		$table = get_wp_prefix() . 'group_role';	
+//		$sql=  "SELECT * FROM $table";	
+//		$this->groupe_role =  $xoops_db->get_results($sql);  // before Read
+		
+		foreach ($this->groupe_role as $groupe) {
+			$post_name = 'role_gid_' . $groupe->groupid;
+			$role = stripslashes(trim($_POST[$post_name]));
+			$post_name = 'login_all_gid_' . $groupe->groupid;
+			$login_all = stripslashes(trim($_POST[$post_name]));
+			if (empty($login_all)) $login_all = '0';
+			$groupe->role = $role;
+			$groupe->login_all = $login_all;
+			$update_sql  = "UPDATE  $table ";
+			$update_sql .= 'SET ';
+			$update_sql .= "role  = '$role' , ";
+			$update_sql .= "login_all  = $login_all ";
+			$update_sql .= "WHERE (groupid = '$groupe->groupid' )";
+			$xoops_db->query($update_sql);			
+		}
 	}
 	
@@ -178,8 +204,4 @@
 	function groupe_role_option(){
 		global $wp_roles , $xoops_db;
-		$this->GroupeRoleRead();
-//		$table = get_xoops_prefix() . 'groups';
-//		$sql=  "SELECT * FROM $table WHERE group_type <> 'Anonymous'";
-//		$groupes = array_diff($this->$groupe_role,array());
 		
 		$form = '';
@@ -187,5 +209,5 @@
 		$form .= '<td>';
 		$form .= "<table>\n";
-		$form .= '<tr><td>' . __('XOOPS Groupe', 'xpressme') . '</td><td>' . __('WordPress Role', 'xpressme') . '</td><td>' . __('Only First Login', 'xpressme') . "</td></tr>\n";
+		$form .= '<tr><td>' . __('XOOPS Groupe', 'xpressme') . '</td><td>' . __('WordPress Role', 'xpressme') . '</td><td>' . __('Role is set at each login', 'xpressme') . "</td></tr>\n";
 		foreach ($this->groupe_role as $groupe) {
 			$form .= "<tr>";
@@ -207,9 +229,23 @@
 				$role_list .= "<option value=\"{$role}\"{$selected}>{$name}</option>\n";
 			}
-			if ( $group_has_role )
-				$role_list .= '<option value="">' . __('&mdash; No role for this blog &mdash;', 'xpressme') . "</option>\n";
-			else
-				$role_list .= '<option value="" selected="selected">' . __('&mdash; No role for this blog &mdash;', 'xpressme') . "</option>\n";
-			$form .= $role_list . "</select>\n</td></tr>\n";
+			if ( $group_has_role ) {
+				$role_list .= '<option value="default">' . __('Default Role of WordPress', 'xpressme') . "</option>\n";
+				$role_list .= '<option value="">' . __('Group User Doesn\'t Register', 'xpressme') . "</option>\n";
+			} else {
+				if ($select_value == 'default'){
+					$role_list .= '<option value="default" selected="selected">' . __('Default Role of WordPress', 'xpressme') . "</option>\n";	
+					$role_list .= '<option value="">' . __('Group User Doesn\'t Register', 'xpressme') . "</option>\n";
+				} else {
+					$role_list .= '<option value="default">' . __('Default Role of WordPress', 'xpressme') . "</option>\n";					
+					$role_list .= '<option value="" selected="selected">' . __('Group User Doesn\'t Register', 'xpressme') . "</option>\n";
+				}
+			}
+			$form .= $role_list . "</select>\n</td>";
+			if ($groupe->login_all){
+				$form .= '<td> <input type="checkbox" name="login_all_gid_' . $groupe->groupid . '" value="1" checked ></td>';
+			} else {
+				$form .= '<td> <input type="checkbox" name="login_all_gid_' . $groupe->groupid . '" value="1"></td>';
+			}
+			$form .= "</tr>\n";	
 		}
 		$form .= "</table></td></tr>\n";
@@ -220,37 +256,5 @@
 	function option_page()
 	{
-/*
-$script = <<< _TAB_
-<script type="text/javascript">
-$(function() {
-$('#jqtab-example2 > ul').tabs({fxFade:true,fxSpeed:'fast'});
-});
-</script>
-  
-<div id="jqtab-example2">
-<ul>
-<li><a href="#tab2-1"><span>JavaScript</span></a></li>
-<li><a href="#tab2-2"><span>Document</span></a></li>
-<li><a href="#tab2-3"><span>Links</span></a></li>
-</ul>
-
-<div id="tab2-1">
-$('#jqtab-example1 > ul')<br>
-.tabs({ fxFade: true, fxSpeed: 'fast' });
-</div>
-
-<div id="tab2-2">
-�E��E��E�\�E�b�E�htabs�E�̈��E��E�A�E�t�E�F�E�C�E�h�E�G�E�t�E�F�E�N�E�gfxFade�E�ƃG�E�t�E�F�E�N�E�g�E�X�E�s�E�[�E�hfxSpeed
-     ("slow", "normal", "fast" ,�E�܂��E�̓~�E��E��E�b) �E��E�w�E�肵�E�Ă��E�܂��E�B
-</div>
-
-<div id="tab2-3">
-     �E�\�E�[�E�X
-    </div>
-  </div>;
-_TAB_;
-
-		echo $script;
-*/	
+
 		if (!empty($_POST['submit_update'])) {
 			$this->ReadPostData();
