Skip to:

Working for anyone with latest WP / BP ?

  • shanebp


    Can anyone confirm that this works with WP 3.0.4 and BP 1.2.7

    The below goes into an infinite loop for any url

    MM_BUDDYPRESS_PRIVATE_COMMUNITY::$ALLOWED_URIS = Array(‘/about’, ‘/contact’);

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

  • NipponMonkey


    Well, your $REDIRECT_TO_URL page isn’t in the list of allowed URIs(!) as required for the plugin to work.

    Add ‘/home’ to the Array of $ALLOWED_URIS – this should help.

    I’m having an issue as well. My config:

    `MM_BUDDYPRESS_PRIVATE_COMMUNITY::$ALLOWED_URIS = Array(‘/joinus’,’/contact’, ‘/about’, ”,’/news’,’/get-involved’,’/faq’,’/kvn’);

    Any time I try to any page besides the home page it tries to redirect me to http://localhost/kvn/joinus?bp_redir_to=/kvn/joinus

    Right now the home page is http://localhost/kvn/, which, like I said, works fine.

    My config file is at buddypress-private-community-config/mm-buddypress-private-community-config.php

    P.S.: I only added the ‘/kvn’ to ALLOWED_URIS to see if it was having WordPress in a subdir that was causing the issue.

    I’ve made some code changes to restrict_access()

    I removed all of the preg_* functions because they weren’t necessary and generally slow. Also removed the big for loop. It’s now using $wp->query_vars; instead of trying to hack apart $_SERVER.

    As a side effect, users don’t need to have preceding slashes in all of their allowed uri’s and it will work with WP sites that are in subdirectories.

    Please check this out and consider adding it back to the plugin. I may have removed code that was doing something specific for you, but this is working good for me. Some attribution would be nice if you decide to use it :) (

    Thanks for your work, by the way. This plugin is saving me a good amount of time on a client project.



    @neiltron, using $wp->query_vars; doesn’t work in the same way as my code. Some plugins use query strings like “?event_id=4”, using $wp->query_vars doesn’t get this extra information that is vital for a correct redirect uri.

    I’ve made some updates myself, not live yet – still testing:
    – the plugin will work the same when WP is in a sub foulder. ({BP})
    – New method for blocking widgets, and widgets can be blocked on an widget ID basis when the user is logged out – and the widgets are blocked for all themes.
    – Added an extra mode that allows you to allow access to everyone (logged out users) and block some private URIs (the opposite to how it currently works).

    I’ll upload the new version once I’ve done a bit more testing…

    David G. Johnson


    Still a little confused… should I expect this to work on a new WP/BP site running the latest versions? It looks to be exactly like what I need, so I’d love to be able to use it!


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Working for anyone with latest WP / BP ?’ is closed to new replies.
Skip to toolbar