Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of hnla

How to make a private community? (100 posts)

Started 1 year, 11 months ago by: nipponmonkey

  • Profile picture of nipponmonkey nipponmonkey said 1 year, 11 months ago:

    Hi I’m quite new to WP and BP and would like to know the best way to make a private community.

    Basically, I’d like:

    non members should only see a login/home page with no registration options.
    non members can not see any posts, usernames or anything else related to the community.
    all new members can only be created by admin.
    all logged in members have full posting rights.

    Is this easily achieved? And what’s the simplest approach?

    Cheers

  • Profile picture of modemlooper modemlooper said 1 year, 11 months ago:

    Doa search on here there have been many suggestions.

  • Profile picture of hachimaki hachimaki said 1 year, 11 months ago:

    This is realy important, it doesn’t make any sense how it’s buddypress configured if all is public.

    I have been searching also how to make that as we see in the Spanish Social Network “Tuenti” (Tuenti.com)

    I also have been searching how to configure a homepage with different widgets once you’re logged (i use Unplugged Theme by Diesel Laws)

    More help will be much more appreciated.

  • Profile picture of pcwriter pcwriter said 1 year, 11 months ago:

    @hachimaki

    This post from Sarah Gooding should help get you started with widgets:

    http://wpmu.org/how-to-widgetize-a-page-post-header-or-any-other-template-in-wordpress/

  • Profile picture of hachimaki hachimaki said 1 year, 11 months ago:

    Thank you pcwriter, it’ss really helpful

    I think you probably have solved my entire problem. I have to read carefully that tutorial, and if i figure out how to do all i think i can be back and solve the problem of @nipponmonkey.

    It Should take me up 3-4 hours, but i promise i’ll be back. I let here some spoilers:

    -If you can Widgetize a page, you can put a login form in a page.
    -If you can put a loging form in a page, without adding it to navigation, you can redirect all not-logged-user to that page, soy they MUST fill the login form before seeing anything.

    Regards form Spain

  • Profile picture of hachimaki hachimaki said 1 year, 11 months ago:

    Thank you pcwriter, it’ss really helpful

    I think you probably have solved my entire problem. I have to read carefully that tutorial, and if i figure out how to do all i think i can be back and solve the problem of @nipponmonkey.

    It Should take me up 3-4 hours, but i promise i’ll be back. I let here some spoilers:

    -If you can Widgetize a page, you can put a login form in a page.
    -If you can put a loging form in a page, without adding it to navigation, you can redirect all not-logged-user to that page, soy they MUST fill the login form before seeing anything.

    Regards form Spain

  • Profile picture of hachimaki hachimaki said 1 year, 11 months ago:

    Ok, here I am.

    For making buddypress a private commmunity, do the following:

    -Create a new page in the admin interface.
    -Make the page not to show in navigation with one of these: (http://www.kimwoodbridge.com/how-to-exclude-pages-from-the-wordpress-navigation-bar/ ) (http://wordpress.org/extend/plugins/exclude-pages/)
    -Fill the page with HTML (as you wish). If you want Widgets, you can follow this: http://wpmu.org/how-to-widgetize-a-page-post-header-or-any-other-template-in-wordpress/
    -Now, use this in the top of ALL PAGES NOT TO SHOW TO GUESTS: (http://buddypress.org/forums/topic/securing-components-from-non-logged-in-users/page/2)

    if (!is_user_logged_in() ){
    bp_core_redirect( $bp->root_domain.’/register’ );
    }

    AND REDIRECT THEM TO THE PAGE YOU CREATED BEFORE.

    AND THAT’S IT!

  • Profile picture of modemlooper modemlooper said 1 year, 11 months ago:

    Another easy solution is to use a maintenance mode plugin permanently on. Create your own landing page and in the admin allow access to your registration page.

  • Profile picture of r-a-y r-a-y said 1 year, 11 months ago:

    @hachimaki

    Instead of modifying all the BP templates, you could try the Registered Users Only 2 plugin:

    http://wordpress.org/extend/plugins/registered-users-only-2/

    I’ve made a few mods to that plugin to better support BP here:

    http://buddypress.org/forums/topic/bp12-plugin-wishlists#post-42114

    @nipponmonkey

    Use what I suggested above.

    Then turn off registration and manually create users. Assign these users a role of contributor or higher.

  • Profile picture of hachimaki hachimaki said 1 year, 11 months ago:

    I have some questions, in the other thread you say that you don’t recommend to ude ur plugin for wid-site.

    I also say that the blogs of the user must be accesible.

    -I have one question, plugin for inviting people to the community with all this privacy stuff on?

    Sorry for my bbas english, im spaniard, ^^

    greetings from spain

  • Profile picture of r-a-y r-a-y said 1 year, 11 months ago:

    I haven’t tried my mod site-wide on WPMU because it was only needed on the BP community-side for a site I was working on. If you’re not using WPMU, you should be okay.

    Don’t activate the plugin site-wide if you want your user blogs made public. In this case, only activate the plugin on the blog where BP is activated.

    Re: invites. What are you using for that? The modified plugin doesn’t block the register or activation pages, so if your invites plugin hooks into the register page, you should be fine.

  • Profile picture of hachimaki hachimaki said 1 year, 10 months ago:

    The blogs are meant to be public, but no the comunity. So i’ll try with my path, and see what can i do with invitations

  • Profile picture of Mike Pratt Mike Pratt said 1 year, 10 months ago:

    @r-a-y I am embarrassed to be asking such a simple question:

    re registered-users line ~48 -> bp_core_redirect(bp_get_signup_page());

    What would be the correct way to do the following:

    redirect not_logged_in users to a welcome page.. say domain.com/welcome.php which has a login widget for registered users as well as a Create Account button/link taking you to domain.com/register.php ?

    I tried:

    `$page = $bp->root_domain . ‘/welcome.php’;
    bp_core_redirect($page);`

    but, of course, that led me to redirect Hell.

    Thanks for clarifying.

  • Profile picture of r-a-y r-a-y said 1 year, 10 months ago:

    Hi Mike,

    Your code is correct, but since your page isn’t the BP_REGISTER_SLUG or BP_ACTIVATION_SLUG, it will lead you to redirect hell!

    Add your page (and any other page you need to whitelist from blocking) to the following conditional:

    if ( bp_is_register_page() || bp_is_activation_page() || THEWELCOMEPAGE ) //buddypress
    	return;

    Change THEWELCOMEPAGE to something that checks if you’re on welcome.php.

    If welcome.php is a Wordpress page with the slug of “welcome”, you would use something like:
    is_page('welcome')

    So your conditional would look like:

    if ( bp_is_register_page() || bp_is_activation_page() || is_page('welcome') ) //buddypress
    	return;

    Hope that helps!

  • Profile picture of Mike Pratt Mike Pratt said 1 year, 10 months ago:

    @r-a-y Thank you and may a thousand maidens be blessed upon your doorstep by morning!

    What would be the code to place to redirect the login form action specified by

    <form name="login-form" id="login-form" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login' ) ?>" method="post">

    back to $bp->root_domain?