Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress on Separate Blogs


  • Sofian J. Anom
    Participant

    @lightcapturer

    I’m using Budypress 1.2.5.2, on WordPress MS. I’m thinking, could the activity, groups and forums, and blogs are placed on separate blogs, but the member pages are only on the main blog?

    Actually, I wanted to make the main blog just as a welcome page, login and registration form. I’ve tried to use “define (‘BP_ENABLE_MULTIBLOG’, true);”, but as a result, there are member pages on every blogs, and of course, the url of the member pages are also in accordance with the relevant blogs.

    Did anyone know, how to make it?

    Thank you in advance.

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

  • @mercime
    Keymaster

    @mercime

    “could the activity, groups and forums, and blogs are placed on separate blogs, but the member pages are only on the main blog”
    – No, BP components together on main blog or a sub-blog


    Sofian J. Anom
    Participant

    @lightcapturer

    Ok, @mercime, thanks for the answer. :)


    Brajesh Singh
    Participant

    @sbrajesh

    @lightcapturer @mercime
    It is possible.
    Try following code in bp-custom.php

    add_filter("bp_core_get_user_domain","only_for_root_domain");

    function only_for_root_domain($url){
    $url_parts=explode("/", $url);
    //find the username part
    $username=$url_parts[count($url_parts)-2];//the last tocken

    $root_domain=get_blog_option( BP_ROOT_BLOG, 'home' );
    /* If we are using a members slug, include it. */
    if ( !defined( 'BP_ENABLE_ROOT_PROFILES' ) )
    $domain = $root_domain. '/' . BP_MEMBERS_SLUG . '/' . $username . '/';
    else
    $domain = $root_domain . '/' . $username . '/';
    return $domain;

    }

    here is a pastebin link in case the above code does not et posted
    http://bpdev.pastebin.com/cqiHNnsx


    Sofian J. Anom
    Participant

    @lightcapturer

    @sbrajesh, thanks for the code and your quick respons. It’s works well for user profile pages. Then, what about the members list page (tab/menu), whether there is also a code that could make it redirected to the main blog?


    Brajesh Singh
    Participant

    @sbrajesh

    well, since members tab link is a matter of theme, if we hack the url, it will affect other tabs too(say activity/forums etc which i think you don’t want to redirect on main blog), so easy way will be to to edit the header.php and change the lines for member tab link in theme(forum does not allow here html so the link on pastebin).

    here is a link to pastebin http://bpdev.pastebin.com/0EXgZ4Sf


    Sofian J. Anom
    Participant

    @lightcapturer

    Editing the header.php, I was also thinking that way. And the code that you gave, is what I need.

    Thank you very much, @sbrajesh. It’s really useful. :)


    @mercime
    Keymaster

    @mercime

    @sbrajesh I am happy to stand corrected, thank you :-)


    imjscn
    Participant

    @imjscn

    @sbrajesh , the code solves the problem of member link, but groups and forums link are still follow the current viewing blogs.
    Sofian seperates BP components on different blogs, and seems he doesn’t need to create other blogs than bp components. If he create a new blog, groups and forums links still need to be twicked. How?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘BuddyPress on Separate Blogs’ is closed to new replies.
Skip to toolbar