- Timestamp:
- Aug 11, 2009, 4:31:35 PM (15 years ago)
- Location:
- trunk/xpressme_integration_kit
- Files:
-
- 1 added
- 1 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/class/config_from_xoops.class.php
r357 r360 41 41 var $mu_path_current_site; 42 42 var $wp_db_version; 43 var $is_wp20; 43 var $wp_version; 44 var $is_wp_me; 44 45 45 46 function __constructor() //for PHP5 … … 291 292 292 293 $this->wp_db_version = $wp_db_version; 293 if ($wp_db_version == 3441) 294 $this->is_wp20 = true; 295 else 296 $this->is_wp20 = false; 297 294 295 $this->wp_version = str_replace("ME", "", $wp_version); 296 297 $pattern = 'ME.*'; 298 if (preg_match('/' . $pattern . '/' ,$wp_version)){ 299 $this->is_wp_me = true; 300 } else { 301 $this->is_wp_me = true; 302 } 298 303 } 299 304 -
trunk/xpressme_integration_kit/include/add_xpress_process.php
r358 r360 2 2 require_once( dirname( __FILE__ ).'/request_url.php'); 3 3 if (is_xpress_index_page_call()){ 4 //When notifying by a private message, 4 //When notifying by a private message, Notification_reserve_send(); 5 5 //it is evaded that the data base becomes read-only as a result of the check on the referrer and the method. 6 6 $_SERVER['REQUEST_METHOD'] = 'POST'; … … 27 27 Notification_reserve_send(); 28 28 ob_start(); 29 if ($xoops_config->is_wp20)29 if (version_compare($xoops_config->wp_version,'2.2', '<')) 30 30 require_once dirname( __FILE__ ).'/old_template-loader.php' ; 31 31 else … … 49 49 exit(); // The return to wp-blog-header.php is stolen here 50 50 } 51 if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path; 52 if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path; 51 if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path; // for Notification_triggerEvent 52 if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path; // for Notification_triggerEvent 53 53 ?> -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r350 r360 16 16 } 17 17 18 function xpress_is_wp 20(){18 function xpress_is_wp_version($operator='==',$comp_version){ 19 19 global $xoops_config; 20 21 return $xoops_config->is_wp20; 20 return version_compare($xoops_config->wp_version, $comp_version, $operator); 22 21 } 23 22 -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
r286 r360 250 250 } 251 251 } else { 252 if(xpress_is_wp 20()){252 if(xpress_is_wp_version('<','2.1')){ // Maybe, I think that it is ver2.1 or less. 253 253 if (!empty($wp->matched_query) ){ 254 254 if (strpos($wp->matched_query,'author_name') !== false ){ … … 303 303 $query = preg_replace('/\s\s+/', ' ', $query); 304 304 if (!empty($_COOKIE[$author_cookie])){ 305 if(xpress_is_wp 20()){305 if(xpress_is_wp_version('<','2.1')){ 306 306 $pattern = "WHERE.*AND\s?\(*post_author\s*="; 307 307 if ( preg_match ( "/".$pattern."/i", $query, $match ) ){ -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
r349 r360 20 20 21 21 require_once dirname( __FILE__ ).'/include/pluggable-override.php' ; 22 if ($xoops_config->is_wp20) 23 require_once dirname( __FILE__ ).'/include/functions_for_wp20.php' ; 22 require_once dirname( __FILE__ ).'/include/functions_for_wp_old.php' ; 24 23 25 24 function my_plugin_menu() … … 98 97 add_filter('query','xpress_query_filter'); 99 98 //add_action("init", "xpress_set_author_cookie"); 100 if(xpress_is_wp 20()){99 if(xpress_is_wp_version('<','2.1')){ 101 100 // It is called before parse_request() makes $GET. 102 101 add_action("query_vars", "xpress_set_author_cookie"); -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/authors_block_theme.php
r292 r360 10 10 $mydirpath = get_xpress_dir_path(); 11 11 12 if(xpress_is_wp 20() ){12 if(xpress_is_wp_version('<','2.3') ){ 13 13 $param_str = 'optioncount='. $optioncount . '&exclude_admin=' . $exclude_admin .'&show_fullname='. $show_fullname . '&hide_empty=' . $hide_empty; 14 14 ob_start(); -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/meta_block_theme.php
r270 r360 35 35 if ($post_new){ 36 36 if($Now_user_level > 0){ 37 if (xpress_is_wp 20()){37 if (xpress_is_wp_version('<','2.1') ){ 38 38 $output .= 39 39 '<li>'. -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/page_block_theme.php
r262 r360 22 22 if ($show_date == 'none' ) $show_date = ''; 23 23 24 if ( !xpress_is_wp20()){24 if (xpress_is_wp_version('>=','2.2')){ 25 25 $parm = array( 26 26 'sort_column' => $sort_column, -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php
r269 r360 46 46 $comment_sql = "SELECT comment_ID,comment_post_ID,comment_author,comment_author_email,comment_author_url,comment_content, comment_type,UNIX_TIMESTAMP(comment_date) as comment_unix_time "; 47 47 $comment_sql .= "FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID "; 48 if (xpress_is_wp 20()){48 if (xpress_is_wp_version('<','2.1')){ 49 49 $comment_sql .= "WHERE comment_approved = '1' AND post_status = 'publish' $type_select "; 50 50 } else { … … 60 60 $comment_content = $comment->comment_content; 61 61 $comment_excerpt = ($disp_length>0 ? xpress_substr($comment_content, 0, $disp_length): $comment->comment_content); 62 if (xpress_is_wp20()){ 63 $comment_link = get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID ; 64 } else { 65 $comment_link = get_comment_link($comment->comment_ID); 66 } 62 $comment_link = get_comment_link($comment->comment_ID); 67 63 $comment_title = $comment_excerpt; 68 64 $comment_title_link = "<a href='$comment_link' rel='external nofollow' class='url'>$comment_title</a>"; -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments.php
r253 r360 12 12 13 13 <!-- You can start editing here. --> 14 <?php if ( ! xpress_is_wp20()) : ?>14 <?php if ( xpress_is_wp_version('>=','2.7')) : ?> 15 15 <?php if ( have_comments() ) : ?> 16 16 <?php if ( ! empty($comments_by_type['comment']) ) : ?> … … 34 34 <?php endif; ?> 35 35 <?php endif; ?> 36 <?php else : // is WordPress2.0?>36 <?php else : // is version 2.7 under?> 37 37 <?php if ( $comments ) : ?> 38 38 <h3 id="xpress_comments"><?php comments_number(__('No Responses', 'xpress'), __('One Response', 'xpress'), __('% Responses', 'xpress'));?> <?php printf(__('to “%s”', 'xpress'), the_title('', '', false)); ?></h3> -
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/single.php
r272 r360 66 66 <div id ="xpress-comments-block"> 67 67 <?php 68 if ( xpress_is_wp20() )68 if ( xpress_is_wp_version('<','2.7') ) 69 69 comments_template(); 70 70 else
Note: See TracChangeset
for help on using the changeset viewer.