Skip to:
Content
Pages
Categories
Search
Top
Bottom

Announcement Forum

  • Hi all,

    I’m looking to create an announcement forum so I can post announcements for my site.

    For this forum, I’d like it so only moderators+ can start topics but anyone can respond to a topic.

    Does anyone know of a plugin that would add this ability?

    Many thanks.

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

  • Sam Bauers
    Participant

    @sambauers

    WordPress does this.

    This plugin should allow you to restrict who can post into a particular forum:

    https://bbpress.org/plugins/topic/read-only-forums/

    I use it on one of my sites, and it works great!

    Thanks jonhiler. Problem is, this seems a tad buggy.

    I’ve restricted a forum so no one but moderators+ can post in it, but at the bottom of the forum theres still: “New Topic in this Forum” for users. How can I remove this?

    I also get errors like this:

    Warning: in_array() expects parameter 2 to be array, null given in /forum/my-plugins/read-only-forums.php on line 62

    What version of bbPress are you using? The plugin may not be compatible with version 1.0…

    Also – what edits did you make to the settings section of the admin?

    I’m running 1.0.2. I didn’t make any edits to the settings section of the admin as the instructions didn’t say to do so.

    The instructions in the readme file should mention the settings?

    * Until an admin menu is created, edit read-only-forums.php and change settings near the top as desired

    * Add the read-only-forums.php file to bbPress’ my-plugins/ directory and activate.

    https://bbpress.org/plugins/topic/read-only-forums/installation/

    Oh sorry, I thought you meant settings within the admin panel. Yes, I’ve edited the script and edited the templates as instructed.

    global $read_only_forums,$bb_current_user, $bb_roles;

    // edit users (and forums) by NUMBER below until an admin menu can be made

    //$read_only_forums=false; // true = stop ALL members from starting topics in ALL forums

    //$read_only_forums=false; // true = stop ALL members from replying to topics in ALL forums

    $read_only_forums=array(5); // which forums should ALL members NOT be able to start topics

    //$read_only_forums=array(9,15,22); // which forums should ALL members NOT be able to reply to posts

    //$read_only_forums= array(1=>array(1,2,3,4,5,6,7), 2=>array(9,10,11)); // allow override for this member=>forums

    //$read_only_forums= array(1=>array(1,2,3,4,5,6,7), 2=>array(9,10,11)); // allow override for this member=>forums

    //$read_only_forums= array(54321=>array(1,2,3,4,5,6,7), 34567=>array(1,2,3)); // deny this specific member=>forums

    //$read_only_forums = array(54321=>array(1,2,3,4,5,6,7), 34567=>array(1,2,3)); // deny this specific member=>forums

    $read_only_forums=array(‘moderator’,’administrator’,’keymaster’); // these types of users can always start/reply

    $read_only_forums=__(“Sorry, only moderators can start topics in this forum.”);

    $read_only_forums = __(“Posting in this topic has been restricted.”);

    // stop editing here

    Ah ok. The only thing I can think of is that I might be careful about commenting out some of those lines… but instead, put in forum numbers that you know won’t be an issue. That’s total speculation though.

    Either way, I wouldn’t comment out those two lines at the top of the settings:

    ‘//$read_only_forums=false; // true = stop ALL members from starting topics in ALL forums’

    ‘//$read_only_forums=false; // true = stop ALL members from replying to topics in ALL forums’

    If that doesn’t work, it’s probably a compatibility issue – _ck_ has mentioned that she’s not updating a lot of her plugins for version 1.0 until December or so…

    Yay, thanks John, I set all the arrays to really high numbers and that eliminated the errors. But I still have “New Topic in this Forum” even when the user is unable to start a topic. You wouldn’t know how to get rid of that would you? I can’t seem to find it in the templates, perhaps I’m looking in the wrong place.

    Try something like this?

    <?php if ( bb_current_user_can( ‘write_topic’ ) ) { new_topic(); } ?>

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