miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | 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 
Doesn't this setting remains commented?

Like:

//$allForumsReg=TRUE;

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

Author shedrock
Partaker
#33 | Posted: 29 May 2006 00:56 
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.

Shedrock

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

tom

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

Author _Marco
Partaker
#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?

_Marco

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

Author shedrock
Partaker
#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.

Shedrock

Author realitybytes
Partaker
#39 | Posted: 30 May 2006 23:22 
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
Partaker
#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.

Shedrock

Author ezkim0x
Partaker
#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
Partaker
#42 | Posted: 2 Jun 2006 15:42 
actually.. it looks like this accomplishes it.. but I haven't tested yet: URL

Author realitybytes
Partaker
#43 | Posted: 2 Jun 2006 22:02 
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 
realitybytes
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 */

$warningForums=array(1,8);
//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'));
$endtime=get_microtime();
$totaltime=sprintf ("%01.3f", ($endtime-$starttime));
if(isset($includeFooter)) include($includeFooter); else echo ParseTpl(makeUp('main_footer'));
exit;

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

shedrock
Report me will it work or not, please.

Author realitybytes
Partaker
#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)
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