- Timestamp:
- Mar 31, 2009, 12:43:04 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/class/xpressD3commentContent.class.php
r108 r144 135 135 function getOrder( $params ) 136 136 { 137 global $ XPressME;137 global $xpress_config; 138 138 if( ! empty( $params['order'] ) ) { 139 139 return strtolower( $params['order'] ) ; -
trunk/wp-content/plugins/xpressme/include/custom_functions.php
r143 r144 30 30 31 31 function xpress_is_theme_sidebar_disp(){ 32 global $ XPressME;33 return $ XPressME->is_theme_sidebar_disp;32 global $xpress_config; 33 return $xpress_config->is_theme_sidebar_disp; 34 34 } 35 35 36 36 function xpress_left_arrow_post_link($show = false) 37 37 { 38 global $ XPressME;38 global $xpress_config; 39 39 $ret = ''; 40 40 41 if($ XPressME->is_left_postnavi_old){42 $link_title = $ XPressME->old_post_link_text;43 ob_start(); 44 if ($ XPressME->is_postnavi_title_disp)41 if($xpress_config->is_left_postnavi_old){ 42 $link_title = $xpress_config->old_post_link_text; 43 ob_start(); 44 if ($xpress_config->is_postnavi_title_disp) 45 45 previous_post_link('« %link'); 46 46 else … … 49 49 ob_end_clean(); 50 50 } else { 51 $link_title = $ XPressME->newer_post_link_text;52 ob_start(); 53 if ($ XPressME->is_postnavi_title_disp)51 $link_title = $xpress_config->newer_post_link_text; 52 ob_start(); 53 if ($xpress_config->is_postnavi_title_disp) 54 54 next_post_link('« %link'); 55 55 else … … 59 59 } 60 60 61 if ($ XPressME->is_postnavi_title_disp){61 if ($xpress_config->is_postnavi_title_disp){ 62 62 $on_mouse_show = $link_title; 63 63 } else { 64 if($ XPressME->is_left_postnavi_old){64 if($xpress_config->is_left_postnavi_old){ 65 65 ob_start(); 66 66 previous_post_link('%link'); … … 87 87 function xpress_right_arrow_post_link($show = false) 88 88 { 89 global $ XPressME;89 global $xpress_config; 90 90 $ret = ''; 91 91 92 if($ XPressME->is_left_postnavi_old){93 $link_title = $ XPressME->newer_post_link_text;94 ob_start(); 95 if ($ XPressME->is_postnavi_title_disp)92 if($xpress_config->is_left_postnavi_old){ 93 $link_title = $xpress_config->newer_post_link_text; 94 ob_start(); 95 if ($xpress_config->is_postnavi_title_disp) 96 96 next_post_link('%link »'); 97 97 else … … 100 100 ob_end_clean(); 101 101 } else { 102 $link_title = $ XPressME->old_post_link_text;103 ob_start(); 104 if ($ XPressME->is_postnavi_title_disp)102 $link_title = $xpress_config->old_post_link_text; 103 ob_start(); 104 if ($xpress_config->is_postnavi_title_disp) 105 105 previous_post_link('%link »'); 106 106 else … … 110 110 } 111 111 112 if ($ XPressME->is_postnavi_title_disp){112 if ($xpress_config->is_postnavi_title_disp){ 113 113 $on_mouse_show = $link_title; 114 114 } else { 115 if($ XPressME->is_left_postnavi_old){115 if($xpress_config->is_left_postnavi_old){ 116 116 ob_start(); 117 117 next_post_link('%link'); … … 138 138 function xpress_left_arrow_posts_link($show = false) 139 139 { 140 global $ XPressME;140 global $xpress_config; 141 141 $ret = ''; 142 142 143 if($ XPressME->is_left_page_navi_old){144 $link_title = $ XPressME->old_page_link_text;143 if($xpress_config->is_left_page_navi_old){ 144 $link_title = $xpress_config->old_page_link_text; 145 145 ob_start(); 146 146 next_posts_link("« $link_title"); … … 148 148 ob_end_clean(); 149 149 } else { 150 $link_title = $ XPressME->newer_page_link_text;150 $link_title = $xpress_config->newer_page_link_text; 151 151 ob_start(); 152 152 previous_posts_link("« $link_title"); … … 163 163 function xpress_right_arrow_posts_link($show = false) 164 164 { 165 global $ XPressME;165 global $xpress_config; 166 166 $ret = ''; 167 167 168 if($ XPressME->is_left_page_navi_old){169 $link_title = $ XPressME->newer_page_link_text;168 if($xpress_config->is_left_page_navi_old){ 169 $link_title = $xpress_config->newer_page_link_text; 170 170 ob_start(); 171 171 previous_posts_link("$link_title »"); … … 173 173 ob_end_clean(); 174 174 } else { 175 $link_title = $ XPressME->old_page_link_text;175 $link_title = $xpress_config->old_page_link_text; 176 176 ob_start(); 177 177 next_posts_link("$link_title »"); … … 188 188 189 189 function xpress_is_author_view_count(){ 190 global $ XPressME;191 return $ XPressME->is_author_view_count;190 global $xpress_config; 191 return $xpress_config->is_author_view_count; 192 192 } 193 193 -
trunk/wp-content/plugins/xpressme/include/d3forum_comment_disp.php
r108 r144 1 1 <?php 2 global $xoops_db,$ XPressME;2 global $xoops_db,$xpress_config; 3 3 $xoops_trust_path = get_xoops_trust_path(); 4 4 $xoops_root_path = get_xoops_root_path(); … … 10 10 include_once($xpress_dir . '/class/xpressD3commentContent.class.php'); 11 11 12 $dir_name = $ XPressME->d3forum_module_dir;13 $forum_id = $ XPressME->d3forum_forum_id;14 $external_link_format = $ XPressME->d3forum_external_link_format;15 if ($ XPressME->is_d3forum_desc){12 $dir_name = $xpress_config->d3forum_module_dir; 13 $forum_id = $xpress_config->d3forum_forum_id; 14 $external_link_format = $xpress_config->d3forum_external_link_format; 15 if ($xpress_config->is_d3forum_desc){ 16 16 $order = 'desc'; 17 17 } else { 18 18 $order = 'asc'; 19 19 } 20 if ($ XPressME->is_d3forum_desc){20 if ($xpress_config->is_d3forum_desc){ 21 21 $order = 'desc'; 22 22 } else { … … 24 24 } 25 25 26 if ($ XPressME->is_d3forum_flat){26 if ($xpress_config->is_d3forum_flat){ 27 27 $view = 'listposts_flat'; 28 28 } else { 29 29 $view = 'listtopics'; 30 30 } 31 $posts_num = $ XPressME->d3forum_views_num;31 $posts_num = $xpress_config->d3forum_views_num; 32 32 33 33 // force UPDATE forums.forum_external_link_format "(dirname)::(classname)::(trustdirname)" -
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 ) ; -
trunk/wp-content/plugins/xpressme/xpressme.php
r104 r144 17 17 $xoops_db->tables = array('modules', 'newblocks', 'users'); 18 18 19 $ XPressME= new XPressME_Class();19 $xpress_config = new XPressME_Class(); 20 20 21 21 require_once dirname( __FILE__ ).'/include/pluggable-override.php' ; 22 22 23 add_action('admin_menu', array(&$ XPressME, 'add_option_page'));24 add_action('admin_head', array(&$ XPressME, 'add_admin_head'));25 add_filter("upload_dir",array(&$ XPressME, 'xpress_upload_filter'), 1); // Change wp-include/wp_upload_dir()26 if (!$ XPressME->is_save_post_revision){23 add_action('admin_menu', array(&$xpress_config, 'add_option_page')); 24 add_action('admin_head', array(&$xpress_config, 'add_admin_head')); 25 add_filter("upload_dir",array(&$xpress_config, 'xpress_upload_filter'), 1); // Change wp-include/wp_upload_dir() 26 if (!$xpress_config->is_save_post_revision){ 27 27 remove_action( 'pre_post_update', 'wp_save_post_revision' ); // Not Save Post Revision 28 28 } … … 55 55 56 56 //D3Forum Comment Integration 57 if ($ XPressME->is_use_d3forum){57 if ($xpress_config->is_use_d3forum){ 58 58 require_once dirname( __FILE__ ).'/include/d3forum_comment_synchro.php' ; 59 59 add_action("comment_post", "onaction_comment_post"); … … 70 70 71 71 // SQL debug windows 72 add_filter('query', array(&$ XPressME, 'xpress_sql_debug'));73 add_action('admin_footer', array(&$ XPressME, 'displayDebugLog'));74 add_action('get_footer', array(&$ XPressME, 'displayDebugLog'));72 add_filter('query', array(&$xpress_config, 'xpress_sql_debug')); 73 add_action('admin_footer', array(&$xpress_config, 'displayDebugLog')); 74 add_action('get_footer', array(&$xpress_config, 'displayDebugLog')); 75 75 ?>
Note: See TracChangeset
for help on using the changeset viewer.