XPressME Integration Kit

Trac


Ignore:
Timestamp:
Mar 31, 2009, 12:43:04 PM (16 years ago)
Author:
toemon
Message:

オブジェクト名$XPressMEを$xpress_configに変更(気分的な問題)

File:
1 edited

Legend:

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

    r108 r144  
    147147 
    148148function is_d3forum_setting(){ 
    149         global $XPressME,$xoops_db; 
    150  
    151         $use_d3f = $XPressME->is_use_d3forum; 
     149        global $xpress_config,$xoops_db; 
     150 
     151        $use_d3f = $xpress_config->is_use_d3forum; 
    152152        if (empty($use_d3f)) { 
    153153                return false; 
    154154        } 
    155         $d3f_forum_id = $XPressME->d3forum_forum_id; 
    156         $d3f_forum_dir  = $XPressME->d3forum_module_dir; 
     155        $d3f_forum_id = $xpress_config->d3forum_forum_id; 
     156        $d3f_forum_dir  = $xpress_config->d3forum_module_dir; 
    157157        if (! d3f_module_found($d3f_forum_dir)) die( "D3Forum Directory ($d3f_forum_dir) not found" ) ;  
    158158        if (! d3f_forum_id_found($d3f_forum_id , $d3f_forum_dir)) die( "D3Forum ForumID($d3f_forum_id) not found" ) ; 
    159159         
    160         $xoops_db->query( "UPDATE ".get_xoops_prefix() . $d3f_forum_dir."_forums" ." SET forum_external_link_format='".addslashes($XPressME->d3forum_external_link_format)."' WHERE forum_id= $d3f_forum_id" ) ; 
     160        $xoops_db->query( "UPDATE ".get_xoops_prefix() . $d3f_forum_dir."_forums" ." SET forum_external_link_format='".addslashes($xpress_config->d3forum_external_link_format)."' WHERE forum_id= $d3f_forum_id" ) ; 
    161161         
    162162        return true; 
     
    165165function d3forum_topic_rock($wp_post_id,$lock = '0') 
    166166{ 
    167         global $XPressME,$xoops_db; 
     167        global $xpress_config,$xoops_db; 
    168168         
    169169        if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); 
    170         $d3f_forum_dir  = $XPressME->d3forum_module_dir; 
     170        $d3f_forum_dir  = $xpress_config->d3forum_module_dir; 
    171171         
    172172        $d3f_topic = get_xoops_prefix() . $d3f_forum_dir . '_topics'; 
     
    180180// All comments of WordPress are exported to the D3Forum comment.  
    181181function wp_to_d3forum($forum_id = 1, $d3f_prefix = 'd3forum'){ 
    182         global $XPressME,$xoops_db; 
     182        global $xpress_config,$xoops_db; 
    183183 
    184184        if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); 
     
    254254// All comments of D3Forum are import to the WordPress comment.  
    255255function d3forum_to_wp($forum_id = 1, $d3f_prefix = 'd3forum'){ 
    256         global $XPressME,$xoops_db; 
     256        global $xpress_config,$xoops_db; 
    257257        if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); 
    258258         
     
    322322 
    323323function wp_post_delete_sync($post_id){ 
    324         global $XPressME,$xoops_db; 
     324        global $xpress_config,$xoops_db; 
    325325 
    326326        if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); 
    327         $d3forum_dirname = $XPressME->d3forum_module_dir; 
     327        $d3forum_dirname = $xpress_config->d3forum_module_dir; 
    328328        $d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_'; 
    329329 
     
    346346 
    347347function d3forum_sync_to_wp_comment( $mode , $link_id , $forum_id , $topic_id , $post_id = 0 ){ 
    348         global $XPressME,$xoops_db; 
     348        global $xpress_config,$xoops_db; 
    349349 
    350350        if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); 
    351         $d3forum_prefix = get_xoops_prefix() . $XPressME->d3forum_module_dir . '_'; 
     351        $d3forum_prefix = get_xoops_prefix() . $xpress_config->d3forum_module_dir . '_'; 
    352352        $xpress_prefix = get_wp_prefix(); 
    353353         
     
    458458//  The content is reflected in the D3Forum comment when there is a change in the WordPress comment.  
    459459function wp_comment_sync_to_d3forum($comment_ID = 0,$sync_mode){ 
    460         global $XPressME,$xoops_db; 
     460        global $xpress_config,$xoops_db; 
    461461         
    462462        if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); 
    463463 
    464         $d3f_forum_id = $XPressME->d3forum_forum_id; 
    465         $d3f_forum_dir  = $XPressME->d3forum_module_dir; 
     464        $d3f_forum_id = $xpress_config->d3forum_forum_id; 
     465        $d3f_forum_dir  = $xpress_config->d3forum_module_dir; 
    466466         
    467467        $d3forum_prefix = get_xoops_prefix() . $d3f_forum_dir . '_'; 
     
    696696{ 
    697697        $post_id = intval( $post_id ) ; // post_id is d3forum post(comments) id. 
    698         global $XPressME,$xoops_db; 
     698        global $xpress_config,$xoops_db; 
    699699        $d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_'; 
    700700        $xpress_prefix = get_wp_prefix(); 
     
    733733function wp_d3forum_delete_topic( $d3forum_dirname , $topic_id , $delete_also_posts = true ) 
    734734{ 
    735         global $XPressME,$xoops_db; 
     735        global $xpress_config,$xoops_db; 
    736736        $d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_'; 
    737737        $xpress_prefix = get_wp_prefix(); 
     
    762762function wp_d3forum_sync_topic( $d3forum_dirname , $topic_id , $sync_also_forum = true , $sync_topic_title = false ) 
    763763{ 
    764         global $XPressME,$xoops_db; 
     764        global $xpress_config,$xoops_db; 
    765765        $d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_'; 
    766766        $xpress_prefix = get_wp_prefix(); 
     
    816816function wp_d3forum_maketree_recursive( $tablename , $post_id , $order = 'post_id' , $parray = array() , $depth = 0 , $unique_path = '.1' ) 
    817817{ 
    818         global $XPressME,$xoops_db; 
     818        global $xpress_config,$xoops_db; 
    819819 
    820820        $parray[] = array( 'post_id' => $post_id , 'depth' => $depth , 'unique_path' => $unique_path ) ; 
Note: See TracChangeset for help on using the changeset viewer.