My work, my ideas, my faith, my life

Forum Restrict

My New WordPress Plugin

By Rex Goode

Forum Application ScreenIntroducing my new WordPress plugin, Forum Restrict. made to function as a companion to the bbPress bulletin board system. It solves a problem that I have encountered in needing to restrict access to certain forums on my web sites to certain users. While bbPress provides for the functionality to make a “private” forum. What this means is that you have to be logged in and have a certain role assigned to you on the site. It isn’t quite what I needed. I wanted a way to have a forum administrator have the functionality to mark certain forums as restricted, add and delete members of individual restricted forums, search for users to add, and allow users to make application to be admitted to a certain forum.

The process for doing all of that could be done in steps manually by adding new user roles, assigning them to individual users, and restricting current private users to those roles. It would have not only been too complicated for average users, but too much work for an administrator.

To illustrate, without Forum Restrict, to create a private forum and only allow certain users access to it, you would have to do the following:

If you are looking for a good PHP/Javascript/MySql (and many other systems) developer, take a look at my resume. I am available for small to large contract work. I am open to full-time employment. Let me know if you need me.
  1. Create the forum.
  2. Mark it as “Private”.
  3. Create a role that has access to private forums or add the capability to read private forums to existing roles. This functionality doesn’t automatically come with bbPress. You would have to find a plugin that does that.
  4. After this much work, you still have a private forum that is restricted to certain roles. The problem is, all private forums are accessible by such persons, unless you create new roles and new capabilities that are forum-specific. You would have to find a way to create capabilities them that are specific to individual forums and figure out a way to tie that capability to the forum.
  5. Assuming you don’t want to do step 4, which would leave it so that certain users could read private forums and all of the other users could not. It would not solve the problem of having certain users using certain forums.
  6. To add to the problem, if a user wants to join a certain forum, how do they let you know? You could do the most inadvisable thing and publish your email address on your website. If you like getting slammed by spam, go ahead. You could download a plugin that has a contact form, which I do advise. That way, your address is hidden from people who want to email you from the site. Even then, it is a much more manual process to oblige these requests.
  7. Once you figure out that a person wants to be admitted to private forums, you have to change their role, which is doable through their user profile record, which you, as admin, have access to do. It’s a multi-step process.

With Forum_Restrict, you do the following:

  1. Create the forum.
  2. Mark it as restricted by Forum Restrict.
  3. A user sees the forum and an “Apply” link which takes them to a form where they enter the reason they want to join.
  4. You go to the Forum Restrict administration page and will see all of the applications to join the forum in one list. With one click, you make them a member of the forum or deny their application.

You can also:

In one screen, search for members by username, email address, or display names. With one click on the same screen, you can add or remove them from the forum.

Up to now, all WordPress plugins I have written have had very specific uses for my web sites, not applicable to other web sites. Because of this, I haven’t yet figured out how to make my plugin available on the WordPress plugin directory. While I work on that, let me know if you want to try it out. You will need to have a WordPress web site with the bbPress plugin installed and activated. Use the “Contact Us” link on the web page to get a copy. Let me know if you want it in a zip file or a tar file. Your feedback is welcome.

In addition to uploading it to the WordPress  plugin directory, I will be writing some documentation which will guide you through the screens (all two of them) and the small changes to existing bbPress screens (all two of them). I will also create a forum here for dealing with feedback and problems. Look for both.

Some of the Technical Info

See my article, True to Form, on this site for my description of using Ajax. The entire administration screen for Forum Restrict is based on the Ajax technology as described in that article. A lot happens without ever reloading the page. You move people around and the changes you make show up fairly instantly.

I made use of several WordPress and bbPress filter and action hooks to insert my functionality into existing screens and forms.

3 people like this post.

