miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
FAQ miniBB Support Forums / FAQ /   

forum for registered users only (the $allForumsReg option and its variations)

Page  Page 3 of 6:  « Previous  1  2  3  4  5  6  Next »  
Author Paul
Lead Developer
#31 | Posted: 18 May 2006 18:35 | Edited by: Paul 
Doesn't this setting remains commented?



Author Anonymous
#32 | Posted: 29 May 2006 13:15 
just remove the "//"

Author shedrock
#33 | Posted: 29 May 2006 00:56 | Edited by: shedrock 
7 Jun 2006 15:47 - Attached on mergeing:
Restricting access to certain forums

Is there some way I can restrict viewing access to certain forums. It seems like the only thing I can do is to stop annonymous (unreg) users from posting, but I would like to stop unregistered users from gaining access to some forums until they are registered. Any help would be greatly appreciated.


Author tom322
#34 | Posted: 29 May 2006 04:25 
Maybe try $clForums - (check the manual for description).


Author shedrock
#35 | Posted: 29 May 2006 11:33 
That won't work.

Author _Marco
#36 | Posted: 29 May 2006 19:14 
I'm not a programmer, but I found something with Google called array_reverse.
Maybe this function could be used in bb_specials.php to exclude user 0 from a clForum.
Tips anyone?


Author Paul
Lead Developer
#37 | Posted: 30 May 2006 09:43 
$regUsrForums option - this is probably what you need.

Author shedrock
#38 | Posted: 30 May 2006 22:36 
That does not stop them from entering the forum. I want to restrict access even for viewing it, example, if they clicked on the forum, then get a message telling them that they can't until they register.


Author realitybytes
#39 | Posted: 30 May 2006 23:22 | Edited by: realitybytes 
hmm I was just testing out some things,

seems plugins will not recognise action==vtopic or at least I cant get it to.

that being the case it makes it a little more awkward but not impossible

could always create a script in a seperate file that will check for action vtopic or vthread with an and where $_POST['forum'] equals the forum(s) you wish to restrict then have it detect for the cookie if not present redirect. Something along those lines. Then include that file in the main core.

Will put some thought and try test it out when I have time

Author shedrock
#40 | Posted: 1 Jun 2006 23:27 
Well, I have no idea how to do it. Maybe Paul or Team will see this post and can offer a solution.


Author ezkim0x
#41 | Posted: 2 Jun 2006 15:36 
I'd like to have something like this too.. except only allow certain ids to view/post (private forum)

Author ezkim0x
#42 | Posted: 2 Jun 2006 15:42 
actually.. it looks like this accomplishes it.. but I haven't tested yet: URL

Author realitybytes
#43 | Posted: 2 Jun 2006 22:02 | Edited by: realitybytes 
Yes in a pre moderation enviroment that works great, however for public membership it means you will need to manually add each user id to the allowed list.

So it works great to have a moderation forum or a group of your friends only access, on a small board when you will not be needing to add many user ids. But this will not work great if you have say 10000 members in an array checking each time if they can have access. Plus having to create those arrays, even if it is scripted so that registered members automatically are entered in to the array it will not work great when dealing with large numbers.

Author Paul
Lead Developer
#44 | Posted: 7 Jun 2006 15:46 
Arrays are anyway faster than selecting from database. So I would suppose this is still good solution for what ezkim0x requests.

The final code for giving warning to anonymous users, if they enter restricted forum, would be quite simple (paste the code below in bb_plugins.php):

/* Warning message for anonymous users to register */

//specify array of forum IDs above - similarly to other miniBB arrays

if($user_id==0 and $forum!=0 and in_array($forum, $warningForums)){

$title.=$l_accessDenied; $errorMSG='Sorry! You are not allowed to visit this forum, because you are not registered user. Please, <a href="'.$main_url.'/'.$indexphp.'action=registernew">sign up</a> before you can read and post in this forum.'; $correctErr='';
echo load_header();
echo ParseTpl(makeUp('main_warning'));
$totaltime=sprintf ("%01.3f", ($endtime-$starttime));
if(isset($includeFooter)) include($includeFooter); else echo ParseTpl(makeUp('main_footer'));

/* --Warning message for anonymous users to register */

Report me will it work or not, please.

Author realitybytes
#45 | Posted: 8 Jun 2006 08:19 
This is true, and that solution there looks perfect,

Have not tested it out but gives the result I was looking for.

Actually after reading that it opens up a whole new wave of ideas and possabilities for addons.

Page  Page 3 of 6:  « Previous  1  2  3  4  5  6  Next » 
FAQ miniBB Support Forums / FAQ / forum for registered users only (the $allForumsReg option and its variations) Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB