miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
How To miniBB Support Forums / How To /  
 

defining Private forums

 
 
Page  Page 1 of 2:  1  2  Next »

Author fruitfly
Partaker
#1 | Posted: 4 Jan 2004 01:58 
Ok, I have a little problem that I can't figure out. On my site, I have 2 forums that I want to remain private. Ok, forums 7 and 8 are meant to be private, and they were working fine before. Then, I noticed one was no longer private. I did a bit of looking and which ever one is first in the list, is public and the second is private...here's my bb_specials to better explain..

<?php
$clForums=array(8);
$clForumsUsers[8]=array(1,2,5,7,9,19,20,21,22,23,24,28,37);
$clForums=array(7);
$clForumsUsers[7]=array(1,2,5,7,9,19,20,21,22,23,24,28,37);
$roForums=array();
$poForums=array();
$userRanks=array();
$regUsrForums=array(1,3,4,5,6,7,8);
$mods=array(19,20,22,23);
$lastOut=array(7,8);
?>

Which ever one is done first, doesn't go private, it stays open to the public. This is how I have it now, and 8 is open to the public and 7 is private...if 7 is first then it is public. I am sure I'm missing something simple, but I can't see what it is.

It was working fine before, the only thing I've done is install the email plugin, and I don't see how one would effect the other.

Any help is appreciated.

Author 4days
Champi0n
#2 | Posted: 5 Jan 2004 02:59 
you're redefining the array by listing it again (so the second definition overwrites the first).

write it as:

$clForums=array(7,8);

Author fruitfly
Partaker
#3 | Posted: 5 Jan 2004 06:40 
oooooh, I knew it had to be something simple. Thank you very much.

Author gruffnuts
Partaker
#4 | Posted: 22 Jul 2005 15:33 
Hi
I am wondering how to make forums really private. If I use this $clForums=array(1,2,3); in bb_specials.php I thought that would make the first three added forums private: ie. invisible and unpostable by users until allowed in the $clForumsUsers[]=array(); line.

Instead, any visitor to the page or new user seems to be able to see and use the forums. Is this right or am I doing something wrong?

TIA

Author Team
8-)
#5 | Posted: 22 Jul 2005 15:56 
Yes, this is right until you specify the $clForumsUsers arrays. Example (this must be specified):

$clForums=array(1,2,3);
$clForumsUsers[1]=array(4,10,90);
$clForumsUsers[2]=array(11,12,13);
$clForumsUsers[3]=array();

where 4,10,90,11,12,13 are allowed user IDs. Array also could be empty - in this case, only admin (and optionally moderator) has access to that forum.

Author gruffnuts
Partaker
#6 | Posted: 22 Jul 2005 16:06 
Thanks for your reply. Maybe I am misunderstanding something. Currently, I have one forum, no users, and have the lines:

$clForums=array(1);
$clForumsUsers[1]=array();

Then by your explanation, the forum ID1 should be hidden.

But...I don't have any users yet, so I can't specify any for the second line. However, in the meantime, if I simply go to the site as a visitor, I can see and read forum ID1, sign in and post to it, despite it being specified as closed. Should I start over??

Author Team
8-)
#7 | Posted: 22 Jul 2005 16:18 
If you are logged as admin, this forum will be visible, of course. But if you logged out and are Anonymous, it shouldn't be visible. And be sure that forum's ID is really 1.

Author gruffnuts
Partaker
#8 | Posted: 22 Jul 2005 16:28 
Thanks Team.

Yes, I understand I will see all forums when logged in as admin. But when I log out, or log in as a new user, or an added user not specified in the arrays, I can see all the forums and post to them. I have even tried visiting the forum from a different PC on a different network! So it's got me beat.

How do I know if the forum's ID is 1? I presumed if I only have one forum it's ID must be one. If I have two, the first and second would be ID 1 and 2 respectively. Is this right, or have I got to assign an ID somewhere?

Help!

Author gruffnuts
Partaker
#9 | Posted: 22 Jul 2005 16:45 
Eureka! I notice that after adding and deleting users, the second user was ID5! Having added and deleted some forums, I didn't realise that the count hadn't zeroed. I had to check my mySQL db to see that what I thought were forums one and two were actually 4 and 5.

Now, is there any way of working out the IDs of the forums, if, like me, you have done a lot of troubleshooting, adding and deleting without going to your webspaces' mysql cpanel?

Anyway, thanks for your help.

PS: It is syntax requirement that each private forum is put on a separate line $clForumsUsers[1]=array(); is that correct?
cheers

Author Team
8-)
#10 | Posted: 22 Jul 2005 17:09 

Author coco
Partaker
#11 | Posted: 30 Nov 2006 07:01 
I have one private forum and everything works fine.
On the index page users can see that private forum only when they logged in.

How to make that private forum visible for not registered users (logged out users) on the index page, but they can't get in as an anonimus (acess denied), and they can't see latest discussions made in that forum.

I hope that you uderstand what i'm tryig to say.

Thanks!

Author Paul
Lead Developer 
#12 | Posted: 30 Nov 2006 07:37 
How to make that private forum visible for not registered users (logged out users) on the index page... -

if you are talking only about 1st page, then the only way to achieve that, is to make a core destructive change in the file bb_func_vforum.php. Before the condition if($show){ you need to paste:

$show=TRUE;

Author coco
Partaker
#13 | Posted: 17 Aug 2007 12:04 
core destructive change in the file bb_func_vforum.php
that's not recommended or?

Author tom322
Active Member
#14 | Posted: 17 Aug 2007 12:13 
that's not recommended or?
I think only because you must keep track of the custom changes when you want to upgrade the script. So it takes more time and patience if you make a core-destructive change. Other than that, the solution will work perfectly.

Author coco
Partaker
#15 | Posted: 17 Aug 2007 12:18 
o.k. thanks!

Page  Page 1 of 2:  1  2  Next » 
How To miniBB Support Forums / How To /
 defining Private forums
 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
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