Skip to:
Content
Pages
Categories
Search
Top
Bottom

walled garden and bbpress

  • Profile photo of valuser
    valuser
    Participant

    @valuser

    Some time ago a contributor kindly provided a walled garden function that disabled access to buddypress pages by non-logged in users. (i think it was @aces)

    `function sh_walled_garden()
    {
    global $bp;
    if( bp_is_register_page() || bp_is_activation_page())
    return;
    if( ! bp_is_blog_page() && ! is_user_logged_in() )
    bp_core_redirect( bp_get_signup_page() );
    }
    add_action( ‘wp_loaded’, ‘sh_walled_garden’ );’

    However with bp 1.71 and bbpress 2.3.1 pages like forum-topics, and say, forums/forum/group-forums/ are still accessible by non-logged in users.

    Any idea on how to extend the functionality of the walled garden function to block access these bbpress pages by non-logged in users ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Profile photo of valuser
    valuser
    Participant

    @valuser

    Profile photo of bp-help
    bp-help
    Participant

    @bphelp

    @valuser
    Hey thanks for spotting the bug. I just updated the plugin to 1.4 so read the readme.txt and install it to check and see if the added code takes care of the issue. Thanks!
    https://github.com/bphelp/private_community_for_bp

    Profile photo of valuser
    valuser
    Participant

    @valuser

    Without removal of comments (as per readme file ) —– no change for either of my pages 1) /forum-topics/ and 2) /forums/forum/group-forums/

    When comments removed /forums/forum/group-forums/ is now protected and redirected (great! )

    but the page /forum-topics/ (a page with [bbp-topic-index] in it ) is still available tonon-logged in users but all links on the page lead to the redirect (great! )

    and

    while the page /forums/ is also available to non-logged in users all links on the page lead to the redirect (great! )

    so, while its not 110% lock-down essentially, as far as I am concerned, you have done it. Thanks!

    Profile photo of bp-help
    bp-help
    Participant

    @bphelp

    @valuser
    Thanks again for the feedback! I will see what I can do to lock down those pages as well.

    Profile photo of valuser
    valuser
    Participant

    @valuser

    An aside – it may or may not be relevant to tweaking your plugin

    I had previously experimented with other plugins

    pagerestrict at https://wordpress.org/extend/plugins/pagerestrict/ is effective BUT has no effect on /forums/ !!!!!

    while

    path access at https://wordpress.org/extend/plugins/path-access/ is effective but just goes to a page not found -it lacks the elegant redirect!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘walled garden and bbpress’ is closed to new replies.
Skip to toolbar