XPressME Integration Kit

Trac


Ignore:
Timestamp:
Mar 15, 2009, 10:29:28 PM (15 years ago)
Author:
toemon
Message:

D3Forum コメント統合実装 (インポート・エクスポート)
D3Forumコメント統合時のオプション追加(表示順・表示タイプ・表示数)
これで #5 のチケットは完了

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php

    r106 r108  
    179179 
    180180// All comments of WordPress are exported to the D3Forum comment.  
    181 function wp_to_d3forum($forum_id = 1, $d3f_prefix = 'd3forum' ,$wp_prefix = 'wp'){ 
     181function wp_to_d3forum($forum_id = 1, $d3f_prefix = 'd3forum'){ 
    182182        global $XPressME,$xoops_db; 
    183183 
     
    185185         
    186186        $d3forum_prefix = get_xoops_prefix() . $d3f_prefix . '_'; 
    187         $xpress_prefix = get_xoops_prefix() . $wp_prefix . '_'; 
     187        $xpress_prefix = get_wp_prefix(); 
    188188         
    189189        $wp_comments = $xpress_prefix . 'comments'; 
     
    239239 
    240240        $comment_count = 0; 
    241         $comments = $xoops_db->get_results($post_sql); 
     241        $comments = $xoops_db->get_results($sql); 
    242242        foreach($comments as $comment){ 
    243243                $comment_ID = $comment->comment_ID; 
     
    253253 
    254254// All comments of D3Forum are import to the WordPress comment.  
    255 function d3forum_to_wp($forum_id = 1, $d3f_prefix = 'd3forum' ,$wp_prefix = 'wordpress'){ 
     255function d3forum_to_wp($forum_id = 1, $d3f_prefix = 'd3forum'){ 
    256256        global $XPressME,$xoops_db; 
    257257        if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); 
    258258         
    259259        $d3forum_prefix = get_xoops_prefix() . $d3f_prefix . '_'; 
    260         $xpress_prefix = get_xoops_prefix() . $wp_prefix . '_'; 
     260        $xpress_prefix = get_wp_prefix() ; 
    261261         
    262262        $wp_comments = $xpress_prefix . 'comments'; 
     
    297297 
    298298        $d3f_res = $xoops_db->get_results($d3f_sql); 
    299         if (empty($d3f_res )) die( '...Err. OPEN D3Forum Data (' .  $d3f_sql . ')'); 
    300299        $import_count = 0; 
    301300        foreach($d3f_res as $d3f_row){ 
     
    429428                                $wp_sql .=    "($comment_ID, $post_id)";                 
    430429                                $xoops_db->query($wp_sql);                               
    431                                 if ($comment_approved ==0)      do_CommentWaiting($commentID, $post_id); 
     430                                if ($comment_approved ==0)      do_CommentWaiting($comment_ID, $post_id); 
    432431                                break; 
    433432                        case 'edit': 
Note: See TracChangeset for help on using the changeset viewer.