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 516)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 518)
@@ -8,6 +8,6 @@
 "Project-Id-Version: XPressME Plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-11-20 12:51+0900\n"
-"PO-Revision-Date: 2009-11-20 12:51+0900\n"
+"POT-Creation-Date: 2010-02-26 16:00+0900\n"
+"PO-Revision-Date: 2010-02-26 16:01+0900\n"
 "Last-Translator: toemon <info@toemon.com>\n"
 "Language-Team: toemon <info@toemon.com>\n"
@@ -43,113 +43,113 @@
 msgstr "モジュール管理へ"
 
-#: xpressme.php:164
+#: xpressme.php:159
 msgid "XPressME Display Setting"
 msgstr "XPressME 表示設定"
 
-#: xpressme.php:170
+#: xpressme.php:165
 msgid "Thema Sidebar Display"
 msgstr "テーマ表示時にサイドバー表示する。"
 
-#: xpressme.php:171
-#: xpressme.php:263
-#: xpressme.php:269
-#: xpressme.php:274
-#: xpressme.php:280
-#: xpressme_class.php:296
-#: xpressme_class.php:314
-#: xpressme_class.php:445
-#: xpressme_class.php:456
+#: xpressme.php:166
+#: xpressme.php:259
+#: xpressme.php:265
+#: xpressme.php:270
+#: xpressme.php:276
+#: xpressme_class.php:330
+#: xpressme_class.php:348
+#: xpressme_class.php:479
+#: xpressme_class.php:490
 msgid "YES"
 msgstr "はい"
 
-#: xpressme.php:172
-#: xpressme.php:264
-#: xpressme.php:270
-#: xpressme.php:275
-#: xpressme.php:281
-#: xpressme_class.php:297
-#: xpressme_class.php:315
-#: xpressme_class.php:446
-#: xpressme_class.php:457
+#: xpressme.php:167
+#: xpressme.php:260
+#: xpressme.php:266
+#: xpressme.php:271
+#: xpressme.php:277
+#: xpressme_class.php:331
+#: xpressme_class.php:349
+#: xpressme_class.php:480
+#: xpressme_class.php:491
 msgid "NO"
 msgstr "いいえ"
 
-#: xpressme.php:181
-#: xpressme.php:232
-#: xpressme.php:291
+#: xpressme.php:176
+#: xpressme.php:228
+#: xpressme.php:287
 msgid "Update Config"
 msgstr "更新"
 
-#: xpressme.php:182
-#: xpressme.php:233
-#: xpressme.php:292
+#: xpressme.php:177
+#: xpressme.php:229
+#: xpressme.php:288
 msgid "Preset Config"
 msgstr "プリセット"
 
-#: xpressme.php:214
+#: xpressme.php:210
 msgid "XPressME Integration Setting"
 msgstr "XPressME 統合設定"
 
-#: xpressme.php:218
+#: xpressme.php:214
 msgid "Media Upload Base Path"
 msgstr "メディアアップロードのベースパス設定"
 
-#: xpressme.php:222
+#: xpressme.php:218
 msgid "Use XOOPS UPLOAD PATH"
 msgstr "XOOPSのアップロードパスを使用する。"
 
-#: xpressme.php:223
+#: xpressme.php:219
 msgid "USE WordPress BASE_PATH"
 msgstr "WordPressのベースパスを使用する。"
 
-#: xpressme.php:257
+#: xpressme.php:253
 msgid "XPressME Other Setting"
 msgstr "XPressME その他の設定"
 
-#: xpressme.php:262
+#: xpressme.php:258
 msgid "The change tracking of the post is preserved"
 msgstr "投稿の変更履歴を有効にする。"
 
-#: xpressme.php:268
+#: xpressme.php:264
 msgid "Select Multi user mode"
 msgstr "マルチユーザーモードを選択"
 
-#: xpressme.php:273
+#: xpressme.php:269
 msgid "Is the posts author views counted?"
 msgstr "投稿者の閲覧をカウントしますか？"
 
-#: xpressme.php:279
+#: xpressme.php:275
 msgid "Is SQL debugging window displayed?"
 msgstr "SQLデバッグウィンドを表示しますか？"
 
-#: xpressme.php:284
+#: xpressme.php:280
 msgid "Select warning display of block file version check"
 msgstr "ブロックファイルのバージョンチェック時における警告表示"
 
-#: xpressme.php:285
+#: xpressme.php:281
 msgid "Do display"
 msgstr "表示する"
 
