Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP Private Community config.php setup

  • Avatar of mmendezmi
    mmendezmi
    Member

    @mmendezmi

    Hi all, I’m working on a fresh install of wp 3.2.1 and bp 1.2.9- onplay theme modified with BP template pack. http://www.rowvision.com/ , http://www.rowvision.com/secret-millionaire-visits-skid-row/

    I’m having trouble with the buddpress private community plugin. The config file is named correctly and located in the right spot. I can tell this because the the widget block/allow is working perfectly and the site reflects the other changes I make to the config file with the exception of the redirect hook. I’m a little out of my depth and prob am not following the instructions correctly.

    I would like all non logged in users to who try to access content to be redirected to the login at ‘wp-login.php’ then be redirected to their content after they login.

    Now when signed out users try to reach the content they will get the message:
    “Warning: Cannot modify header information – headers already sent by (output started at /home4/rowvisio/public_html/wp-content/themes/onplay/single.php:10) in /home4/rowvisio/public_html/wp-includes/pluggable.php on line 934?

    Thanks! Here is my config file:

    `<?php

    MM_BUDDYPRESS_PRIVATE_COMMUNITY::$MODE = MM_BUDDYPRESS_PRIVATE_COMMUNITY::MODE_BLOCK_ALL_AND_ALLOW_SOME_URIS;

    MM_BUDDYPRESS_PRIVATE_COMMUNITY::$ALLOWED_URIS = Array(”,’/register’,’/wp-login.php’,’/media/*’,’/activate?key=*’);

    MM_BUDDYPRESS_PRIVATE_COMMUNITY::$REDIRECT_TO_URL = site_url() . ‘/wp-login.php’;

    MM_BUDDYPRESS_PRIVATE_COMMUNITY::$REDIRECT_HOOK = ‘bp_pc_redir_to’;

    MM_BUDDYPRESS_PRIVATE_COMMUNITY::$BLOCK_WIDGETS = TRUE;

    MM_BUDDYPRESS_PRIVATE_COMMUNITY::$ALLOWED_WIDGET_IDS = Array(‘loginwithajaxwidget-3′,’text-4′,’text-5′,’text-6′,’text-7′,’text-9′);`

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of mmendezmi
    mmendezmi
    Member

    @mmendezmi

    Hi @NipponMonkey , I see you’ve been able to help some others. what am I missing?

    Avatar of nipponmonkey
    NipponMonkey
    Member

    @nipponmonkey

    @mmendezmi, Hmmmm… I haven’t got time to fully look into this at the moment, but it looks like the problem is that you’ve set the redirect to the wp-login.php. I’m guessing that my plugin’s redirect is failing because the wp-login page is sending out header (or content) before the the plugin gets the chance to do the redirect – hence the error message.

    One way you can get around this problem is to redirect to a landing page that has the login options on it. As you’re allowing registrations I suggest you redirect to the /register page instead.

    That should fix the problem.

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

You must be logged in to reply to this topic.