Skip to:
Content
Pages
Categories
Search
Top
Bottom

Install bbpress in a subdirectory of multi site


  • Jdamonte
    Participant

    @jdamonte

    Hi, I am trying to set up the bbpress forum as private on a subdirectory of a multi site and am not sure of the most practical approach. If I enable it on the subsite I can’t make the pages such as login, register, lost p/w etc. as the templates don’t show on the sub-directory only on the main site.

    Any ideas would be really appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I have a similar situation, although I will have forums on other subsites eventually, so I have it enabled over the whole site, but I only created forums on one subsite.

    The only thing I think I had to do was set up rewrites in .htaccess from all other subsites and the main site to view user profile pages.

    For the main page:

    RewriteRule ^users/(.*)$ /forums/users/$1 [L,R=301]

    For subsites:

    RewriteRule ^[subsite]/users/(.*)$ /forums/users/$1 [L,R=301]

    Also, I am using the “Move Privacy Options” plugin to make the subsite private, and I noticed that the bbpess rss feeds are not private. I am currently woking on fixing this and so far this is what I have got, which is by no means perfect.

    You will need to find the functions bbp_display_topics_feed_rss2 and bbp_display_replies_feed_rss2 in bbp-topic-functions.php and bbp-reply-functions.php respectively, and add this code to the beginning of each fuction

    if (!isset($_SERVER['PHP_AUTH_USER'])) {
    header('WWW-Authenticate: Basic realm="My Website"');
    header('HTTP/1.1 401 Authorization Required');
    exit;
    }
    $user = wp_authenticate($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);

    if ( !$user || is_wp_error($user) ) {
    header('WWW-Authenticate: Basic realm="My Website"');
    header('HTTP/1.1 401 Authorization Required');
    }

    Which should limit who can read the rss feeds to people who have a login to your wordpress site.


    Jdamonte
    Participant

    @jdamonte

    Thanks for this info, can you also tell me where to place the re-write rules for the main site and sub sites?


    Jdamonte
    Participant

    @jdamonte

    I’m sorry I see that its to add to .htaccess…thanks again, I’ll let you know how I go. CHeers

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

You must be logged in to reply to this topic.