-#: xpressme.php:286
+#: xpressme.php:282
 msgid "Do not display"
 msgstr "表示しない"
 
 #: xpressme_class.php:61
-#: xpressme_class.php:243
+#: xpressme_class.php:277
 msgid "Older Post"
 msgstr "前の投稿へ"
 
 #: xpressme_class.php:62
-#: xpressme_class.php:246
+#: xpressme_class.php:280
 msgid "Newer Post"
 msgstr "次の投稿へ"
 
 #: xpressme_class.php:64
-#: xpressme_class.php:249
+#: xpressme_class.php:283
 msgid "Older Entries"
 msgstr "前ページへ"
 
 #: xpressme_class.php:65
-#: xpressme_class.php:252
+#: xpressme_class.php:286
 msgid "Newer Entries"
 msgstr "次ページへ"
@@ -157,274 +157,278 @@
 #: xpressme_class.php:79
 #: xpressme_class.php:80
-#: xpressme_class.php:255
+#: xpressme_class.php:289
 msgid "Read the rest of this entry &raquo;"
 msgstr "この投稿の続きを読む &raquo;"
 
-#: xpressme_class.php:356
+#: xpressme_class.php:390
 msgid "Single Post Navi Setting"
 msgstr "シングルポストナビの設定"
 
-#: xpressme_class.php:361
-#: xpressme_class.php:406
+#: xpressme_class.php:395
+#: xpressme_class.php:440
 msgid "Adjustment of Navi link display position"
 msgstr "リンクの表示位置設定"
 
-#: xpressme_class.php:364
+#: xpressme_class.php:398
 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right"
 msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示"
 
-#: xpressme_class.php:365
+#: xpressme_class.php:399
 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right"
 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示"
 
-#: xpressme_class.php:371
+#: xpressme_class.php:405
 msgid "Select Display name of PostNavi Link"
 msgstr "表示するリンクテキストを選択"
 
-#: xpressme_class.php:374
+#: xpressme_class.php:408
 msgid "Title of post"
 msgstr "投稿記事のタイトルを表示"
 
-#: xpressme_class.php:375
+#: xpressme_class.php:409
 msgid "Title of Navi"
 msgstr "ナビタイトルを表示"
 
-#: xpressme_class.php:381
+#: xpressme_class.php:415
 msgid "Display Navi Title of Old Post Link"
 msgstr "古い記事へのナビタイトルを設定"
 
-#: xpressme_class.php:388
+#: xpressme_class.php:422
 msgid "Display Navi Title of Newer Post Link"
 msgstr "より新しい記事へのナビタイトルを設定"
 
-#: xpressme_class.php:401
+#: xpressme_class.php:435
 msgid "Posts List Page Navi Setting"
 msgstr "ポストリストページナビの設定"
 
-#: xpressme_class.php:409
+#: xpressme_class.php:443
 msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right"
 msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示"
 
-#: xpressme_class.php:410
+#: xpressme_class.php:444
 msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right"
 msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示"
 
-#: xpressme_class.php:416
+#: xpressme_class.php:450
 msgid "Display Navi Title of Old Page Link"
 msgstr "古いページへのナビタイトルを設定"
 
-#: xpressme_class.php:423
+#: xpressme_class.php:457
 msgid "Display Navi Title of Newer Page Link"
 msgstr "より新しいページへのナビタイトルを設定"
 
-#: xpressme_class.php:436
+#: xpressme_class.php:470
 msgid "Dashboard feed Display Setting"
 msgstr "ダッシュボード　フィード表示設定"
 
-#: xpressme_class.php:442
+#: xpressme_class.php:476
 msgid "Display XPressMe Integration Kit Blog"
 msgstr "XPressME Integration Kit ブログを表示する。"
 
-#: xpressme_class.php:453
+#: xpressme_class.php:487
 msgid "Display XPressMe Integration Kit Forum"
 msgstr "XPressME Integration Kit フォーラムを表示する。"
 
-#: xpressme_class.php:471
+#: xpressme_class.php:505
 msgid "Role Setting at Login"
 msgstr "ログイン時の権限設定"
 
-#: xpressme_class.php:474
+#: xpressme_class.php:508
 msgid "XOOPS Groupe"
 msgstr "XOOPSグループ名"
 
-#: xpressme_class.php:474
+#: xpressme_class.php:508
 msgid "WordPress Role"
 msgstr "WordPressでの権限"
 
