Skip to:
Content
Pages
Categories
Search
Top
Bottom

Install BP in a Sub-Blog

  • Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    This is an issue for me since the beginning… Is it possible to run BP with everything attached to it (all the functions, overview, activity etc) in something else than the root-blog? Until now, i couldn’t figure it out how (I tries it in subdomain and subdirectories install…).

    I think native it’s not possible… but please teach me differently…

    Or: Does someone have a trick to do it?

    THANKS!

Viewing 21 replies - 1 through 21 (of 21 total)
  • http://codex.buddypress.org/how-to-guides/changing-internal-configuration-settings/

    define ( ‘BP_ROOT_BLOG’, 117 );

    Will run on blog ID 117.

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    In addition to what DJPaul said, BuddyPress no longer requires itself to be activated site wide. You can pick and choose which blogs BuddyPress is loaded on in each specific blogs’ plugins screen.

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    I’m thinking about doing this.

    Let’s say I have a root blog with a custom WP theme and I want to create a sub-blog with the slug “community”.

    So can I assume I can activate another theme, like the BP default theme, on sub-blog “community”, and that the URLs to profiles / groups / etc would be:

    – hxxp://example.com/community/members/profile/admin

    – hxxp://example.com/community/groups

    If I move some BP functions into the root blog, would the registration slug still be:

    – hxxp://example.com/register

    Or would it be hxxp://example.com/community/register ?

    I guess there’s only one way to find out! Going to test it right now.

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    If you have MU set as a subdirectory install, make a second blog called “community” and then set it as the BP root blog, everything would assume http://example.com/community/ is the root URL.

    Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    Thanks for all the good hints and advice.

    It’s working great! I even changed the slug-urls…

    One little pushback: All the old activity has the old links and is therefore pointing to nowhere… But I guess that’s not changeable?

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    @Michael

    You can change this with a little .htaccess magic.

    Say your Buddypress is setup in the following sub-blog – hxxp://example.com/community

    Find where your wp-config.php file is located and in the same directory there should be a .htaccess file. Open it up in a text editor.

    Above the line:

    # add a trailing slash to /wp-admin

    Add the following:

    RedirectMatch 301 ^/members/(.*)$ http://example.com/community/members/$1
    RedirectMatch 301 ^/groups/(.*)$ http://example.com/community/groups/$1
    RedirectMatch 301 ^/blogs/(.*)$ http://example.com/community/blogs/$1
    RedirectMatch 301 ^/forums/(.*)$ http://example.com/community/forums/$1

    This should correctly redirect your old BP links to the new ones.

    @JJJ

    In the example above, is there anyway I can use:

    hxxp://example.com/register

    Instead of:

    hxxp://example.com/community/register

    I don’t mind hacking a few core files to accomplish this. If not, I can always theme the registration / activate pages to match the WPMU root blog.

    I’ve only spent a few minutes looking into this so far and I haven’t found a way.

    Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    WOW – thanks r-a-y – you are great. Now I can switch it without bothering! Thanks alot!

    Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    This info should go in the codex, who’s up for it?

    Avatar of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    I’m up for it ~ http://codex.buddypress.org/how-to-guides/install-buddypress-on-a-secondary-blog/

    ~ although it’s my first codex edit (w00t).. so ya’ll may want to review it! *and note that the ‘home’ in the secondary nav is pointing to MEMBERS_SLUG in the codex.

    Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    Great! For all the dummys like I am it maybe would help to add this line somwhere as an example too:

    define ( ‘BP_ROOT_BLOG’, 117 );

    –>Blog Nr.117

    So that none puts

    define ( ‘BP_ROOT_BLOG’, $blog_id );

    in it :-)

    Avatar of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    thks for the good advice – it’s edited. I can imagine the threads now “I follow these instructions and now my whole site is broke PLEASE HELP!!! “

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    I’ve edited the codex page for flow and structure – plus I added the second bullet point to the instructions.

    Feel free to make revisions!

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Just figured out we also need to put up instructions to migrate user and group avatars.

    If I don’t get to it first, whomever puts up the instructions wins a prize!*

    *The prize is the neat satisfaction you get for helping the BP community ;)

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    I guess I win the prize! ;)

    Added instructions to keep old user / group avatars:

    http://codex.buddypress.org/how-to-guides/install-buddypress-on-a-secondary-blog/

    Michael (or someone else), let me know if these instructions work for you.

    I have a feeling the absolute path is going to throw some people off… feel free to edit the page!

    Avatar of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    r-a-y~r-a-y once again, you is the man. The Instructions read like you’ve been doing software documentation for years.

    Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    It is very understandable (even for me :-)). But the question: Do I have to do this? Or when do preoblems occur, if I don’t do this. I moved my testinstall to a subblog (subdirectories) and didn’t experience any problems? Would it mess up with a subdomain install?

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Hey gang,

    For those installing BP in a secondary blog, does the message autocomplete username feature work for you?

    http://trac.buddypress.org/ticket/1812

    It doesn’t work for me. Just making sure if someone else can duplicate this issue.

    Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    duplicated and ticket reactivated…

    any answer to my question? :-)

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Hey Michael,

    Forgot about your question.

    If your old member / group avatars work without redefining the avatar URL and upload path, then that’s good for you :)

    I also can’t tell you what will happen with subdomains.

    The only thing I can say is try to break it! ;)

    Try uploading a new avatar with an old user and see what happens.

    Avatar of Anointed
    Anointed
    Participant

    @anointed

    In addition to what DJPaul said, BuddyPress no longer requires itself to be activated site wide. You can pick and choose which blogs BuddyPress is loaded on in each specific blogs' plugins screen.

    When I activate bp on one site, it shows up in the plugins folder as activated site wide. I do not see an option of only activating it on a given blog.

    I am running wpmu2.9.1 and bp 1.2beta using subdomains install.

    I have also set bp root blog to all sites…. maybe that is the problem?

    Avatar of rockyteng
    rockyteng
    Participant

    @rockyteng

    hi Windhamdavid,

    by saying [note that the 'home' in the secondary nav is pointing to MEMBERS_SLUG in the codex. ]

    could you explain a bit further

    i came with a problem and search on the forum a lot but could not find an answer.

    you can see the problem here

    http://buddypress.org/forums/topic/profile-links-broken-on-secondary-blog#post-38468

    thanks very much for your help.

    rocky

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

You must be logged in to reply to this topic.