Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can You Lock Your bbpress Forum?


  • honestscott
    Participant

    @honestscott

    Hi,

    I want to close my forum to (new and old) members, and make it a read only forum.

    What do I need to do to accomplish this?

    Thanks!

    Scott

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

  • zaerl
    Participant

    @zaerl

    You want to deny new registrations? Or you simply want a forum that nobody can edit anymore?


    honestscott
    Participant

    @honestscott

    Hi,

    I am using 1.0.2 so that plug-in won’t work, and I want to make it so no one can log in, or register.

    The forum will basically be closed, but visitors will be able to read everything that is posted.

    Any ideas?

    hmm, you want something like a maintenance mode.. still looking and searching to see what i can come up with.


    honestscott
    Participant

    @honestscott

    Thanks!

    For the time being I have renamed the log-in and register files in the root folder.

    I try them (log-in/register links) and I get url not found, but it seems like some of the old members are still logging in and PMing me…weird, huh?

    I am not a coder by a long shot, I just want to close my forum, yet make it totally readable.

    Haven’t found a built in method.

    One other problem you have is users already logged in. I’m not sure there is a way to automatically log them out.

    Not sure I can easily code anything for this, but if you ever do get a solution it would be worthwhile letting other know how you managed it.

    I try them (log-in/register links) and I get url not found, but it seems like some of the old members are still logging in and PMing me…weird, huh?

    No because they are already logged in…


    zaerl
    Participant

    @zaerl

    My plugin (zaerl Visibility) let you lock or hide whatever forum/topic you want and it has been built for 1.0.2 and later versions. But it does not log out members.


    honestscott
    Participant

    @honestscott

    I just edited the header.php file and removed this line:

    <?php if ( !in_array( bb_get_location(), array( ‘login-page’, ‘register-page’ ) ) ) login_form(); ?>

    Now the register, and log-in form doesn’t even appear.

    I want to see how they log-in now.


    zaerl
    Participant

    @zaerl

    Through cookies I guess.


    honestscott
    Participant

    @honestscott

    Here is what I ended up doing.

    Even though my members still seem to be able to log-in (even without a log-in form) and post.

    I changed all my forums to categories, now no one can start a new topic, or post on an old one.

    You can do this from the dashboard forums section, there is a box you can check to change each forum into a category.

    But everything is still readable, and this is what I wanted.

    I really wish I could keep them from logging in too, but they will get tired of logging in for nothing.

    I am so glad I found this solution, because if I had to set all 702 members to inactive, that would have taken quite a while…whew!

    I hope this helps.

    Scott


    chrishajer
    Participant

    @chrishajer

    You can expire all their login cookies by changing the secret keys in your bb-config.php file. See the note (which is present in wp-config.php but not in bb-config.php I don’t think):

    https://core.trac.wordpress.org/browser/trunk/wp-config-sample.php#L41


    honestscott
    Participant

    @honestscott

    Thanks!

    I just did that, I changed the secret key in the bb-config.php file, thanks for the tip.

    So to recap these are the steps I used to close my bbpress forum, and make it a “read only” forum.

    1. I edited the header.php file in bb-templates folder (whatever template you are using, I am using the default Kakumei) and removed this line:

    <?php if ( !in_array( bb_get_location(), array( ‘login-page’, ‘register-page’ ) ) ) login_form(); ?>

    Now the register, and log-in form doesn’t even appear.

    2. I changed all my forums to categories, now no one can start a new topic, or post on an old one, but everything is still readable, and this is what I wanted.

    You can do this from the forums section in your bbpress dashboard, there is a box you can check to change each forum into a category.

    3. I changed the secret key in the bb-config.php file located in the bbpress root folder.

    This will expire all their auto log-ins and keep them from being able to log-in without a log-in form.

    Thanks for the help everyone!

    I hope this helps.

    Scott


    chrishajer
    Participant

    @chrishajer

    Thanks for documenting how you did it. I’m sure it will be helpful to someone.

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