-#: xpressme_class.php:474
+#: xpressme_class.php:508
 msgid "Role is set at each login"
 msgstr "ログイン時、常に権限を更新する"
 
-#: xpressme_class.php:500
-#: xpressme_class.php:504
-#: xpressme_class.php:507
+#: xpressme_class.php:513
+msgid "module cannot be read"
+msgstr "モジュールアクセス権限なし"
+
+#: xpressme_class.php:545
+#: xpressme_class.php:549
+#: xpressme_class.php:552
 msgid "Default Role of WordPress"
 msgstr "WordPressのデフォルト権限"
 
-#: xpressme_class.php:501
-#: xpressme_class.php:505
-#: xpressme_class.php:508
+#: xpressme_class.php:546
+#: xpressme_class.php:550
+#: xpressme_class.php:553
 msgid "Group User Doesn't Register"
 msgstr "ユーザ登録しない"
 
-#: xpressme_class.php:521
+#: xpressme_class.php:566
 msgid "Only the Admin can set Group Role Setting"
 msgstr "管理者だけがグループ権限を設定できます。"
 
-#: xpressme_class.php:541
+#: xpressme_class.php:586
 msgid "WordPress MU cannot integrate the comments."
 msgstr "WordPress MUはコメント統合できません。"
 
-#: xpressme_class.php:543
+#: xpressme_class.php:588
 msgid "Do Not Comment Integration."
 msgstr "コメント統合しません。"
 
-#: xpressme_class.php:578
+#: xpressme_class.php:623
 msgid "Comment integration with D3Forum"
 msgstr "D3Forumとのコメント統合"
 
-#: xpressme_class.php:580
+#: xpressme_class.php:625
 msgid "Select the forum of D3Forum that does the comment integration from the following lists."
 msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。"
 
-#: xpressme_class.php:585
+#: xpressme_class.php:630
 msgid "Select the Type of display of D3Forum comment."
 msgstr "D3Forumの表示タイプを選択"
 
-#: xpressme_class.php:587
-#: xpressme_class.php:590
+#: xpressme_class.php:632
+#: xpressme_class.php:635
 msgid "Flat"
 msgstr "フラット"
 
-#: xpressme_class.php:588
-#: xpressme_class.php:591
+#: xpressme_class.php:633
+#: xpressme_class.php:636
 msgid "Threaded"
 msgstr "スレッド"
 
-#: xpressme_class.php:594
+#: xpressme_class.php:639
 msgid "Select the order of display of D3Forum comment."
 msgstr "D3Forumコメントの表示順を選択"
 
-#: xpressme_class.php:596
-#: xpressme_class.php:599
+#: xpressme_class.php:641
+#: xpressme_class.php:644
 msgid "DESC"
 msgstr "降順"
 
-#: xpressme_class.php:597
-#: xpressme_class.php:600
+#: xpressme_class.php:642
+#: xpressme_class.php:645
 msgid "ASC"
 msgstr "昇順"
 
-#: xpressme_class.php:603
+#: xpressme_class.php:648
 msgid "Number of displays of D3Forum comments."
 msgstr "D3Forumのコメント表示数"
 
-#: xpressme_class.php:606
+#: xpressme_class.php:651
 msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. "
 msgstr "WordPressコメントとD3Forumポスト間の一括転送（エクスポート・インポート）"
 
-#: xpressme_class.php:607
+#: xpressme_class.php:652
 msgid "Export to D3Forum"
 msgstr "D3Forumへ一括エクスポート"
 
-#: xpressme_class.php:608
+#: xpressme_class.php:653
 msgid "Import from D3Forum"
 msgstr "D3Forumから一括インポート"
 
-#: xpressme_class.php:621
+#: xpressme_class.php:666
 msgid "Contents Excerpt Setting"
 msgstr "記事抜粋の設定"
 
-#: xpressme_class.php:626
+#: xpressme_class.php:671
 msgid "Is the excerpt display done with the archive of contents?"
 msgstr "記事のアーカイブで抜粋表示を行いますか？"
 
-#: xpressme_class.php:633
+#: xpressme_class.php:678
 msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. "
 msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。"
 
-#: xpressme_class.php:640
+#: xpressme_class.php:685
 msgid "Excerpt length of word for ASCII contents"
 msgstr "ASCIIコンテンツの抜粋単語数"
 
