bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

Restrict New Topic

(5 posts)
  • Started 1 year ago by blepoxp
  • Latest reply from Null
  • This topic is not resolved
  1. Is there a plugin available that will allow me to restrict New Topic Creation to certain individuals? I've looked at the forum moderators plugin and the private forums plugin but neither of these seem to work.

    I need all members to be able to reply but only certain members able to begin a new topic. Does such capabilities currently exist? Thanks.

    Posted 1 year ago #
  2. I need this to, but only mods/admins to begin a topic and members can only reply on them. But this only to a specific forum, all other forums stay "normal"

    Posted 1 year ago #
  3. Do you think this would be an easy code?
    If we we're editing the actual bb code, wouldn't we just put an if then conditional around the link to post a new topic? Then again... I guess that wouldn't remove the ability, just the link that makes posting a new topic an ability... hmmm.

    What existing plugin do you think my be the easiest to modify to this end?

    Posted 1 year ago #
  4. Olzvoi
    Member

    Put this code in a Plugin. The group "Member" will be affected.

    function restrict_bb_got_roles() {
    global $bb_roles;
    unset($bb_roles->roles['member']['capabilities']['edit_topics']);
    unset($bb_roles->roles['member']['capabilities']['write_topics']);

    unset($bb_roles->role_objects['member']->capabilities['edit_topics']);
    unset($bb_roles->role_objects['member']->capabilities['write_topics']);
    }

    add_action('bb_got_roles', 'restrict_bb_got_roles');

    Posted 1 year ago #
  5. Put this code in a Plugin. The group "Member" will be affected.
    
    function restrict_bb_got_roles() {
    global $bb_roles;
    unset($bb_roles->roles['member']['capabilities']['edit_topics']);
    unset($bb_roles->roles['member']['capabilities']['write_topics']);
    
    unset($bb_roles->role_objects['member']->capabilities['edit_topics']);
    unset($bb_roles->role_objects['member']->capabilities['write_topics']);
    }
    
    add_action('bb_got_roles', 'restrict_bb_got_roles');

    What happens If you use this? Do only members + higher be able to post here and all can reply and read?

    Posted 5 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.