bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Setting privs for writing

(4 posts)
  • Started 2 years ago by adergaard
  • Latest reply from Null
  • This topic is resolved
  1. adergaard
    Member

    Is there any way of setting priviliges for writing in a forum.

    Typically you'd have a NEWS-forum where only moderators or the key master should be allowed to enter new topics.

    I'm hopefully breaking into already opened doors here. Greatful for any help at all in this matter.

    Posted 2 years ago #
  2. Create a directory called my-plugins/ in bbPress' root directory.

    Into that add a new file called mod-write-topics.php with the following code.

    <?php
    function mod_write_topics() {
    global $bb_roles;
    $bb_roles->role_objects['member']->remove_cap( 'write_topics' );
    }
    add_action( 'bb_got_roles', 'mod_write_topics' );
    ?>

    I think that will work, but I haven't tested it.

    Posted 2 years ago #
  3. adergaard
    Member

    Great.

    Yes that would work. Thanks much.

    Posted 2 years ago #
  4. Nice, but where in the mod do you define wich forum is for admin posting only?

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.