Skip to:
Content
Pages
Categories
Search
Top
Bottom

Domain specific logic for URLs


  • nsbp001
    Participant

    @nsbp001

    I am trying to build a Multisite BP site with Multidomains. That is, I have a main domain for the entire installation, and several other user domains for individual sites/members. Individual sites/users can choose one of those domains for their account.

    As a user navigates around the site, especially the BP components, I want the URL for their account, and the account of others to reflect the user’s domain choice.

    How would I use the MULTIPLE_DOMAIN_DOMAIN and MULTIPLE_DOMAIN_ORIGINAL_DOMAIN constants such that URL for each user’s profile, pages, posts etc reflect that user’s choice?

    Also, I want the main domain to be concealed from the users. So when they are signed on, all the BP components’ URLs are prepended with their (the user’s) domain choice and not the main domain name.

    Is there a way to implement that?

Viewing 5 replies - 1 through 5 (of 5 total)

  • ronabarbanel
    Participant

    @ronabarbanel

    I am having a very similar problem. Each site in my multisite needs to stay within the scope of the URL used to access the site. However, the menu items for buddypress are only available on the main site. Is there a way to have access to the menu items on each subsite that keep navigation in the scope of the subsite?


    nsbp001
    Participant

    @nsbp001

    When this code is put into the theme’s functions.php file

    function multiple_bp_domain($domain) {

    return get_bloginfo( ‘url’ );

    }

    add_filter(‘bp_get_root_domain’, ‘multiple_bp_domain’);

    the result is that the siteURL replaces the main site URL


    ronabarbanel
    Participant

    @ronabarbanel

    I am not sure how that solves my problem. How do I add a menu item for say “activity” on my subsite so that it shows the activity (as it does on the main site) but within my subsite scope?


    nsbp001
    Participant

    @nsbp001

    So you want to have multi-site, with multi-domains, i.e., you will have users on sites with different domains, all sharing the same database; but you want an Activity stream for just sites that use a particular domain.

    Off hand, one way is to make a home site for each domain, then make sure that site is Following all other sites that use that domain. Then that home site will have something like …/members/domainhomesite/activity/following.

    Maybe you don’t necessarily need a domainhomesite, just a user, say followdomainusers, whose purpose is to follow all users on the domain; then the Activity stream could be …/members/followdomainusers/activity/following.


    ronabarbanel
    Participant

    @ronabarbanel

    Ok, after a lot of digging, this solution worked for me:

    BP_ENABLE_MULTIBLOG

    by enabling that flag, each multisite has access to the pages needed along with the menu items.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar