XPressME Integration Kit

Trac


Ignore:
Timestamp:
Dec 15, 2009, 4:52:57 PM (15 years ago)
Author:
toemon
Message:

開発ベースにVer2.2をマージ

Location:
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php

    r451 r488  
    9595 
    9696        $output = ''; 
    97         $author_cookie = get_xpress_dir_name() . "_select_author" ; 
     97        $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 
    9898        if (!empty($_COOKIE[$author_cookie])){ 
    9999                $uid = intval($_COOKIE[$author_cookie]); 
     
    115115        extract( $r ); 
    116116        $output = ''; 
    117         $author_cookie = get_xpress_dir_name() . "_select_author" ; 
     117        $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 
    118118        if (!empty($_COOKIE[$author_cookie])){ 
    119119                $output = intval($_COOKIE[$author_cookie]); 
     
    161161        $xpress_codename = $xoops_config->module_codename; 
    162162        if ($no_link){ 
    163                 $output = 'XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename); 
    164163                if ($xoops_config->is_wpmu) { 
     164                        $output = 'XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename); 
    165165                        $output .= '(included WordPress MU ' . $wpmu_version. ')'; 
    166166                } else { 
     167                        $output = 'XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename); 
    167168                        if (strstr($wp_version,'ME')){ 
    168169                                $output .= '(included WordPress ' . $wp_version . ')'; 
     
    172173                } 
    173174        } else { 
    174                 $output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>'; 
    175175                if ($xoops_config->is_wpmu) { 
     176                        $output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>'; 
    176177                        $output .= '(included <a href="http://mu.wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress MU ' . $wpmu_version . '</a>)'; 
    177178                } else { 
     179                        $output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>'; 
    178180                        if (strstr($wp_version,'ME')){ 
    179181                                $output .= '(included <a href="http://wpme.sourceforge.jp/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)'; 
     
    467469} 
    468470 
    469 function set_post_views_count(&$content) { 
     471function set_post_views_count($content) { 
    470472        if ( empty($_GET["feed"]) &&  empty($GLOBALS["feed"]) && empty($GLOBALS["doing_trackback"]) && empty($GLOBALS["doing_rss"]) && empty($_POST) && is_single() ){ 
    471473                post_views_counting(); 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp_old.php

    r378 r488  
    190190 
    191191endif;  // Under WP2.5 
     192 
     193// Under WP2.7 
     194if (version_compare($xoops_config->wp_version,'2.6', '<')) : 
     195        /** 
     196         * Guess the URL for the site. 
     197         * 
     198         * Will remove wp-admin links to retrieve only return URLs not in the wp-admin 
     199         * directory. 
     200         * 
     201         * @since 2.6.0 
     202         * 
     203         * @return string 
     204         */ 
     205        function wp_guess_url() { 
     206        if ( defined('WP_SITEURL') && '' != WP_SITEURL ) { 
     207                $url = WP_SITEURL; 
     208        } else { 
     209                $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 
     210                $url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 
     211        } 
     212        return $url; 
     213} 
     214endif;  // Under WP2.6 
    192215 
    193216// Under WP2.7 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php

    r452 r488  
    242242        if (is_admin()) return $query_vars; 
    243243         
    244         $author_cookie = get_xpress_dir_name() . "_select_author" ; 
     244        $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 
    245245        if(xpress_is_multi_user()){ 
    246246                if (!empty($_GET)){ 
     
    290290} 
    291291 
    292 function xpress_query_filter(&$query) 
     292function xpress_query_filter($query) 
    293293{ 
    294294        if (is_admin()) return $query; 
    295295 
    296         $author_cookie = get_xpress_dir_name() . "_select_author" ; 
     296        $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 
    297297         
    298298        if (strpos($query,'SELECT') === false)  return $query; 
     
    357357} 
    358358 
    359 function safe_site_url_filter($site_url){ 
    360         global $xoops_config; 
    361         if (!$xoops_config->is_wpmu){ 
    362                 if ($site_url != get_xpress_url()) $site_url = get_xpress_url(); 
    363         } 
    364         return $site_url; 
    365 } 
    366  
    367359function get_block_file_path($mydirname,$file_name) 
    368360{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php

    r451 r488  
    7171} 
    7272add_action("wp_meta" , "wp_meta_add_xpress_menu");                      // add xpress menu  in wp_meta 
    73          
    74 //Site URL check 
    75 add_filter('option_home',                       "safe_site_url_filter"); 
    76 add_filter('option_siteurl',            "safe_site_url_filter"); 
    77          
    7873 
    7974//XOOPS Bloack Cache Refresh 
     
    301296 
    302297include_once dirname( __FILE__ ).'/include/dashboard_feed.php' ; 
    303  
    304 include_once dirname( __FILE__ ).'/xpressme_widget_class.php' ; 
    305  
     298if(xpress_is_wp_version('>=','2.8')){ 
     299        include_once dirname( __FILE__ ).'/xpressme_widget_class.php' ; 
     300} 
    306301?> 
Note: See TracChangeset for help on using the changeset viewer.