Skip to:
Content
Pages
Categories
Search
Top
Bottom

Running BuddyPress in a subdirectory


  • jugoretz
    Participant

    @jugoretz

    This is more a how-to than a request for help, at this point. Just in case others are interested in how to do this.

    BuddyPress really seems to be designed to run in the root of a WPMU install, but for my purposes, that’s not what I wanted to do. I already had a functioning and active WPMU install at http://macaulay.cuny.edu/eportfolios . I wanted to have BP functioning for that WPMU install, but in a directory below that, reserving that root main blog for my “gateway.” I wanted to have http://macaulay.cuny.edu/eportfolios/social for the BP install.

    It installed fine, and most things worked right from the beginning, but there were some difficulties.

    First–the links across the top of the main page (the logo, the tabs for home, blog, members, groups, and blogs) did not work properly on the member pages (they worked on the home page). They directed to macaulay.cuny.edu/eportfolios/whatever, instead of macaulay.cuny.edu/eportfolios/social/whatever.

    So to fix that, I went into wp-content/member-themes/buddypress-member/header.php

    Line 37, 40, 41, 42, 44, and 49, I changed the URL to be a hardcoded reference to the appropriate pages.

    Then I found that the search bar (in the top bar) did not work–it was also trying to search /eportfolios instead of /eportfolios/social.

    For that one I had to go to wp-content/mu-plugins/bp-core.php and add /social to the urls in lines 1266, 1269, 1272.

    That fixed the search bar nicely on the member pages, but not on the home page–and I couldn’t figure that out, so I just commented out the lines calling for that search bar in wp-content/themes/buddypress-home/header.php . If it didn’t work right, I didn’t want it!

    I also wanted the hotlinks in people’s profiles to work–and they didn’t–so for that I had to change wp-content/mu-plugins/bp-xprofile/bp-xprofile-filers.php (line 51) to use the actual url /eportfolios/social/members/?s= instead of the site_url and MEMBERS_SLUG .

    I guess ultimately there should be a plugin or a setting in the admin to help with all this? Then upgrades wouldn’t require re-doing all these little changes. But overall, I think it works, and it really is possible to have BP RC1 installed in a sub (or sub-sub) directory.

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

  • Andy Peatling
    Keymaster

    @apeatling

    This should not happen, I’ve tested in multiple levels of subdirectory installations and it all worked without the need for changes.

    There must be something wrong with your setup if you are seeing these issues. Are you running into further problems?


    jugoretz
    Participant

    @jugoretz

    Nope, no other problems, just the messaging problem I referred to in another thread (and maybe that’s related?). The other person I’ve found who has that problem does not seem to have a subdirectory install, though. (in the comments here http://futuristguy.wordpress.com/2009/01/05/missional-tribe-not-just-another-use-of-the-word-missional/)

    So far every other problem I’ve had has been clearly matched to this misalignment of /eportfolios and /eportfolios/social . And working out the right links has fixed all of those problems.

    But I think maybe I wasn’t clear–it’s not just that buddypress is in a sub-directory, the issue is that the buddypress homepage (home blog) is *not* the home blog of the wpmu install. Blog number 1 of wpmu is at /eportfolios and the buddypress home is /eportfolios/social

    Is that something you’ve tested and had full functionality without these changes? That would be great–would make upgrades easier–but I don’t see how.

    See, siteurl() is macaulay.cuny.edu/eportfolios . but in the case of those links in the top nav (and others) it should be macaulay.cuny.edu/eportfolios/social

    Tell me there’s something obvious I’m missing! That would be great!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Running BuddyPress in a subdirectory’ is closed to new replies.
Skip to toolbar