Skip to:
Content
Pages
Categories
Search
Top
Bottom

Private 'Members Only' Forum (unpaid) with front end user profiles?


  • biscuitier0
    Participant

    @itsaskew

    I have been trying to research the most effective way to achieve the below with a plugin or combination of plugins. Any help would greatly appreciated.

    I’m using WordPress 4.0.

    • Website containing a small private forum area that is password protected (forum page displays only a user login panel until you sign in, so non-members will not see any forum content at all).
    • Once logged in the user can both view and post in the forum.
    • Users can be created manually from the back end of the site but would preferably get some kind of front end user profile rather than having access to the WordPress Admin bar.
    • Users can include attachments (.pdf or .doc/.docx) in posts for comment
    • No front end registration as the forum will only be open to a select few
Viewing 12 replies - 1 through 12 (of 12 total)

  • Robin W
    Moderator

    @robin-w

    in the same order

    1. in the backend you can set a forum to private and it is only visible to logged in users
    Visibility is set for each forum, go into Dashboard>forums> and when you add/edit a forum, you will see visibility options on the right hand side in the forum attributes.

    2. The above will achieve that

    3. you can add edit profile to your menu

    Layout and functionality – Examples you can use

    4. There are some plugins, but my suppers ready, so no time to google them !

    5. don’t allow registration
    dashboard>settings>general and uncheck anyone can register


    biscuitier0
    Participant

    @itsaskew

    Thanks for your reply, Robin. I appreciate your help and advice.

    I have tried to set things up as you suggest but when I change the forum to private, there is a message displayed which just says “Oh, bother! No forums were found here” rather than a log in panel.

    What I’d like is a short message along the lines of ‘this is a private forum for members of …. only’ please login below to participate’ and then the login panel.

    Also, will this method of private forum display the admin bar once the user is logged? If possible, I would like to keep them out of the back end of the site altogether and keep any user profile options styled consistently with the front end of the website.

    Thanks again


    Robin W
    Moderator

    @robin-w

    If you want forums to be visible but not accessible to non-logged in users then you need my plugin

    https://wordpress.org/plugins/bbp-private-groups/

    which gives you loads of options on how your forums display

    The admin bar (called the toolbar) can be disabled apart from admins

    add

    //disable toolbar for non-admins
    if (!current_user_can('manage_options')) {
    show_admin_bar(false);
    }

    to you functions file

    Functions files and child themes – explained !


    biscuitier0
    Participant

    @itsaskew

    Thanks again for the reply, Robin.

    I want the forum menu link to be visible but nothing else, no forum titles/topics etc simply a login panel and a message explaining that the forum is for members only.

    If I disable the toolbar in this way, will I need a plugin to allow users to make basic changes to their profile in an environment that is consistent with the front end of the website?


    Robin W
    Moderator

    @robin-w

    I want the forum menu link to be visible but nothing else, no forum titles/topics etc simply a login panel and a message explaining that the forum is for members only.

    ok, put the following in your functions file

    //Stop non-logged in user seeing the forums and show forum login page instead

    function lab_logged_in_bbptopics($have_posts){
    	if (!is_user_logged_in()){
    		header("Location: /forum-login/");
    		exit ;
    		}
    return $have_posts;
    }
    add_filter('bbp_has_topics', 'lab_logged_in_bbptopics');
    add_filter('bbp_has_forums', 'lab_logged_in_bbptopics');
    add_filter('bbp_has_replies', 'lab_logged_in_bbptopics');
    

    The create a page called ‘forum login’ and ensure the permalink is set to ‘forum-login’. You can actually use any name or permalinl, but the permalink has to match the one in line 3 above.

    into that page you can put something like

    You must be both registered AND a member of the club to use the forums.
    
    If you are not a member, why not <a href="/join-us/"> Join the club </a>
    
    Otherwise please login in
    
    [bbp-login]
    
    

    Then create a ‘join-us’ page that they can go to.

    If I disable the toolbar in this way, will I need a plugin to allow users to make basic changes to their profile in an environment that is consistent with the front end of the website?

    There are several ways to get an edit profile – this one adds it to your custom menu if they are logged in

    Layout and functionality – Examples you can use


    biscuitier0
    Participant

    @itsaskew

    Hi Robin

    Sorry for disappearing on this. I was so busy with the rest of the site, I had to leave the forum to one side.

    Anyway, thanks for your suggestions above. I tried them out and have unfortunately hit a couple of snags

    1) I’m finding that once I login using the BBP login form, I’m left with a blue box that says ‘You are already logged in’. Is it possible to make this disappear, once logged in. Or if not, have you redirected to a different page once successfully logged in?

    2) Is it possible to say exactly where in the menu the ‘Edit Profile’ goes? I would prefer it not to be a top level menu item and to go into the dropdown menu instead

    3) Is the intention that I put the [bbp-forum-index] shortcode underneath the [BBP-login] shortcode? I want people to be taken straight to the forum once they have succesfully logged in. At the moment when I put those two shortcodes on a page together, I am getting a php error along the lines of

    Warning: Cannot modify header information - headers already sent by...

    I think this might be to do with me using the Genesis framework?

    I have alreday installed the Genesis Extend BBpress plugin


    biscuitier0
    Participant

    @itsaskew

    Just to add to the above. I get the same warning if the forum index is on a different page to the login. It appears when you logout.


    biscuitier0
    Participant

    @itsaskew

    What is going on with this forum? I can’t see my posts


    biscuitier0
    Participant

    @itsaskew

    Something is wrong here, I am trying to post a solution to my problem and it keeps vanishing or, when I paste it in from text edit (after having to type it out a second time), giving me errors

    ERROR: Slow down; you move too fast.
    ERROR: Duplicate reply detected; it looks as though you’ve already said that!


    biscuitier0
    Participant

    @itsaskew

    Okay I managed to do roughly what I wanted without changing the functions.php. Here’s how:

    1) I installed bbP Members Only plugin https://wordpress.org/plugins/bbpress-members-only/, I then created a test forum and topic

    2) I created a page called ‘member login’ and put the [bbp-login] shortcode in this page (no menu link for this page)….


    biscuitier0
    Participant

    @itsaskew

    …3) I configured bbP Members Only to redirect non-logged-in users to the above page when they try to access forums

    4) I created a menu item which is a custom link, directing to ‘…/forums’

    5) I installed Peter’s login redirect https://wordpress.org/plugins/peters-login-redirect/ and configured it to take users directly to ‘…/forums’ when they log in and the home page when the log out.


    biscuitier0
    Participant

    @itsaskew

    Now I just need to hide the toolbar for non-admins (code for this is above – thanks, Robin) and put and edit profile link where I need it to be in the menu to display only when users are logged in.

    ***Apologies for all the posts I have made but there is a bug with this forum that was stopping me posting (and worse, deleting my posts so I needed to type them again). The only way I could get it to work was to split the post into smaller parts***

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Skip to toolbar