-#: xpressme_class.php:647
+#: xpressme_class.php:692
 msgid "Excerpt length of character for multibyte contents"
 msgstr "マルチバイトコンテンツの抜粋文字数"
 
-#: xpressme_class.php:654
+#: xpressme_class.php:699
 msgid "This text is displayed in the link that reads contents not excerpted.(Is not displayed for the blank.)"
 msgstr "抜粋されていないコンテンツを読むためのリンクに表示されるテキスト(空白の場合リンクを表示しません)"
 
-#: xpressme_class.php:661
+#: xpressme_class.php:706
 msgid "This text is displayed in the link that more tag (&lt;!--more--&gt;). "
 msgstr "more タグ (&lt;!--more--&gt;)のリンクに表示されるテキスト"
 
-#: xpressme_class.php:673
+#: xpressme_class.php:718
 msgid "Display Mode Setting"
 msgstr "表示モード設定"
 
-#: xpressme_class.php:676
+#: xpressme_class.php:721
 msgid "Select the XPressME Display Mode."
 msgstr "XPressMEの表示モードの選択"
 
-#: xpressme_class.php:681
+#: xpressme_class.php:726
 msgid "Xoops Mode"
 msgstr "XOOPSモード"
 
-#: xpressme_class.php:685
+#: xpressme_class.php:730
 msgid "WordPress Mode"
 msgstr "WordPressモード"
 
-#: xpressme_class.php:689
+#: xpressme_class.php:734
 msgid "User select"
 msgstr "ユーザによる選択"
 
-#: xpressme_class.php:694
+#: xpressme_class.php:739
 msgid "Select the theme used in the XOOPS Mode."
 msgstr "XOOPSモードで使用するテーマを選択"
 
-#: xpressme_class.php:699
+#: xpressme_class.php:744
 msgid "Use WordPress Selected Themes"
 msgstr "WordPressで選択したテーマを使う"
 
-#: xpressme_class.php:717
+#: xpressme_class.php:762
 msgid "Header Meta Option"
 msgstr "ヘッダメタ　オプション"
 
-#: xpressme_class.php:722
+#: xpressme_class.php:767
 msgid "Select the Header keyword."
 msgstr "ヘッダで使用するキーワードの選択"
 
-#: xpressme_class.php:727
+#: xpressme_class.php:772
 msgid "Xoops KeyWord"
 msgstr "XOOPSのキーワード"
 
-#: xpressme_class.php:730
+#: xpressme_class.php:775
 msgid "WordPress KeyWord"
 msgstr "WordPressのキーワード"
 
-#: xpressme_class.php:733
+#: xpressme_class.php:778
 msgid "WordPress & Xoops KeyWord"
 msgstr "WordPressｊとXOOPSのキーワード"
 
-#: xpressme_class.php:739
+#: xpressme_class.php:784
 msgid "Select the Header Description."
 msgstr "ヘッダで使用するディスクリプション（説明）の選択"
 
-#: xpressme_class.php:744
+#: xpressme_class.php:789
 msgid "Xoops Description"
 msgstr "XOOPSのディスクリプション"
 
-#: xpressme_class.php:747
+#: xpressme_class.php:792
 msgid "WordPress Description"
 msgstr "WordPressのディスクリプション"
 
-#: xpressme_class.php:750
+#: xpressme_class.php:795
 msgid "WordPress & Xoops Description"
 msgstr "WordPressとXOOPSのディスクリプション"
 
-#: xpressme_class.php:756
+#: xpressme_class.php:801
 msgid "Select the Header Robots Index."
 msgstr "ヘッダで使用するロボットインデックスの選択"
 
-#: xpressme_class.php:761
+#: xpressme_class.php:806
 msgid "Xoops Robots Index"
 msgstr "XOOPSのロボットインデックス"
 
-#: xpressme_class.php:764
+#: xpressme_class.php:809
 msgid "WordPress Robots Index"
 msgstr "WordPressのロボットインデックス"
 
-#: xpressme_class.php:793
+#: xpressme_class.php:838
 #, php-format
 msgid "Unable to create directory %s. Is its parent directory writable by the server?"
@@ -498,81 +502,81 @@
 msgstr "%sのパーマリンク"
 
-#: include/custom_functions.php:429
-#: include/custom_functions.php:459
+#: include/custom_functions.php:431
+#: include/custom_functions.php:461
 #, php-format
 msgid "views :%d"
 msgstr "閲覧数 :%d"
 
