bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

key master only forum

(6 posts)
  • Started 3 months ago by dragosbogdan
  • Latest reply from dragosbogdan
  • This topic is resolved
  1. dragosbogdan
    Member

    I'm using bbpress for my online class and I would like to create a forum that only I or a moderator can post to, and the students (members) can view only.

    I've seen plug-ins to make forums private, but that's not exactly what I need. Can someone point me in the right direction?

    Thanks

    Posted 3 months ago #
  2. This will affect all forums:

    global $bb_roles;
    $bb_roles->remove_cap('member','write_topics');
    $bb_roles->remove_cap('member','write_posts');

    You can put it into header.php or make a real plugin ie.
    members-cannot-post.php (and install into /my-plugins/)

    <?php
    /*
    Plugin Name: Members Cannot Post
    */
    global $bb_roles;
    $bb_roles->remove_cap('member','write_topics');
    $bb_roles->remove_cap('member','write_posts');
    ?>

    I think I will make a real plugin which can control this on a per-forum basis since this seems to be a requested feature that is not too hard to handle in 0.9 Look for it in the plugin section over the next day or two.

    Posted 3 months ago #
  3. a plugin sounds great ck. I for one would definitely benefit from it.

    Posted 3 months ago #
  4. not so easy to implement it seems:

    Fatal error: Call to a member function remove_cap() on a non-object in /var/www/vhosts/.../httpdocs/forums/my-plugins/nopost.php on line 8

    Posted 3 months ago #
  5. I've now written a plugin to solve this problem:
    http://bbpress.org/plugins/topic/read-only-forums/

    Posted 3 months ago #
  6. dragosbogdan
    Member

    great plugin _ck_, thanks a bunch.

    Posted 3 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.