bbPress

Simple, Fast, Elegant

bbPress plugin browser »

Read-Only Forums (0.0.5)

How do I know the forum number / user number ?

  • administrators can do forum.com/forums/?forumlist to get a list of forums by number (when the plugin is installed)

  • user numbers can be found under forum.com/forums/bb-admin/users.php

How can I remove the "Add a reply" message when members can't post?

  • in topic.php template replace the <?php post_form(); ?> with <?php if (function_exists('read_only_post_form')) {read_only_post_form();} else {post_form();} ?>

  • in forum.php template replace the <?php post_form(); ?> with <?php if (function_exists('read_only_post_form')) {read_only_post_form();} else {post_form();} ?>

  • if ALL your forums are going to be Read-Only, replace in topic.php forum.php front-page.php tag-single.php <?php post_form(); ?> with <?php if (function_exists('read_only_post_form')) {if (bb_current_user_can('moderate')) {read_only_post_form();}} else {post_form();} ?>

Configuration Examples

  • stop ALL members from starting topics in ALL forums $readonlyforums['denyallstart_topic']=true;

  • stop ALL members from replying to topics in ALL forums $readonlyforums['denyallreply']=false;

  • which forums should ALL members not be able to start topics $readonlyforums['denyforumsstart_topic']=array(9,15,22);

  • which forums should ALL members not be able to reply to posts $readonlyforums['denyforumsreply']=array(9,15,22);

  • allow start topic override for this member=>forums $readonlyforums['allowmembersstart_topic']=array(1=>array(1,2,3,4,5,6,7), 2=>array(9,10,11));

  • allow reply override for this member=>forums $readonlyforums['allowmembersreply']=array(1=>array(1,2,3,4,5,6,7), 2=>array(9,10,11));

  • deny start topic for this specific member=>forums $readonlyforums['denymembersstart_topic']=array(54321=>array(1,2,3,4,5,6,7), 34567=>array(1,2,3));

  • deny reply for this specific member=>forums $readonlyforums['denymembersreply']=array(54321=>array(1,2,3,4,5,6,7), 34567=>array(1,2,3));

  • these types of users can always start/reply $readonlyforums['allowrolesalways']=array('moderator','administrator','keymaster');

Code is Poetry.