-#: include/custom_functions.php:623
+#: include/custom_functions.php:625
 msgid "Main"
 msgstr "メイン"
 
-#: include/custom_functions.php:626
+#: include/custom_functions.php:628
 #, php-format
 msgid "Archive for the &#8216;%s&#8217; Category"
 msgstr "カテゴリー &#8216;%s&#8217; のアーカイブ"
 
-#: include/custom_functions.php:629
+#: include/custom_functions.php:631
 #, php-format
 msgid "Posts Tagged &#8216;%s&#8217;"
 msgstr "&#8216;%s&#8217; タグのついている投稿"
 
-#: include/custom_functions.php:632
+#: include/custom_functions.php:634
 #, php-format
 msgid "Archive for %s|Daily archive page"
 msgstr "%sの日別アーカイブ"
 
-#: include/custom_functions.php:632
+#: include/custom_functions.php:634
 msgid "F jS, Y"
 msgstr "Y年n月j日"
 
-#: include/custom_functions.php:634
+#: include/custom_functions.php:636
 #, php-format
 msgid "Archive for %s|Monthly archive page"
 msgstr "%sの月別アーカイブ"
 
-#: include/custom_functions.php:634
+#: include/custom_functions.php:636
 msgid "F, Y"
 msgstr "Y年n月"
 
-#: include/custom_functions.php:636
+#: include/custom_functions.php:638
 #, php-format
 msgid "Archive for %s|Yearly archive page"
 msgstr "%sの年別アーカイブ "
 
-#: include/custom_functions.php:636
+#: include/custom_functions.php:638
 msgid "Y"
 msgstr "Y年"
 
-#: include/custom_functions.php:639
+#: include/custom_functions.php:641
 #, php-format
 msgid "Archive for the &#8216;%s&#8217; Author"
 msgstr "投稿者 &#8216;%s&#8217; のアーカイブ"
 
-#: include/custom_functions.php:642
+#: include/custom_functions.php:644
 #, php-format
 msgid "Search Results of word &#8216;%s&#8217;"
 msgstr "&#8216;%s&#8217; の検索結果"
 
-#: include/custom_functions.php:648
 #: include/custom_functions.php:650
+#: include/custom_functions.php:652
 #, php-format
 msgid "Article of %s"
 msgstr "%sの記事"
 
-#: include/custom_functions.php:672
+#: include/custom_functions.php:674
 #, php-format
 msgid "From %1$s on site %2$s"
 msgstr "サイト %2$s の %1$s より"
 
-#: include/custom_functions.php:693
+#: include/custom_functions.php:695
 msgid "No Trackback/Pingback"
 msgstr "トラックバック・ピンバックはありません"
 
-#: include/custom_functions.php:694
+#: include/custom_functions.php:696
 msgid "One Trackback/Pingback"
 msgstr "トラックバック・ピンバック 1 件"
 
-#: include/custom_functions.php:695
+#: include/custom_functions.php:697
 msgid "% TrackBack/Pingback"
 msgstr "トラックバック・ピンバック % 件"
@@ -620,5 +624,5 @@
 msgstr "WordPressモードへ切替"
 
-#: include/xpress_common_functions.php:390
+#: include/xpress_common_functions.php:382
 #, php-format
 msgid "Block file %1$s is an old version %2$s.<br />used block file %3$s of new version %4$s."
@@ -629,54 +633,56 @@
 msgstr "XPressME アップグレード"
 
-#: include/xpress_upgrade.php:28
+#: include/xpress_upgrade.php:27
 #, php-format
 msgid "You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href=\"%2$s\">stay updated</a>."
 msgstr "お使いの XPressME Integration Kit は開発版 (%1$s) です。すばらしい ! どうぞ<a href=\"%2$s\">最新版を使い続けてください</a>。"
 
-#: include/xpress_upgrade.php:32
+#: include/xpress_upgrade.php:31
 msgid "There is a new version of XPressME Integration Kit available for upgrade"
 msgstr "新しいバージョンの XPressME Integration Kit にアップグレードが可能です"
 
-#: include/xpress_upgrade.php:35
+#: include/xpress_upgrade.php:33
 #, php-format
 msgid "You can upgrade to version %s download the package and install it manually:"
 msgstr "バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。"
 
-#: include/xpress_upgrade.php:38
-#: include/xpress_upgrade.php:61
+#: include/xpress_upgrade.php:36
+#: include/xpress_upgrade.php:60
 #, php-format
 msgid "Download %s"
 msgstr "%s をダウンロード"
 
