- Timestamp:
- Mar 31, 2009, 12:43:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php
r108 r144 147 147 148 148 function 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; 152 152 if (empty($use_d3f)) { 153 153 return false; 154 154 } 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; 157 157 if (! d3f_module_found($d3f_forum_dir)) die( "D3Forum Directory ($d3f_forum_dir) not found" ) ; 158 158 if (! d3f_forum_id_found($d3f_forum_id , $d3f_forum_dir)) die( "D3Forum ForumID($d3f_forum_id) not found" ) ; 159 159 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" ) ; 161 161 162 162 return true; … … 165 165 function d3forum_topic_rock($wp_post_id,$lock = '0') 166 166 { 167 global $ XPressME,$xoops_db;167 global $xpress_config,$xoops_db; 168 168 169 169 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; 171 171 172 172 $d3f_topic = get_xoops_prefix() . $d3f_forum_dir . '_topics'; … … 180 180 // All comments of WordPress are exported to the D3Forum comment. 181 181 function wp_to_d3forum($forum_id = 1, $d3f_prefix = 'd3forum'){ 182 global $ XPressME,$xoops_db;182 global $xpress_config,$xoops_db; 183 183 184 184 if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); … … 254 254 // All comments of D3Forum are import to the WordPress comment. 255 255 function d3forum_to_wp($forum_id = 1, $d3f_prefix = 'd3forum'){ 256 global $ XPressME,$xoops_db;256 global $xpress_config,$xoops_db; 257 257 if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); 258 258 … … 322 322 323 323 function wp_post_delete_sync($post_id){ 324 global $ XPressME,$xoops_db;324 global $xpress_config,$xoops_db; 325 325 326 326 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; 328 328 $d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_'; 329 329 … … 346 346 347 347 function 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; 349 349 350 350 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 . '_'; 352 352 $xpress_prefix = get_wp_prefix(); 353 353 … … 458 458 // The content is reflected in the D3Forum comment when there is a change in the WordPress comment. 459 459 function wp_comment_sync_to_d3forum($comment_ID = 0,$sync_mode){ 460 global $ XPressME,$xoops_db;460 global $xpress_config,$xoops_db; 461 461 462 462 if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); 463 463 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; 466 466 467 467 $d3forum_prefix = get_xoops_prefix() . $d3f_forum_dir . '_'; … … 696 696 { 697 697 $post_id = intval( $post_id ) ; // post_id is d3forum post(comments) id. 698 global $ XPressME,$xoops_db;698 global $xpress_config,$xoops_db; 699 699 $d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_'; 700 700 $xpress_prefix = get_wp_prefix(); … … 733 733 function wp_d3forum_delete_topic( $d3forum_dirname , $topic_id , $delete_also_posts = true ) 734 734 { 735 global $ XPressME,$xoops_db;735 global $xpress_config,$xoops_db; 736 736 $d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_'; 737 737 $xpress_prefix = get_wp_prefix(); … … 762 762 function wp_d3forum_sync_topic( $d3forum_dirname , $topic_id , $sync_also_forum = true , $sync_topic_title = false ) 763 763 { 764 global $ XPressME,$xoops_db;764 global $xpress_config,$xoops_db; 765 765 $d3forum_prefix = get_xoops_prefix() . $d3forum_dirname . '_'; 766 766 $xpress_prefix = get_wp_prefix(); … … 816 816 function wp_d3forum_maketree_recursive( $tablename , $post_id , $order = 'post_id' , $parray = array() , $depth = 0 , $unique_path = '.1' ) 817 817 { 818 global $ XPressME,$xoops_db;818 global $xpress_config,$xoops_db; 819 819 820 820 $parray[] = array( 'post_id' => $post_id , 'depth' => $depth , 'unique_path' => $unique_path ) ;
Note: See TracChangeset
for help on using the changeset viewer.