Changeset 108 for trunk/wp-content/plugins/xpressme
- Timestamp:
- Mar 15, 2009, 10:29:28 PM (16 years ago)
- Location:
- trunk/wp-content/plugins/xpressme
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/include/d3forum_comment_disp.php
r104 r108 13 13 $forum_id = $XPressME->d3forum_forum_id; 14 14 $external_link_format = $XPressME->d3forum_external_link_format; 15 $db =& Database::getInstance() ; 15 if ($XPressME->is_d3forum_desc){ 16 $order = 'desc'; 17 } else { 18 $order = 'asc'; 19 } 20 if ($XPressME->is_d3forum_desc){ 21 $order = 'desc'; 22 } else { 23 $order = 'asc'; 24 } 16 25 26 if ($XPressME->is_d3forum_flat){ 27 $view = 'listposts_flat'; 28 } else { 29 $view = 'listtopics'; 30 } 31 $posts_num = $XPressME->d3forum_views_num; 32 17 33 // force UPDATE forums.forum_external_link_format "(dirname)::(classname)::(trustdirname)" 18 34 $xoops_db->query( "UPDATE ".get_xoops_prefix() . $dir_name."_forums SET forum_external_link_format='".$external_link_format."' WHERE forum_id= $forum_id" ) ; … … 33 49 } 34 50 // $params = array("dirname" => $dir_name, "forum_id" => $forum_id, "itemname" => "p", "id" => $post_id , "subject" => $post_title); 35 $params = array("forum_id" => $forum_id, "id" => $post_id , "subject" => $post_title );51 $params = array("forum_id" => $forum_id, "id" => $post_id , "subject" => $post_title , "order" => $order , "view" => $view , "posts_num" => $posts_num); 36 52 if(file_exists($xoops_trust_path .'/modules/d3forum/')) { 37 53 if(file_exists($xoops_root_path .'/modules/' . $dir_name . '/')) { -
trunk/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php
r106 r108 179 179 180 180 // All comments of WordPress are exported to the D3Forum comment. 181 function wp_to_d3forum($forum_id = 1, $d3f_prefix = 'd3forum' ,$wp_prefix = 'wp'){181 function wp_to_d3forum($forum_id = 1, $d3f_prefix = 'd3forum'){ 182 182 global $XPressME,$xoops_db; 183 183 … … 185 185 186 186 $d3forum_prefix = get_xoops_prefix() . $d3f_prefix . '_'; 187 $xpress_prefix = get_ xoops_prefix() . $wp_prefix . '_';187 $xpress_prefix = get_wp_prefix(); 188 188 189 189 $wp_comments = $xpress_prefix . 'comments'; … … 239 239 240 240 $comment_count = 0; 241 $comments = $xoops_db->get_results($ post_sql);241 $comments = $xoops_db->get_results($sql); 242 242 foreach($comments as $comment){ 243 243 $comment_ID = $comment->comment_ID; … … 253 253 254 254 // All comments of D3Forum are import to the WordPress comment. 255 function d3forum_to_wp($forum_id = 1, $d3f_prefix = 'd3forum' ,$wp_prefix = 'wordpress'){255 function d3forum_to_wp($forum_id = 1, $d3f_prefix = 'd3forum'){ 256 256 global $XPressME,$xoops_db; 257 257 if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); 258 258 259 259 $d3forum_prefix = get_xoops_prefix() . $d3f_prefix . '_'; 260 $xpress_prefix = get_ xoops_prefix() . $wp_prefix . '_';260 $xpress_prefix = get_wp_prefix() ; 261 261 262 262 $wp_comments = $xpress_prefix . 'comments'; … … 297 297 298 298 $d3f_res = $xoops_db->get_results($d3f_sql); 299 if (empty($d3f_res )) die( '...Err. OPEN D3Forum Data (' . $d3f_sql . ')');300 299 $import_count = 0; 301 300 foreach($d3f_res as $d3f_row){ … … 429 428 $wp_sql .= "($comment_ID, $post_id)"; 430 429 $xoops_db->query($wp_sql); 431 if ($comment_approved ==0) do_CommentWaiting($comment ID, $post_id);430 if ($comment_approved ==0) do_CommentWaiting($comment_ID, $post_id); 432 431 break; 433 432 case 'edit': -
trunk/wp-content/plugins/xpressme/language/xpressme-ja.po
r99 r108 3 3 "Project-Id-Version: XPressME Plugin\n" 4 4 "POT-Creation-Date: \n" 5 "PO-Revision-Date: 2009-03- 07 16:29+0900\n"5 "PO-Revision-Date: 2009-03-15 18:39+0900\n" 6 6 "Last-Translator: toemon <toychee@toemon.com>\n" 7 7 "Language-Team: \n" … … 15 15 "X-Poedit-SearchPath-0: .\n" 16 16 17 #: xpressme_class.php:3 017 #: xpressme_class.php:33 18 18 msgid "XPressME Settings" 19 19 msgstr "XPressME設定" 20 20 21 #: xpressme_class.php: 4722 #: xpressme_class.php:1 4121 #: xpressme_class.php:50 22 #: xpressme_class.php:152 23 23 msgid "to Old Post" 24 24 msgstr "前の投稿へ" 25 25 26 #: xpressme_class.php: 4827 #: xpressme_class.php:1 4326 #: xpressme_class.php:51 27 #: xpressme_class.php:154 28 28 msgid "to Newer Post" 29 29 msgstr "次の投稿へ" 30 30 31 #: xpressme_class.php:1 7032 #: xpressme_class.php:3 3733 #: xpressme_class.php:3 4234 #: xpressme_class.php: 36335 #: xpressme_class.php: 36831 #: xpressme_class.php:195 32 #: xpressme_class.php:390 33 #: xpressme_class.php:395 34 #: xpressme_class.php:416 35 #: xpressme_class.php:421 36 36 msgid "YES" 37 37 msgstr "はい" 38 38 39 #: xpressme_class.php:1 7140 #: xpressme_class.php:3 3841 #: xpressme_class.php:3 4342 #: xpressme_class.php: 36443 #: xpressme_class.php: 36939 #: xpressme_class.php:196 40 #: xpressme_class.php:391 41 #: xpressme_class.php:396 42 #: xpressme_class.php:417 43 #: xpressme_class.php:422 44 44 msgid "NO" 45 45 msgstr "いいえ" 46 46 47 #: xpressme_class.php:2 1147 #: xpressme_class.php:236 48 48 msgid "Role Setting at Login" 49 49 msgstr "ログイン時の権限設定" 50 50 51 #: xpressme_class.php:2 1451 #: xpressme_class.php:239 52 52 msgid "XOOPS Groupe" 53 53 msgstr "XOOPSグループ名" 54 54 55 #: xpressme_class.php:2 1455 #: xpressme_class.php:239 56 56 msgid "WordPress Role" 57 57 msgstr "WordPressでの権限" 58 58 59 #: xpressme_class.php:2 1459 #: xpressme_class.php:239 60 60 msgid "Role is set at each login" 61 61 msgstr "ログイン時、常に権限を更新する" 62 62 63 #: xpressme_class.php:2 3564 #: xpressme_class.php:2 3965 #: xpressme_class.php:2 4263 #: xpressme_class.php:260 64 #: xpressme_class.php:264 65 #: xpressme_class.php:267 66 66 msgid "Default Role of WordPress" 67 67 msgstr "WordPressのデフォルト権限" 68 68 69 #: xpressme_class.php:2 3670 #: xpressme_class.php:2 4071 #: xpressme_class.php:2 4369 #: xpressme_class.php:261 70 #: xpressme_class.php:265 71 #: xpressme_class.php:268 72 72 msgid "Group User Doesn't Register" 73 73 msgstr "ユーザ登録しない" 74 74 75 #: xpressme_class.php:2 6675 #: xpressme_class.php:296 76 76 msgid "Do Not Comment Integration." 77 77 msgstr "コメント統合しません。" 78 78 79 #: xpressme_class.php:3 0279 #: xpressme_class.php:330 80 80 msgid "Comment integration with D3Forum" 81 81 msgstr "D3Forumとのコメント統合" 82 82 83 #: xpressme_class.php:3 0483 #: xpressme_class.php:332 84 84 msgid "Select the forum of D3Forum that does the comment integration from the following lists." 85 85 msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。" 86 86 87 #: xpressme_class.php:327 87 #: xpressme_class.php:335 88 msgid "Select the Type of display of D3Forum comment." 89 msgstr "D3Forumの表示タイプを選択" 90 91 #: xpressme_class.php:337 92 #: xpressme_class.php:340 93 msgid "Flat" 94 msgstr "フラット" 95 96 #: xpressme_class.php:338 97 #: xpressme_class.php:341 98 msgid "Threaded" 99 msgstr "スレッド" 100 101 #: xpressme_class.php:344 102 msgid "Select the order of display of D3Forum comment." 103 msgstr "D3Forumコメントの表示順を選択" 104 105 #: xpressme_class.php:346 106 #: xpressme_class.php:349 107 msgid "DESC" 108 msgstr "降順" 109 110 #: xpressme_class.php:347 111 #: xpressme_class.php:350 112 msgid "ASC" 113 msgstr "昇順" 114 115 #: xpressme_class.php:353 116 msgid "Number of displays of D3Forum comments." 117 msgstr "D3Forumのコメント表示数" 118 119 #: xpressme_class.php:357 120 msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. " 121 msgstr "WordPressコメントとD3Forumポスト間の一括転送(エクスポート・インポート)" 122 123 #: xpressme_class.php:358 124 msgid "Export to D3Forum" 125 msgstr "D3Forumへ一括エクスポート" 126 127 #: xpressme_class.php:359 128 msgid "Import from D3Forum" 129 msgstr "D3Forumから一括インポート" 130 131 #: xpressme_class.php:380 88 132 msgid "XPressME Configuration Page" 89 133 msgstr "XPressMEの設定ページ" 90 134 91 #: xpressme_class.php:3 31135 #: xpressme_class.php:384 92 136 msgid "Media Upload Base Path" 93 137 msgstr "メディアアップロードのベースパス設定" 94 138 95 #: xpressme_class.php:3 32139 #: xpressme_class.php:385 96 140 msgid "Use XOOPS UPLOAD PATH" 97 141 msgstr "XOOPSのアップロードパスを使用する。" 98 142 99 #: xpressme_class.php:3 33143 #: xpressme_class.php:386 100 144 msgid "USE WordPress BASE_PATH" 101 145 msgstr "WordPressのベースパスを使用する。" 102 146 103 #: xpressme_class.php:3 36147 #: xpressme_class.php:389 104 148 msgid "Thema Sidebar Display" 105 149 msgstr "テーマ表示時にサイドバー表示する。" 106 150 107 #: xpressme_class.php:3 41151 #: xpressme_class.php:394 108 152 msgid "The change tracking of the post is preserved" 109 153 msgstr "投稿の変更履歴を有効にする。" 110 154 111 #: xpressme_class.php:3 46155 #: xpressme_class.php:399 112 156 msgid "Display Navi Title of Old Post Link" 113 157 msgstr "古い記事へのナビタイトルを設定" 114 158 115 #: xpressme_class.php: 349159 #: xpressme_class.php:402 116 160 msgid "Display Navi Title of Newer Post Link" 117 161 msgstr "新しい記事へのナビタイトルを設定" 118 162 119 #: xpressme_class.php: 352163 #: xpressme_class.php:405 120 164 msgid "Select Display name of PostNavi Link" 121 165 msgstr "投稿記事リンクナビのタイトル設定" 122 166 123 #: xpressme_class.php: 353167 #: xpressme_class.php:406 124 168 msgid "Title of post" 125 169 msgstr "投稿記事のタイトルを表示" 126 170 127 #: xpressme_class.php: 354171 #: xpressme_class.php:407 128 172 msgid "Title of Navi" 129 173 msgstr "ナビタイトルを表示" 130 174 131 #: xpressme_class.php: 357175 #: xpressme_class.php:410 132 176 msgid "Adjustment of Navi link display position" 133 177 msgstr "投稿記事ナビリンクの表示位置設定" 134 178 135 #: xpressme_class.php: 358179 #: xpressme_class.php:411 136 180 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right" 137 181 msgstr "古い記事へのリンクを左に、より新しい記事へのリンクを右に表示" 138 182 139 #: xpressme_class.php: 359183 #: xpressme_class.php:412 140 184 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right" 141 185 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示" 142 186 143 #: xpressme_class.php: 362187 #: xpressme_class.php:415 144 188 msgid "Is the posts author views counted?" 145 189 msgstr "投稿者の閲覧をカウントしますか?" 146 190 147 #: xpressme_class.php: 367191 #: xpressme_class.php:420 148 192 msgid "Is SQL debugging window displayed?" 149 193 msgstr "SQLデバッグウィンドを表示しますか?" 150 194 151 #: xpressme_class.php: 379195 #: xpressme_class.php:432 152 196 msgid "Update Config" 153 197 msgstr "更新" 154 198 155 #: xpressme_class.php: 380199 #: xpressme_class.php:433 156 200 msgid "Preset Config" 157 201 msgstr "プリセット" -
trunk/wp-content/plugins/xpressme/xpressme_class.php
r104 r108 56 56 $this->d3forum_forum_id = ''; 57 57 $this->d3forum_external_link_format = get_xpress_dir_name() . '::xpressD3commentContent'; 58 $this->is_d3forum_flat = true; 59 $this->is_d3forum_desc = true; 60 $this->d3forum_views_num = 10; 58 61 } 59 62 … … 90 93 'd3forum_module_dir' => $this->d3forum_module_dir, 91 94 'd3forum_forum_id' => $this->d3forum_forum_id, 92 'd3forum_external_link_format' => $this->d3forum_external_link_format 95 'd3forum_external_link_format' => $this->d3forum_external_link_format, 96 'is_d3forum_flat' => $this->is_d3forum_flat, 97 'is_d3forum_desc' => $this->is_d3forum_desc, 98 'd3forum_views_num' =>$this->d3forum_views_num 93 99 ); 94 100 if ($mode == 'add_new') { … … 169 175 $this->d3forum_external_link_format = get_xpress_dir_name() . '::xpressD3commentContent'; 170 176 } 177 $this->is_d3forum_flat = stripslashes(trim($_POST['ch_d3forum_type'])); 178 $this->is_d3forum_desc = stripslashes(trim($_POST['ch_d3forum_order'])); 179 $this->d3forum_views_num = stripslashes(trim($_POST['ch_d3forum_view_num'])); 171 180 172 181 global $xoops_db; … … 282 291 } 283 292 284 function d3forum_option( ){293 function d3forum_option($do_message = ''){ 285 294 global $xoops_db; 286 295 … … 306 315 // It is checked whether there is character string "$mytrustdirname ='d3forum'"in the file. 307 316 foreach ($array_files as $aeey_file){ 308 if( preg_match( "/\s*( $mytrustdirname)\s*(=)\s*([\"'])(d3forum)([\"'])/", $aeey_file ) ) {317 if( preg_match( "/\s*(mytrustdirname)\s*(=)\s*([\"'])(d3forum)([\"'])/", $aeey_file ) ) { 309 318 $forums_tb = get_xoops_prefix() . $module->dirname . '_forums'; 310 319 $cat_tb = get_xoops_prefix() . $module->dirname . '_categories'; … … 323 332 } 324 333 } 325 $for m.= '<br>';334 $forum_list .= '<br>'; 326 335 } 327 336 $forum_list .= '</select>' . "\n"; … … 332 341 $form .= __('Select the forum of D3Forum that does the comment integration from the following lists.', 'xpressme') ."<br />\n"; 333 342 $form .= $forum_list."\n"; 334 $form .= '<br /><br /><br /><br /><br /><br /><br />'; 343 $form .= '<br /><br />'; 344 if ($this->is_use_d3forum) $disible = ''; else $disible = 'disabled'; 345 $form .= __('Select the Type of display of D3Forum comment.', 'xpressme') . " \n&emsp"; 346 if ($this->is_d3forum_flat){ 347 $form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='1' checked='checked' />" . __('Flat','xpressme') ."</label>\n"; 348 $form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='0' />". __('Threaded','xpressme') . "</label>\n"; 349 }else{ 350 $form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='1' />" . __('Flat','xpressme') . "</label>\n"; 351 $form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='0' checked='checked' />". __('Threaded','xpressme') ."</label>\n"; 352 } 353 $form .= '<br />'; 354 $form .= __('Select the order of display of D3Forum comment.', 'xpressme') . " \n&emsp"; 355 if ($this->is_d3forum_desc){ 356 $form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='1' checked='checked' />" . __('DESC','xpressme') ."</label>\n"; 357 $form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='0' />". __('ASC','xpressme') . "</label>\n"; 358 }else{ 359 $form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='1' />" . __('DESC','xpressme') . "</label>\n"; 360 $form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='0' checked='checked' />". __('ASC','xpressme') ."</label>\n"; 361 } 362 $form .= '<br />'; 363 $form .= __('Number of displays of D3Forum comments.', 'xpressme') ." \n"; 364 $form .= '&emsp<label> <input name="ch_d3forum_view_num" type="text" size="3" maxlength="3" value="' . $this->d3forum_views_num . '" /></label>'."\n"; 365 366 $form .= '<div class="submit">'."\n"; 367 $form .= __('The import and the export between Wordpress Comments and the D3Forum Posts can be done. ', 'xpressme') ."<br />\n"; 368 $form .= '<input type="submit" value= "' . __('Export to D3Forum', 'xpressme') . '" name="export_d3f" ' . $disible . ' >' ."\n"; 369 $form .= '<input type="submit" value= "' . __('Import from D3Forum', 'xpressme') . '" name="inport_d3f" ' . $disible . ' >' ."<br />\n"; 370 $form .= '</div>'."\n"; 371 if (!empty($do_message)){ 372 $form .= '<div>' . $do_message . '</div>'; 373 } 335 374 $form .= "</td>\n"; 336 375 $form .= "</tr><tr>\n"; … … 340 379 function option_page() 341 380 { 342 381 $do_message =''; 343 382 if (!empty($_POST['submit_update'])) { 344 383 $this->ReadPostData(); … … 347 386 $this->fck_setDefault(); 348 387 $this->SettingValueWrite('update'); 349 } 350 388 } else if (isset($_POST['export_d3f'])) { 389 $do_message = 'export(' . $this->d3forum_module_dir . '--ID=' . $this->d3forum_forum_id . ')................'; 390 $do_message .= wp_to_d3forum($this->d3forum_forum_id, $this->d3forum_module_dir); 391 $do_message .= '....END'; 392 } else if (isset($_POST['inport_d3f'])) { 393 $do_message = 'Import(' . $this->d3forum_module_dir . '--ID=' . $this->d3forum_forum_id . ')................'; 394 $do_message .= d3forum_to_wp($this->d3forum_forum_id, $this->d3forum_module_dir); 395 $do_message .= '....END'; 396 } 351 397 352 398 echo '<div class="wrap">'."\n"; … … 399 445 echo $this->groupe_role_option(); 400 446 401 echo $this->d3forum_option( );447 echo $this->d3forum_option($do_message); 402 448 // $this->is_use_xoops_upload_path_html(); 403 449 echo "</table>\n";
Note: See TracChangeset
for help on using the changeset viewer.