XPressME Integration Kit

Trac

Changeset 81


Ignore:
Timestamp:
Jan 31, 2009, 10:48:11 PM (15 years ago)
Author:
toemon
Message:

r76 の続き 
XOOPSグループに対する権限設定でログイン毎に権限を更新するか、初回ログイン時のみ設定するかを選択できるようにした。
権限の選択に「WordPressのデフォルト権限」を追加

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/oninstall.php

    r80 r81  
    132132                group_type varchar(10)  NOT NULL default '' , 
    133133                role varchar(20)  NOT NULL default '' , 
     134                login_all smallint(5) unsigned NOT NULL default '0' , 
    134135                KEY groupid (groupid) 
    135136                )$charset_collate;"; 
  • trunk/include/onupdate.php

    r80 r81  
    123123                        group_type varchar(10)  NOT NULL default '' , 
    124124                        role varchar(20)  NOT NULL default '' , 
     125                        login_all smallint(5) unsigned NOT NULL default '0' , 
    125126                        KEY groupid (groupid) 
    126127                        )$charset_collate;"; 
  • trunk/wp-content/plugins/xpressme/language/xpressme-ja.po

    r79 r81  
    33"Project-Id-Version: XPressME Plugin\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2009-01-31 10:14+0900\n" 
     5"PO-Revision-Date: 2009-01-31 22:42+0900\n" 
    66"Last-Translator: toemon <toychee@toemon.com>\n" 
    77"Language-Team: \n" 
     
    2020 
    2121#: xpressme_class.php:47 
    22 #: xpressme_class.php:133 
     22#: xpressme_class.php:139 
    2323msgid "to Old Post" 
    2424msgstr "前の投稿へ" 
    2525 
    2626#: xpressme_class.php:48 
    27 #: xpressme_class.php:135 
     27#: xpressme_class.php:141 
    2828msgid "to Newer Post" 
    2929msgstr "次の投稿へ" 
    3030 
    31 #: xpressme_class.php:141 
    32 #: xpressme_class.php:276 
    33 #: xpressme_class.php:281 
    34 #: xpressme_class.php:302 
     31#: xpressme_class.php:167 
     32#: xpressme_class.php:280 
     33#: xpressme_class.php:285 
     34#: xpressme_class.php:306 
    3535msgid "YES" 
    3636msgstr "はい" 
    3737 
    38 #: xpressme_class.php:142 
    39 #: xpressme_class.php:277 
    40 #: xpressme_class.php:282 
    41 #: xpressme_class.php:303 
     38#: xpressme_class.php:168 
     39#: xpressme_class.php:281 
     40#: xpressme_class.php:286 
     41#: xpressme_class.php:307 
    4242msgid "NO" 
    4343msgstr "いいえ" 
    4444 
    45 #: xpressme_class.php:186 
     45#: xpressme_class.php:208 
    4646msgid "Role Setting at Login" 
    4747msgstr "ログイン時の権限設定" 
    4848 
    49 #: xpressme_class.php:189 
     49#: xpressme_class.php:211 
    5050msgid "XOOPS Groupe" 
    5151msgstr "XOOPSグループ名" 
    5252 
    53 #: xpressme_class.php:189 
     53#: xpressme_class.php:211 
    5454msgid "WordPress Role" 
    5555msgstr "WordPressでの権限" 
    5656 
    57 #: xpressme_class.php:189 
    58 msgid "Only First Login" 
    59 msgstr "最初のログイン時のみ" 
     57#: xpressme_class.php:211 
     58msgid "Role is set at each login" 
     59msgstr "ログイン時、常に権限を更新する" 
    6060 
    61 #: xpressme_class.php:210 
    62 #: xpressme_class.php:212 
    63 msgid "&mdash; No role for this blog &mdash;" 
    64 msgstr "&mdash; このブログでの権限なし &mdash;" 
     61#: xpressme_class.php:232 
     62#: xpressme_class.php:236 
     63#: xpressme_class.php:239 
     64msgid "Default Role of WordPress" 
     65msgstr "WordPressのデフォルト権限" 
    6566 
    66 #: xpressme_class.php:266 
     67#: xpressme_class.php:233 
     68#: xpressme_class.php:237 
     69#: xpressme_class.php:240 
     70msgid "Group User Doesn't Register" 
     71msgstr "ユーザ登録しない" 
     72 
     73#: xpressme_class.php:270 
    6774msgid "XPressME Configuration Page" 
    6875msgstr "XPressMEの設定ページ" 
    6976 
    70 #: xpressme_class.php:270 
     77#: xpressme_class.php:274 
    7178msgid "Media Upload Base Path" 
    7279msgstr "メディアアップロードのベースパス設定" 
    7380 
    74 #: xpressme_class.php:271 
     81#: xpressme_class.php:275 
    7582msgid "Use XOOPS UPLOAD PATH" 
    7683msgstr "XOOPSのアップロードパスを使用する。" 
    7784 
    78 #: xpressme_class.php:272 
     85#: xpressme_class.php:276 
    7986msgid "USE WordPress BASE_PATH" 
    8087msgstr "WordPressのベースパスを使用する。" 
    8188 
    82 #: xpressme_class.php:275 
     89#: xpressme_class.php:279 
    8390msgid "Thema Sidebar Display" 
    8491msgstr "テーマ表示時にサイドバー表示する。" 
    8592 
    86 #: xpressme_class.php:280 
     93#: xpressme_class.php:284 
    8794msgid "The change tracking of the post is preserved" 
    8895msgstr "投稿の変更履歴を有効にする。" 
    8996 
    90 #: xpressme_class.php:285 
     97#: xpressme_class.php:289 
    9198msgid "Display Navi Title of Old Post Link" 
    9299msgstr "古い記事へのナビタイトルを設定" 
    93100 
    94 #: xpressme_class.php:288 
     101#: xpressme_class.php:292 
    95102msgid "Display Navi Title of Newer Post Link" 
    96103msgstr "新しい記事へのナビタイトルを設定" 
    97104 
    98 #: xpressme_class.php:291 
     105#: xpressme_class.php:295 
    99106msgid "Select Display name of PostNavi Link" 
    100107msgstr "投稿記事リンクナビのタイトル設定" 
    101108 
    102 #: xpressme_class.php:292 
     109#: xpressme_class.php:296 
    103110msgid "Title of post" 
    104111msgstr "投稿記事のタイトルを表示" 
    105112 
    106 #: xpressme_class.php:293 
     113#: xpressme_class.php:297 
    107114msgid "Title of Navi" 
    108115msgstr "ナビタイトルを表示" 
    109116 
    110 #: xpressme_class.php:296 
     117#: xpressme_class.php:300 
    111118msgid "Adjustment of Navi link display position" 
    112119msgstr "投稿記事ナビリンクの表示位置設定" 
    113120 
    114 #: xpressme_class.php:297 
     121#: xpressme_class.php:301 
    115122msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right" 
    116123msgstr "古い記事へのリンクを左に、より新しい記事へのリンクを右に表示" 
    117124 
    118 #: xpressme_class.php:298 
     125#: xpressme_class.php:302 
    119126msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right" 
    120127msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示" 
    121128 
    122 #: xpressme_class.php:301 
     129#: xpressme_class.php:305 
    123130msgid "Is the posts author views counted?" 
    124131msgstr "投稿者の閲覧をカウントしますか?" 
    125132 
    126 #: xpressme_class.php:310 
     133#: xpressme_class.php:314 
    127134msgid "Update Config" 
    128135msgstr "更新" 
    129136 
    130 #: xpressme_class.php:311 
     137#: xpressme_class.php:315 
    131138msgid "Preset Config" 
    132139msgstr "プリセット" 
  • trunk/wp-content/plugins/xpressme/xpressme_class.php

    r79 r81  
    6262                        } 
    6363                } 
     64                if (!empty($xoops_db))  // at install trap 
     65                        $this->GroupeRoleRead(); 
    6466        } 
    6567         
     
    103105                        $role = ''; 
    104106                        foreach ($before_groupes as $before_groupe) { 
    105                                 if ($groupe->groupid == $before_groupe->groupid) $role = $before_groupe->role; 
     107                                if ($groupe->groupid == $before_groupe->groupid) { 
     108                                        $role = $before_groupe->role; 
     109                                        $login_all = $before_groupe->login_all; 
     110                                } 
    106111                        } 
    107112                         
    108113                        $insert_sql  = "INSERT INTO  $table "; 
    109                         $insert_sql .= "(groupid , name , description , group_type , role) "; 
     114                        $insert_sql .= "(groupid , name , description , group_type , role , login_all) "; 
    110115                        $insert_sql .= "VALUES ("; 
    111116                        $insert_sql .= $groupe->groupid . ', '; 
     
    113118                        $insert_sql .= "'" . $groupe->description . "' , "; 
    114119                        $insert_sql .= "'" . $groupe->group_type . "' , "; 
    115                         $insert_sql .= "'" . $role . "')"; 
     120                        $insert_sql .= "'" . $role . "' , "; 
     121                        $insert_sql .= $login_all . ")"; 
    116122                        $xoops_db->query($insert_sql); 
    117123                } 
     
    136142                $this->is_author_view_count = stripslashes(trim($_POST['ch_is_author_view_count'])); 
    137143                 
     144                global $xoops_db; 
     145                $table = get_wp_prefix() . 'group_role';         
     146//              $sql=  "SELECT * FROM $table";   
     147//              $this->groupe_role =  $xoops_db->get_results($sql);  // before Read 
     148                 
     149                foreach ($this->groupe_role as $groupe) { 
     150                        $post_name = 'role_gid_' . $groupe->groupid; 
     151                        $role = stripslashes(trim($_POST[$post_name])); 
     152                        $post_name = 'login_all_gid_' . $groupe->groupid; 
     153                        $login_all = stripslashes(trim($_POST[$post_name])); 
     154                        if (empty($login_all)) $login_all = '0'; 
     155                        $groupe->role = $role; 
     156                        $groupe->login_all = $login_all; 
     157                        $update_sql  = "UPDATE  $table "; 
     158                        $update_sql .= 'SET '; 
     159                        $update_sql .= "role  = '$role' , "; 
     160                        $update_sql .= "login_all  = $login_all "; 
     161                        $update_sql .= "WHERE (groupid = '$groupe->groupid' )"; 
     162                        $xoops_db->query($update_sql);                   
     163                } 
    138164        } 
    139165         
     
    178204        function groupe_role_option(){ 
    179205                global $wp_roles , $xoops_db; 
    180                 $this->GroupeRoleRead(); 
    181 //              $table = get_xoops_prefix() . 'groups'; 
    182 //              $sql=  "SELECT * FROM $table WHERE group_type <> 'Anonymous'"; 
    183 //              $groupes = array_diff($this->$groupe_role,array()); 
    184206                 
    185207                $form = ''; 
     
    187209                $form .= '<td>'; 
    188210                $form .= "<table>\n"; 
    189                 $form .= '<tr><td>' . __('XOOPS Groupe', 'xpressme') . '</td><td>' . __('WordPress Role', 'xpressme') . '</td><td>' . __('Only First Login', 'xpressme') . "</td></tr>\n"; 
     211                $form .= '<tr><td>' . __('XOOPS Groupe', 'xpressme') . '</td><td>' . __('WordPress Role', 'xpressme') . '</td><td>' . __('Role is set at each login', 'xpressme') . "</td></tr>\n"; 
    190212                foreach ($this->groupe_role as $groupe) { 
    191213                        $form .= "<tr>"; 
     
    207229                                $role_list .= "<option value=\"{$role}\"{$selected}>{$name}</option>\n"; 
    208230                        } 
    209                         if ( $group_has_role ) 
    210                                 $role_list .= '<option value="">' . __('&mdash; No role for this blog &mdash;', 'xpressme') . "</option>\n"; 
    211                         else 
    212                                 $role_list .= '<option value="" selected="selected">' . __('&mdash; No role for this blog &mdash;', 'xpressme') . "</option>\n"; 
    213                         $form .= $role_list . "</select>\n</td></tr>\n"; 
     231                        if ( $group_has_role ) { 
     232                                $role_list .= '<option value="default">' . __('Default Role of WordPress', 'xpressme') . "</option>\n"; 
     233                                $role_list .= '<option value="">' . __('Group User Doesn\'t Register', 'xpressme') . "</option>\n"; 
     234                        } else { 
     235                                if ($select_value == 'default'){ 
     236                                        $role_list .= '<option value="default" selected="selected">' . __('Default Role of WordPress', 'xpressme') . "</option>\n";      
     237                                        $role_list .= '<option value="">' . __('Group User Doesn\'t Register', 'xpressme') . "</option>\n"; 
     238                                } else { 
     239                                        $role_list .= '<option value="default">' . __('Default Role of WordPress', 'xpressme') . "</option>\n";                                  
     240                                        $role_list .= '<option value="" selected="selected">' . __('Group User Doesn\'t Register', 'xpressme') . "</option>\n"; 
     241                                } 
     242                        } 
     243                        $form .= $role_list . "</select>\n</td>"; 
     244                        if ($groupe->login_all){ 
     245                                $form .= '<td> <input type="checkbox" name="login_all_gid_' . $groupe->groupid . '" value="1" checked ></td>'; 
     246                        } else { 
     247                                $form .= '<td> <input type="checkbox" name="login_all_gid_' . $groupe->groupid . '" value="1"></td>'; 
     248                        } 
     249                        $form .= "</tr>\n";      
    214250                } 
    215251                $form .= "</table></td></tr>\n"; 
     
    220256        function option_page() 
    221257        { 
    222 /* 
    223 $script = <<< _TAB_ 
    224 <script type="text/javascript"> 
    225 $(function() { 
    226 $('#jqtab-example2 > ul').tabs({fxFade:true,fxSpeed:'fast'}); 
    227 }); 
    228 </script> 
    229    
    230 <div id="jqtab-example2"> 
    231 <ul> 
    232 <li><a href="#tab2-1"><span>JavaScript</span></a></li> 
    233 <li><a href="#tab2-2"><span>Document</span></a></li> 
    234 <li><a href="#tab2-3"><span>Links</span></a></li> 
    235 </ul> 
    236  
    237 <div id="tab2-1"> 
    238 $('#jqtab-example1 > ul')<br> 
    239 .tabs({ fxFade: true, fxSpeed: 'fast' }); 
    240 </div> 
    241  
    242 <div id="tab2-2"> 
    243 �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 
    244      ("slow", "normal", "fast" ,�E�܂��E�̓~�E��E��E�b) �E��E�w�E�肵�E�Ă��E�܂��E�B 
    245 </div> 
    246  
    247 <div id="tab2-3"> 
    248      �E�\�E�[�E�X 
    249     </div> 
    250   </div>; 
    251 _TAB_; 
    252  
    253                 echo $script; 
    254 */       
     258 
    255259                if (!empty($_POST['submit_update'])) { 
    256260                        $this->ReadPostData(); 
Note: See TracChangeset for help on using the changeset viewer.