miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Guests should not be able to even view the forums / Disable viewing of /hide forums unless logged in

 
 
Page  Page 2 of 2:  « Previous  1  2

Author Paul
Lead Developer 
#16 | Posted: 27 Feb 2008 05:03 
What I could say these solutions should work with 2.2 as much as any other previous 2.x version. I've just tried them with my local version and everything works. The only thing you need to carry on is to enable $startPageModern=FALSE; dynamically if the user is not logged in. I've fixed the code above.

The only difference is in HTML code provided in my post #13 above, I have fixed that too.

Extra restrictions: it should work by the following code:

$clForums=array(1,2,3,4,5,6,7,8,9);
$clForumsUsers=array();
foreach($clForums as $k) $clForumsUsers[$k]=array();
$clForumsUsers[2]=array(2);

i.e. you should not define $clForums twice.

Then addition to the code above will be (pasted in lang.pack):

if(!isset($clForums)) $clForums=array();
if(isset($user_id) and $user_id!=0) {
foreach($clForums as $k) {
if(sizeof($clForumsUsers[$k])==0 and !in_array($user_id, $clForumsUsers[$k])) $clForumsUsers[$k][]=$user_id;
}
}
else $startPageModern=FALSE;

I tested it on my side and it 100% works.

Anyway... these solutions appear to me like you are trying to use a can opener for closing the can. We are creating the thing which is opened from everybody - you are trying to close it from everybody instead of choosing the thing which is already created for such goal. Strange world.

Author Sir Igor
Guest
#17 | Posted: 27 Feb 2008 11:09 
Works perfectly well!

Page  Page 2 of 2:  « Previous  1  2 
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Guests should not be able to even view the forums / Disable viewing of /hide forums unless logged in
 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
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