-#: include/xpress_upgrade.php:43
+#: include/xpress_upgrade.php:41
+#: include/xpress_upgrade.php:68
 #, php-format
 msgid "You can download the differential file from version %s to %s and upgrade it manually:"
 msgstr "バージョン%sから%sへの差分ファイルをダウンロードし、手動でアップグレードすることができます："
 
-#: include/xpress_upgrade.php:46
+#: include/xpress_upgrade.php:44
+#: include/xpress_upgrade.php:71
 #, php-format
 msgid "Download differential file for %s"
 msgstr "%sの差分ファイルをダウンロード"
 
-#: include/xpress_upgrade.php:50
+#: include/xpress_upgrade.php:48
 msgid "You have the latest version of XPressME Integration Kit. You do not need to upgrade"
 msgstr "最新バージョンの XPressME Integration Kit をご利用中です。アップグレードの必要はありません。"
 
-#: include/xpress_upgrade.php:58
+#: include/xpress_upgrade.php:57
 #, php-format
 msgid "You can use the development version %s download the package and install it manually:"
 msgstr "開発バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。"
 
-#: include/xpress_upgrade.php:67
+#: include/xpress_upgrade.php:78
 #, php-format
 msgid "There is no response from <a href=\"%s\">version check API</a> now. sorry, please confirm it after."
 msgstr "現在、<a href=\"%s\">version check API</a>からのレスポンスがありません。　申し訳ありませんが、しばらく後で確認してください。"
 
-#: include/xpress_upgrade.php:212
+#: include/xpress_upgrade.php:235
 #, php-format
 msgid "XPressME Integration Kit Version %1$s is available! <a href=\"%2$s\">Please update now</a>."
 msgstr "XPressME Integration Kit Version %1$s が利用可能です ! <a href=\"%2$s\">アップデートしてください</a>。"
 
-#: include/xpress_upgrade.php:214
+#: include/xpress_upgrade.php:237
 #, php-format
 msgid "XPressME Integration Kit Version %1$s is available! Please notify the site administrator."
Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 516)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php	(revision 518)
@@ -205,4 +205,5 @@
 		} 		
 		
+		$xpress_config->GroupeRoleCheck();
 		echo	'<div class="wrap">'."\n";
 		echo		'<div id="icon-options-general" class="icon32"><br /></div>'."\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 516)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php	(revision 518)
@@ -158,59 +158,94 @@
  		global $xoops_db;
 		
-		// table sync
 		$table = get_wp_prefix() . 'group_role';
