Changeset 108 for trunk/wp-content/plugins/xpressme/include
- Timestamp:
- Mar 15, 2009, 10:29:28 PM (16 years ago)
- Location:
- trunk/wp-content/plugins/xpressme/include
- Files:
-
- 2 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':
Note: See TracChangeset
for help on using the changeset viewer.