25 Responses to “Forum Restrict”

  1. pat said:

    Hi –

    I love the idea of your plug in – and hope to incorporate it into a website for children. However, I have a question.

    I added the plugin and bbgform. I added the widgets to my website. However, I cannot see them in my menus, and cannot active them. Are there more directions I can read? I would post in the forums but I get an error page . . .
    Thank you!

  2. David said:

    I tried posting support question in forums, but the link is broken. So here’s my question, is it possible to restrict forums to not have the request access. Basically, I’m trying to create a specific forum for the management team. So we could invite those specific users to that forum and otherwise everyone else would not be able to even see the forum. I would really appreciate any advice on how to accomplish this. Thanks also for creating an awesome plugin.

  3. Mary J said:

    Thanks for creating this. I had been looking for a long time for such a plug-in. Have used it for a few days and it seems to work fine.

  4. Mary J said:

    Wanted to post a support question but your link to the forum returned a ‘not found’ page so I am posting it here:

    When a person applies to a forum they’re not allowed to use, and I click “deny” — that table never disappears. So, for eg., if someone applies to our “leadership forum” and is denied, everytime I use the Forum Restrictions panel and pull down the “leadership” forum, in addition to those who have been approved for the forum there is still that table with the list of those who have been denied access. Is there any way to get rid of that table on that page?

    Thanks in advance. This is otherwise a great plugin and much needed.

  5. Rex Goode said:

    Pat, I’m very sorry for the long delay. For some reason, my WordPress did not notify me of any replies waiting. Help me understand your problem a little better. I don’t know which widgets you mean. I’m also not sure what you mean by bbgform.

  6. Rex Goode said:

    David, I’m very sorry for the long delay. For some reason, my WordPress did not notify me of any replies waiting. I think I can do this on a future release and it is a very good idea.

  7. Rex Goode said:

    Thanks, Mary J.

  8. Rex Goode said:

    Yes. I will need to look into a fix. I will try to get it in the next release and get that out fairly soon.

  9. Giuseppe Storelli said:

    Hi Rex, great work you made!!

    I have two requests:

    1. Is possible to let moderators receive email from the forum applicants?

    2. Is possible to change the wordpress@thewebsite.com email from area when you get confirmed? I would like to hide the wordpress thing.

  10. Rex Goode said:

    I’m not sure what you are asking. There are some good Contact form plugins you can download.

  11. Dixie said:

    Are you still updating Forum Restrict? It is supposed to do exactly what I’m looking for but the admin doesn’t function properly in the latest version of WP and BBP. So I thought I’d check, in case you were.

    Thanks!

  12. Rex Goode said:

    Let me have some specific problems and I will look at them.

  13. jllodra said:

    This plugin does not work, for me, with latest wp and latest bbpress. I setup a restricted forum, then I add some users to it, but in the “/forums” page there is the forum listed but no link.
    Can anybody confirm?

  14. jllodra said:

    I can also add, to my latest comment, that the plug-in brokes any other public forum (not just restricted ones), topics on those forums do not get listed.
    Best regards.

  15. Rex Goode said:

    I’m not sure why, but try changing the visibility on each forum (WP feature) and then change it back to Public. That worked for my forums.

  16. Ivar said:

    Hi.

    I experience a problem with WP 3.5.1 and bbPress 2.2.4. When I mark a forum as private with restricted access, it doesn’t show up in the list of forums. The forum name (and link) is not there, only the forum description.

    The user I log in with has been added to forum access, but the forum still doesn’t show.

    In addition, a user with no access to the restricted forum also sees the forum description. Unless I allow applications, I’d like the forum to be completely invisible in the forums list unless the logged in user have been granted access.

    BR
    //I

  17. Rex Goode said:

    An update is now uploaded. Should be available soon.

  18. Ivar said:

    Thanks Rex.
    I fixed the short-term issu myself, but I’ll download the update when it’s available to check it out.

    Thank you for a quick response.

  19. john said:

    Hi Rex,
    I apologize for what i am sure is a very basic question but I am a neophyte WordPress user.

    I just installed your Forum Restrict plugin but I am getting several error codes and I was hoping you could help.

    What I want to do is link a tab to your forums and I am at a loss. Could you check out my site and interpret the error codes for me or point me in the right direction? Thank you in advance. http://nationalcyberschoolnetwork.com

  20. Rex Goode said:

    Or 1.4

  21. Joe said:

    Rex,
    I recently put up a this website and am getting a fatal error that will crop up and then disappear for some period of time. Here is the error:

    Fatal error: Cannot call overloaded function for non-object in /home/spek/public_html/wp-includes/class-wp.php on line 529

    I have seen it as the administrator and had reports from users. Any Forum Restrict aspects to this error? I am running WordPress 4.0 and have bbPress installed. Akismet and Jetpack are about the only other plugins installed. The link below at the forums didn’t seem to work for me.

    Thanks,
    Joe

  22. Joe said:

    Rex,
    I have another problem. I have a private forum that I now cannot get access to the forum approvals. The first time it happened, I deleted and reinstalled the private forum. It then happened again on a second forum. The error message states:
    Check: TypeError: Unable to get property ‘getElementsByTagName’ of undefined or null reference.

    Can you be of any assistance?

    Joe

  23. Rex Goode said:

    Joe,

    Recent changes to WordPress and their implementation of AJAX technology have rendered forum_restrict unusable. I am very close, days, to a new release that fixes it. I will hurry because I know people are relying on it.

    Rex

  24. Leon said:

    Hi, can you tell me how I can alter the text field names on the forum restrict login page from “name” and “website” ? Thanks.

  25. Rex Goode said:

    Please be more specific. I don’t think there is a forum restrict login page.

Leave a Reply

If your comment is a support question, please post it at the forums.