-		$xoops_group = get_xoops_prefix() . 'groups';
-		$xoops_group_permission = get_xoops_prefix() . 'group_permission';
+		
+		$sql=  "SELECT * FROM $table";
+		$this->groupe_role =  $xoops_db->get_results($sql);
+	}
+
+	function GroupeRoleCheck() {
+ 		global $xoops_db;
 		
 		$module_id = get_xpress_modid();
 		
-		$sql=  "SELECT * FROM $table";
-		$before_groupes = $xoops_db->get_results($sql);
-		
-		$sql = "DELETE FROM $table";
-		$xoops_db->query($sql);
-		
-		$sql =  "SELECT *  FROM $xoops_group_permission WHERE gperm_itemid = $module_id";
+		$group_role_table = get_wp_prefix() . 'group_role';
+		$xoops_group_table = get_xoops_prefix() . 'groups';
+		$xoops_group_permission_table = get_xoops_prefix() . 'group_permission';
+		
+
+		
+		$sql =  "SELECT *  FROM $xoops_group_permission_table WHERE gperm_itemid = $module_id";
 		$gperms = $xoops_db->get_results($sql);
 		
-		$sql =  "SELECT * FROM $xoops_group WHERE group_type <> 'Anonymous'";
+		$sql =  "SELECT * FROM $xoops_group_table WHERE group_type <> 'Anonymous'";
 		$groupes = $xoops_db->get_results($sql);
-		$insert_sql = '';
+
+		// list of groups registered with XOOPS
+		$xoops_groupid_list = '';
 		foreach ($groupes as $groupe) {
-			$parmsql =  "SELECT *  FROM $xoops_group_permission WHERE gperm_itemid = $module_id AND gperm_groupid = $groupe->groupid";
-			$gperms = $xoops_db->get_results($parmsql);
-			$parmission = '';
+			if (!empty($xoops_groupid_list)) $xoops_groupid_list .= ',';
+			$xoops_groupid_list .= $groupe->groupid;
+		}
+		
+		// delete the group deleted by the XOOPS group from a group role database
+		if (!empty($xoops_groupid_list)){
+			$del_sql = "DELETE FROM $group_role_table WHERE groupid NOT IN ($xoops_groupid_list)";
+			$xoops_db->query($del_sql);
+		}
+		
+		$sql =  "SELECT *  FROM $group_role_table";
+		$groupes_role = $xoops_db->get_results($sql);
+		
+		foreach ($groupes as $groupe) {
+			//get group parmission
+			$group_type = '';
 			foreach ($gperms as $gperm) {
+				if ($gperm->gperm_groupid == $groupe->groupid){
+					$group_type = $gperm->gperm_name;
+					if ($group_type == 'module_admin') break;
+				}
+			}
+			if (empty($group_type)) $group_type = 'module_inhibit';
+			
+			$found = false;
+			foreach ($groupes_role as $groupe_role) {
+				if ($groupe_role->groupid == $groupe->groupid){
+					$role = $groupe_role->role;
+					if ($group_type == 'module_admin') $role = 'administrator';
+					if ($group_type == 'module_inhibit') $role = '';
+					$edit_sql = "UPDATE $group_role_table SET group_type='$group_type',role='$role' WHERE groupid = $groupe->groupid";
+					$found = true;
+					break;
+				}
+			}
+			if(!$found){
+				$role = '';
+				if ($group_type == 'module_admin') $role = 'administrator';
+
+				$edit_sql  = "INSERT INTO  $group_role_table ";
+				$edit_sql .= "(groupid , name , description , group_type , role , login_all) ";
+				$edit_sql .= "VALUES (";
+				$edit_sql .= $groupe->groupid . ', ';
+				$edit_sql .= "'" . $groupe->name . "' , ";
+				$edit_sql .= "'" . $groupe->description . "' , ";
+				$edit_sql .= "'" . $parmission . "' , ";
+				$edit_sql .= "'" . $role . "' , '";
+				$edit_sql .= $login_all . "')";
+			}
+			$xoops_db->query($edit_sql);
+		}
+		$this->GroupeRoleRead();
+	}
+	
+	function get_groupe_perm_for_modules($module_id ,$group_id)
+	{
+		$parmsql =  "SELECT *  FROM $xoops_group_permission WHERE gperm_itemid = $module_id AND gperm_groupid = $group_id";
+		$gperms = $xoops_db->get_results($parmsql);
+		$parmission = '';
+		foreach ($gperms as $gperm) {
 				$parmission = $gperm->gperm_name;
 				if ($parmission == 'module_admin') break;
-			}
-			
-			if (!empty($parmission)){
-				$role = ''; 
-				foreach ($before_groupes as $before_groupe) {
-					if ($groupe->groupid == $before_groupe->groupid) {
-						$role = $before_groupe->role;
-						$login_all = $before_groupe->login_all;
-					}
-				}
-				if ($parmission == 'module_admin') $role = 'administrator';
-				
-				$insert_sql  = "INSERT INTO  $table ";
-				$insert_sql .= "(groupid , name , description , group_type , role , login_all) ";
-				$insert_sql .= "VALUES (";
-				$insert_sql .= $groupe->groupid . ', ';
-				$insert_sql .= "'" . $groupe->name . "' , ";
-				$insert_sql .= "'" . $groupe->description . "' , ";
-				$insert_sql .= "'" . $parmission . "' , ";
-				$insert_sql .= "'" . $role . "' , '";
-				$insert_sql .= $login_all . "')";
-				$xoops_db->query($insert_sql);
-			}
-		}
-		
-		$sql=  "SELECT * FROM $table";
-		
-		$this->groupe_role =  $xoops_db->get_results($sql);
-			$sql=  "SELECT * FROM $table";	
+		}
+		return $parmission;
 	}
 	
@@ -474,4 +509,11 @@
 		$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) {
+			if ($groupe->group_type == 'module_inhibit'){
+				$form .= "<tr>";
+				$form .= "<td> $groupe->name </td>";
+				$form .= "<td>" .  __('module cannot be read', 'xpressme') . "</td>";
+				$form .= "</tr>\n";	
+				continue;
+			}
 			$form .= "<tr>";
 			$form .= "<td> $groupe->name </td>";
