XPressME Integration Kit

Trac

Changeset 531


Ignore:
Timestamp:
Mar 9, 2010, 10:47:23 AM (14 years ago)
Author:
toemon
Message:

WordPressMU対応コードの削除 Fixes #294

Location:
trunk
Files:
1 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/extras/for_wordpressme2011/ja_EUC/wp-config.php

    r355 r531  
    5151define('NONCE_KEY', 'put your unique phrase here'); 
    5252 
    53 if ($xoops_config->is_wpmu){    //for WordPressMU 
    54         define('VHOST', 'no');  
    55         $base = $xoops_config->mu_path_current_site; 
    56         define('DOMAIN_CURRENT_SITE', $xoops_config->mu_domain_current_site ); 
    57         define('PATH_CURRENT_SITE', $xoops_config->mu_path_current_site ); 
    58         define('SITE_ID_CURRENT_SITE', 1); 
    59         define('BLOGID_CURRENT_SITE', '1' ); 
    60  
    61         define('AUTH_SALT', 'put your unique phrase here'); 
    62         define('LOGGED_IN_SALT', 'put your unique phrase here'); 
    63         define('SECURE_AUTH_SALT', 'put your unique phrase here'); 
    64 } 
    65  
    6653/** 
    6754 * WordPress Database Table prefix. 
  • trunk/extras/for_wordpressme2011/ja_UTF/wp-config.php

    r355 r531  
    5050define('NONCE_KEY', 'put your unique phrase here'); 
    5151 
    52 if ($xoops_config->is_wpmu){    //for WordPressMU 
    53         define('VHOST', 'no');  
    54         $base = $xoops_config->mu_path_current_site; 
    55         define('DOMAIN_CURRENT_SITE', $xoops_config->mu_domain_current_site ); 
    56         define('PATH_CURRENT_SITE', $xoops_config->mu_path_current_site ); 
    57         define('SITE_ID_CURRENT_SITE', 1); 
    58         define('BLOGID_CURRENT_SITE', '1' ); 
    59  
    60         define('AUTH_SALT', 'put your unique phrase here'); 
    61         define('LOGGED_IN_SALT', 'put your unique phrase here'); 
    62         define('SECURE_AUTH_SALT', 'put your unique phrase here'); 
    63 } 
    64  
    6552/** 
    6653 * WordPress Database Table prefix. 
  • trunk/extras/xpress_i18n/en/xpressme_modules_root/wp-config.php

    r393 r531  
    5050define('NONCE_KEY', 'put your unique phrase here'); 
    5151 
    52 if ($xoops_config->is_wpmu){    //for WordPressMU 
    53         define('VHOST', 'no');  
    54         $base = $xoops_config->mu_path_current_site; 
    55         define('DOMAIN_CURRENT_SITE', $xoops_config->mu_domain_current_site ); 
    56         define('PATH_CURRENT_SITE', $xoops_config->mu_path_current_site ); 
    57         define('SITE_ID_CURRENT_SITE', 1); 
    58         define('BLOGID_CURRENT_SITE', '1' ); 
    59  
    60         define('AUTH_SALT', 'put your unique phrase here'); 
    61         define('LOGGED_IN_SALT', 'put your unique phrase here'); 
    62         define('SECURE_AUTH_SALT', 'put your unique phrase here'); 
    63 } 
    64  
    6552/** 
    6653 * WordPress Database Table prefix. 
  • trunk/extras/xpress_i18n/portuguese-br/xpressme_modules_root/wp-config.php

    r366 r531  
    4949/**#@-*/ 
    5050 
    51 if ($xoops_config->is_wpmu){    //para WordPressMU 
    52         define('VHOST', 'no');  
    53         $base = $xoops_config->mu_path_current_site; 
    54         define('DOMAIN_CURRENT_SITE', $xoops_config->mu_domain_current_site ); 
    55         define('PATH_CURRENT_SITE', $xoops_config->mu_path_current_site ); 
    56         define('SITE_ID_CURRENT_SITE', 1); 
    57         define('BLOGID_CURRENT_SITE', '1' ); 
    58  
    59         define('AUTH_SALT', 'coloque sua frase única aqui'); 
    60         define('LOGGED_IN_SALT', 'coloque sua frase única aqui'); 
    61         define('SECURE_AUTH_SALT', 'coloque sua frase única aqui'); 
    62 } 
    63  
    6451/** 
    6552 * Prefixo da tabela do banco de dados do WordPress. 
  • trunk/extras/xpress_i18n/template/xpressme_modules_root/wp-config.php

    r393 r531  
    5050define('NONCE_KEY', 'put your unique phrase here'); 
    5151 
    52 if ($xoops_config->is_wpmu){    //for WordPressMU 
    53         define('VHOST', 'no');  
    54         $base = $xoops_config->mu_path_current_site; 
    55         define('DOMAIN_CURRENT_SITE', $xoops_config->mu_domain_current_site ); 
    56         define('PATH_CURRENT_SITE', $xoops_config->mu_path_current_site ); 
    57         define('SITE_ID_CURRENT_SITE', 1); 
    58         define('BLOGID_CURRENT_SITE', '1' ); 
    59  
    60         define('AUTH_SALT', 'put your unique phrase here'); 
    61         define('LOGGED_IN_SALT', 'put your unique phrase here'); 
    62         define('SECURE_AUTH_SALT', 'put your unique phrase here'); 
    63 } 
    64  
    6552/** 
    6653 * WordPress Database Table prefix. 
  • trunk/xpressme_integration_kit/class/config_from_xoops.class.php

    r492 r531  
    3737        var $is_impress; 
    3838        var $impress_db_config_file; 
    39         var $is_wpmu; 
    40         var $mu_domain_current_site; 
    41         var $mu_path_current_site; 
    4239        var $wp_db_version; 
    4340        var $wp_version; 
     
    104101                $this->set_module_version(); 
    105102                $this->set_wp_version(); 
    106                 $this->set_mu_current_site(); 
    107103                $this->xpress_get_module_id(); 
    108104                $this->xoops_language = $this->xpress_get_xoops_config('language'); 
     
    292288        include dirname(dirname(__FILE__)) . '/wp-includes/version.php'; 
    293289         
    294         if (empty($wpmu_version)) 
    295                 $this->is_wpmu  = false; 
    296         else 
    297                 $this->is_wpmu  = true; 
    298          
    299290        $this->wp_db_version = $wp_db_version; 
    300291                 
     
    309300    } 
    310301     
    311     function set_mu_current_site(){ 
    312         $pattern = 'http:\/\/([^\/]*).*'; 
    313         if (preg_match('/' . $pattern . '/' ,$this->xoops_url,$matchs)){ 
    314                                 $this->mu_domain_current_site = $matchs[1]; 
    315                 } 
    316                  
    317         $pattern = 'http:\/\/[^\/]*(\/.*)'; 
    318         if (preg_match('/' . $pattern . '/' ,$this->module_url,$matchs)){ 
    319                                 $this->mu_path_current_site = $matchs[1] . '/'; 
    320                 } 
    321     } 
    322  
    323302        function xpress_get_xoops_config($config_name = '',$mid = 0){ 
    324303                $ret = ''; 
  • trunk/xpressme_integration_kit/include/oninstall.php

    r465 r531  
    167167        if ( !$user_id ) { 
    168168                $random_password = 'admin'; 
    169                 if (!$xoops_config->is_wpmu){ 
    170                         $user_id = wp_create_user($user_name, $random_password, $email); 
    171                 } else { 
    172                         $user_id = wpmu_create_user($user_name, $random_password, $email); 
    173                 } 
     169                $user_id = wp_create_user($user_name, $random_password, $email); 
    174170        } else { 
    175171                $random_password = __('User already exists.  Password inherited.'); 
     
    186182         
    187183// Set Default data 
    188         if (!$xoops_config->is_wpmu){   // for WordPress  
    189                 // make WordPress Default data   
    190                 if (function_exists('wp_install_defaults')){ 
    191                         wp_install_defaults($user_id); 
    192                 } else { 
    193                         wp_install_old_defaults($user_id); 
    194                 } 
    195                  
    196                 $ret[] = 'The first sample post & comment was written.<br />'; 
    197                  
    198                 // Rewrite Option for Xpress 
    199                         if (WPLANG == 'ja_EUC') { 
    200                                 $setup_charset = 'EUC-JP'; 
    201                         } elseif(WPLANG == 'ja_SJIS') { 
    202                                 $setup_charset = 'Shift_JIS'; 
    203                         } else { 
    204                                 $setup_charset = 'UTF-8'; 
    205                         } 
    206                         update_option("blog_charset", $setup_charset); 
    207  
    208                         update_option('blogname', $site_name );  
    209                         update_option('blogdescription', 'WordPress for XOOPS'); 
    210                         update_option("admin_email", $GLOBALS["xoopsConfig"]['adminmail']); 
    211                         update_option("ping_sites", "http://rpc.pingomatic.com/\nhttp://ping.xoopsforge.com/"); 
    212                         update_option("home", $site_url); 
    213                         update_option("siteurl", $site_url); 
    214                         update_option("what_to_show", "posts"); 
    215                         update_option('default_pingback_flag', 0); 
    216                         $ret[] = 'The initial data was written in the data base of wordpress.<br />'; 
     184        // make WordPress Default data   
     185        if (function_exists('wp_install_defaults')){ 
     186                wp_install_defaults($user_id); 
     187        } else { 
     188                wp_install_old_defaults($user_id); 
     189        } 
     190         
     191        $ret[] = 'The first sample post & comment was written.<br />'; 
     192         
     193        // Rewrite Option for Xpress 
     194        if (WPLANG == 'ja_EUC') { 
     195                $setup_charset = 'EUC-JP'; 
     196        } elseif(WPLANG == 'ja_SJIS') { 
     197                $setup_charset = 'Shift_JIS'; 
     198        } else { 
     199                $setup_charset = 'UTF-8'; 
     200        } 
     201        update_option("blog_charset", $setup_charset); 
     202 
     203        update_option('blogname', $site_name );  
     204        update_option('blogdescription', 'WordPress for XOOPS'); 
     205        update_option("admin_email", $GLOBALS["xoopsConfig"]['adminmail']); 
     206        update_option("ping_sites", "http://rpc.pingomatic.com/\nhttp://ping.xoopsforge.com/"); 
     207        update_option("home", $site_url); 
     208        update_option("siteurl", $site_url); 
     209        update_option("what_to_show", "posts"); 
     210        update_option('default_pingback_flag', 0); 
     211        $ret[] = 'The initial data was written in the data base of wordpress.<br />'; 
     212         
     213        update_option("template", "xpress_default"); 
     214        update_option("stylesheet", "xpress_default"); 
     215        $ret[] = 'The default theme of wordpress was set to xpress_default.<br />'; 
     216//      update_option('uploads_use_yearmonth_folders', 1); 
     217        update_option('upload_path', 'wp-content/uploads'); 
    217218                         
    218                         update_option("template", "xpress_default"); 
    219                         update_option("stylesheet", "xpress_default"); 
    220                         $ret[] = 'The default theme of wordpress was set to xpress_default.<br />'; 
    221                 //      update_option('uploads_use_yearmonth_folders', 1); 
    222                         update_option('upload_path', 'wp-content/uploads'); 
    223                          
    224         } else {        // for WordPress MU 
    225                 global $base,$current_site, $dirs, $wpmu_version; 
    226                  
    227                 $base =  $xoops_config->mu_path_current_site; 
    228                 $domain = $xoops_config->mu_domain_current_site; 
    229                 $admin_email = $GLOBALS["xoopsConfig"]['adminmail']; 
    230                 $admin_user_name = $user_name; 
    231                 $admin_user_id = $user_id; 
    232                 include_once($mydirpath . '/include/xpress_mu_function.php'); 
    233                  
    234                 do_htaccess( $xoops_config->module_path . '/htaccess.dist', $xoops_config->module_path . '/.htaccess', $base, ''); 
    235                 xpress_mu_install_defaults($domain,$base,$site_name,$admin_user_id,$admin_user_name,$admin_email); 
    236         } 
    237          
    238219// activate the xpressme plugin 
    239220        require_once dirname( __FILE__ ).'/xpress_active_plugin.php'; 
  • trunk/xpressme_integration_kit/wp-config.php

    r355 r531  
    5050define('NONCE_KEY', 'put your unique phrase here'); 
    5151 
    52 if ($xoops_config->is_wpmu){    //for WordPressMU 
    53         define('VHOST', 'no');  
    54         $base = $xoops_config->mu_path_current_site; 
    55         define('DOMAIN_CURRENT_SITE', $xoops_config->mu_domain_current_site ); 
    56         define('PATH_CURRENT_SITE', $xoops_config->mu_path_current_site ); 
    57         define('SITE_ID_CURRENT_SITE', 1); 
    58         define('BLOGID_CURRENT_SITE', '1' ); 
    59  
    60         define('AUTH_SALT', 'put your unique phrase here'); 
    61         define('LOGGED_IN_SALT', 'put your unique phrase here'); 
    62         define('SECURE_AUTH_SALT', 'put your unique phrase here'); 
    63 } 
    64  
    6552/** 
    6653 * WordPress Database Table prefix. 
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php

    r527 r531  
    4141} 
    4242 
    43 function xpress_is_wpmu() { 
    44         global $xoops_config; 
    45          
    46         return $xoops_config->is_wpmu; 
    47 } 
    48  
    4943function xpress_is_multiblog() { 
    5044        global $xoops_config; 
    5145         
    5246        if (defined('MULTISITE')) return MULTISITE; 
    53         return $xoops_config->multiblog; 
     47        return false; 
    5448} 
    5549 
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php

    r518 r531  
    213213                echo                    '<table class="form-table">'."\n"; 
    214214                $upload_title = __('Media Upload Base Path','xpressme'); 
    215                 if($xoops_config->is_wpmu) $upload_title = $upload_title . '(WPMU is not select)'; 
     215                if(xpress_is_multiblog()) $upload_title = $upload_title . '(MultiBlog is not select)'; 
    216216                echo                            $xpress_config->yes_no_radio_option('is_use_xoops_upload_path', 
    217217                                                                                                $upload_title, 
    218218                                                                                                __('Use XOOPS UPLOAD PATH','xpressme'), 
    219219                                                                                                __('USE WordPress BASE_PATH','xpressme'), 
    220                                                                                                 $xoops_config->is_wpmu 
     220                                                                                                xpress_is_multiblog() 
    221221                                                                                                ); 
    222222                $lock = ($xoops_config->module_url != get_bloginfo('url')); 
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php

    r518 r531  
    303303 
    304304                global $xoops_config; 
    305                 if($xoops_config->is_wpmu) $this->is_use_xoops_upload_path = false; 
     305                if(xpress_is_multiblog()) $this->is_use_xoops_upload_path = false; 
    306306 
    307307                $table = get_wp_prefix() . 'group_role';         
     
    584584                        $selected = ''; 
    585585                 
    586                 if ($xoops_config->is_wpmu) { 
    587                         $forum_list .= '<option value="none"' . $selected . '>' . __('WordPress MU cannot integrate the comments.', 'xpressme') . "</option>\n"; 
     586                if (xpress_is_multiblog()) { 
     587                        $forum_list .= '<option value="none"' . $selected . '>' . __('WordPress MultiBlog cannot integrate the comments.', 'xpressme') . "</option>\n"; 
    588588                } else {         
    589589                        $forum_list .= '<option value="none"' . $selected . '>' . __('Do Not Comment Integration.', 'xpressme') . "</option>\n"; 
Note: See TracChangeset for help on using the changeset viewer.