WordPress.org

Ready to get started?Download WordPress

Forums

BP My Home
[resolved] Use as home page landing upsets MS subdomains - possibly!! (5 posts)

  1. Hugo
    Member
    Posted 1 year ago #

    Hi Imath,

    I'll start by saying I have not had time to test this at all so may be jumping to entirely the wrong conclusions if so apologies in advance.

    Just had issue on an MS installation where trying to go to a users site / subdomain blog resulted in being constantly directed to their profile 'bp my home landing page' disabling plugin resolved issue and subdomain blog again reachable.

    Feels like a re-write is getting in the way of the .htacess one to re-direct to subdomain?

    http://wordpress.org/extend/plugins/bp-my-home/

  2. imath
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Hugo,

    Thanks for your feedback, i think the problem is linked to the option the user may have saved for his landing page. If he choosed bp my home then as soon as url has no querystring it redirects to his page. I think the admin can from the bp my home settings disable this feature for all users.
    This should fix the issue. I'll see how to deal with subdomains for this feature.

  3. imath
    Member
    Plugin Author

    Posted 1 year ago #

    @hnla

    Hugo, can you try to replace the function bpmh_is_root_home_page() in the file bp-my-home/includes/functions.php from line 315 to 343 by this one :

    /**
     * Checks if the loggedin user choose my home as the website landing page
     *
     * @global blog_id current blog id
     * @uses  is_user_logged_in() to check if the user is logged in
     * @uses  bp_get_option() to check for a different admin setting
     * @uses  bp_loggedin_user_id() to get current user's id
     * @uses  get_user_meta() to get user's preference
     * @uses  bpmh_admin_allowed_home_page() to check if the admin authorized this behavior
     * @return boolean true|false
     */
    function bpmh_is_root_home_page() {
    	global $blog_id;
    
    	$retval = false;
    
    	if( $blog_id != bp_get_root_blog_id() )
    		return $retval;
    
    	if( is_user_logged_in() && is_front_page() ) {
    
    		$user_id = bp_loggedin_user_id();
    
    		$user_setting = get_user_meta( $user_id, 'bpmh_user_home_page', true );
    
    		if( !empty( $user_setting ) )
    			$retval = true;
    
    		if( !bpmh_admin_allowed_home_page() )
    			$retval = false;
    
    	}
    
    	return apply_filters( 'bpmh_is_root_home_page', $retval );
    }

    I think it should fix the issue, if so, i'll do a quick upgrade.

    Thanks again for your help.

  4. willandmae
    Member
    Posted 9 months ago #

    @imath, Wow it does work. So Sorry the error was mine, forgot the last closing } but I tried it again and Yes it works! Thank you so Much!

    Wow, It works hehehehe

    Thank you again.

    William

  5. imath
    Member
    Plugin Author

    Posted 9 months ago #

    Thanks for your feedback, just published an upgrade for WordPress 3.8

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.