Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Hiding New Forums Until Ready

Search this topic... | Search Knowledge Base (KB)... | Search Box
Register or Login to Post    Index » Knowledge Base (KB)  Previous TopicPrint TopicNext Topic
Author Message
Board Member

Joined: 24 Jul 2008

Posts: 730
Location: Texas

PostPosted: Thu Dec 11, 2008 4:45 pm 
Post subject: Hiding New Forums Until Ready

In early versions of phpBB2 a forum was viewable and postable by anyone as soon as it was created. In later versions the code was changed so that forums required users to be registered before posting by default. However, the forum is still visible as soon as you make it. And since you can't set permissions while you are creating a forum this means that your "Secret Plans for World Domination" forum will be visible until you get a chance to hide it. That's not good. icon_smile.gif

A very simple tweak will change the default permissions assigned to a new forum.


$forum_auth_ary = array(
   "auth_view" => AUTH_ALL,
   "auth_read" => AUTH_ALL,
   "auth_post" => AUTH_REG,
   "auth_reply" => AUTH_REG,
   "auth_edit" => AUTH_REG,
   "auth_delete" => AUTH_REG,
   "auth_sticky" => AUTH_MOD,
   "auth_announce" => AUTH_MOD,
   "auth_vote" => AUTH_REG,
   "auth_pollcreate" => AUTH_REG

That code is found on lines 39-50 of that file in a standard 2.0.23 installation.

What you can do once you find those lines is alter any or all of them to suit your purposes. For example, if you want to hide the new forum until you have a chance to move it up or down and set appropriate permissions, it is simple. Change the first two permissions from AUTH_ALL to AUTH_ADMIN and nobody but you and your other board admins will be able to see the forum until you are ready. icon_smile.gif

The permission constants you can consider using here are:

AUTH_ALL = everyone including guests
AUTH_REG = limited to registered users
AUTH_MOD = requires moderator status
AUTH_ADMIN = requires administrator status

There is another option for "private" but I don't think it makes sense to default a setting to that value. If you want to make the forum 100% private so that nobody but administrators can see or do anything in the forum, use this:

$forum_auth_ary = array(
   'auth_view' => AUTH_ADMIN,
   'auth_read' => AUTH_ADMIN,
   'auth_post' => AUTH_ADMIN,
   'auth_reply' => AUTH_ADMIN,
   'auth_edit' => AUTH_ADMIN,
   'auth_delete' => AUTH_ADMIN,
   'auth_sticky' => AUTH_ADMIN,
   'auth_announce' => AUTH_ADMIN,
   'auth_vote' => AUTH_ADMIN,
   'auth_pollcreate' => AUTH_ADMIN

The values being set are probably self-explanatory, but in case not, here are the details.
  • auth_view - user can see the forum on the index page
  • auth_read - user can actually open the forum to read it
  • auth_post - user can create new posts in the forum
  • auth_reply - user can reply to existing posts in the forum
  • auth_edit - user can edit their own posts in the forum (does not grant the ability to edit posts by other users)
  • auth_delete - user can delete their own posts under certain circumstances (does not grant the ability to delete posts by other users)
  • auth_sticky - user can create a "sticky" topic in the forum
  • auth_announce - user can create an "announcement" topic in the forum
  • auth_vote - user can vote in polls in the forum
  • auth_pollcreate - user can create a poll in a topic
Back to top
Display posts from previous:   
Register or Login to Post    Index » Knowledge Base (KB)  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0238 seconds using 16 queries. (SQL 0.0017 Parse 0.0008 Other 0.0213)
phpBB Customizations by the
Template Design by DeLFlo and Moments of Light Logo