Skip to:
Content

BuddyPress.org

Ticket #2489: 2489.diff

File 2489.diff, 3.9 KB (added by wpmuguru, 16 years ago)
  • bp-themes/bp-default/registration/register.php

     
    180180                                                        <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
    181181                                                        <?php do_action( 'bp_signup_blog_url_errors' ) ?>
    182182
    183                                                         <?php if ( 'yes' == VHOST ) : ?>
     183                                                        <?php if ( is_subdomain_install() ) : ?>
    184184                                                                http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" /> .<?php echo str_replace( 'http://', '', site_url() ) ?>
    185185                                                        <?php else : ?>
    186186                                                                <?php echo site_url() ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" />
     
    307307                });
    308308        </script>
    309309
    310 <?php get_footer() ?>
    311  No newline at end of file
     310<?php get_footer() ?>
  • bp-core/bp-core-wpabstraction.php

     
    8989                return true;
    9090        }
    9191}
     92
     93if ( !function_exists( 'is_subdomain_install' ) ) {
     94        function is_subdomain_install() {
     95                if ( ( defined( 'VHOST' ) && 'yes' == VHOST ) || ( defined( 'SUBDOMAIN_INSTALL' ) && SUBDOMAIN_INSTALL ) )
     96                        return true;
     97
     98                return false;
     99        }
     100}
  • bp-core/bp-core-catchuri.php

     
    135135        if ( !isset($is_root_component) )
    136136                $is_root_component = in_array( $bp_uri[0], $bp->root_components );
    137137
    138         if ( 'no' == VHOST && !$is_root_component ) {
     138        if ( !is_subdomain_install() && !$is_root_component ) {
    139139                $component_index++;
    140140                $action_index++;
    141141        }
     
    154154        unset($action_variables[$action_index]);
    155155
    156156        /* Remove the username from action variables if this is not a VHOST install */
    157         if ( 'no' == VHOST && !$is_root_component )
     157        if ( !is_subdomain_install() && !$is_root_component )
    158158                array_shift($action_variables);
    159159
    160160        /* Reset the keys by merging with an empty array */
     
    283283                bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'members/single/home' ) );
    284284}
    285285
    286 ?>
    287  No newline at end of file
     286?>
  • bp-blogs/bp-blogs-templatetags.php

     
    361361        global $current_site;
    362362
    363363        // Blog name
    364         if( 'no' == constant( "VHOST" ) )
     364        if( !is_subdomain_install() )
    365365                echo '<label for="blogname">' . __('Blog Name:', 'buddypress') . '</label>';
    366366        else
    367367                echo '<label for="blogname">' . __('Blog Domain:', 'buddypress') . '</label>';
     
    370370                <p class="error"><?php echo $errmsg ?></p>
    371371        <?php }
    372372
    373         if( 'no' == constant( "VHOST" ) ) {
     373        if( !is_subdomain_install() ) {
    374374                echo '<span class="prefix_address">' . $current_site->domain . $current_site->path . '</span> <input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="50" /><br />';
    375375        } else {
    376376                echo '<input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="50" /> <span class="suffix_address">.' . $current_site->domain . $current_site->path . '</span><br />';
    377377        }
    378378        if ( !is_user_logged_in() ) {
    379379                print '(<strong>' . __( 'Your address will be ' , 'buddypress');
    380                 if( 'no' == constant( "VHOST" ) ) {
     380                if( !is_subdomain_install() ) {
    381381                        print $current_site->domain . $current_site->path . __( 'blogname' , 'buddypress');
    382382                } else {
    383383                        print __( 'domain.' , 'buddypress') . $current_site->domain . $current_site->path;
     
    499499<?php
    500500}
    501501
    502 ?>
    503  No newline at end of file
     502?>