miniBB ®®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
How To miniBB Community Forum / How To /

defining Private forums

 Page:  1  2  »» 
fruitfly
Forums Member
#1 | Posted: 4 Jan 2004 01:58
Reply 
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.
4days
Champi0n
#2 | Posted: 5 Jan 2004 02:59
Reply 
you're redefining the array by listing it again (so the second definition overwrites the first).

write it as:

$clForums=array(7,8);
fruitfly
Forums Member
#3 | Posted: 5 Jan 2004 06:40
Reply 
oooooh, I knew it had to be something simple. Thank you very much.
gruffnuts
Forums Member
#4 | Posted: 22 Jul 2005 15:33
Reply 
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
Team
8-)
#5 | Posted: 22 Jul 2005 15:56
Reply 
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.
gruffnuts
Forums Member
#6 | Posted: 22 Jul 2005 16:06 | Edited by: gruffnuts
Reply 
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??
Team
8-)
#7 | Posted: 22 Jul 2005 16:18 | Edited by: Team
Reply 
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.
gruffnuts
Forums Member
#8 | Posted: 22 Jul 2005 16:28 | Edited by: gruffnuts
Reply 
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!
gruffnuts
Forums Member
#9 | Posted: 22 Jul 2005 16:45
Reply 
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
Team
8-)
#10 | Posted: 22 Jul 2005 17:09 | Edited by: Team
Reply 
coco
Forums Member
#11 | Posted: 30 Nov 2006 07:01
Reply 
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!
Paul
CEO
#12 | Posted: 30 Nov 2006 07:37
Reply 
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;
coco
Forums Member
#13 | Posted: 17 Aug 2007 12:04
Reply 
core destructive change in the file bb_func_vforum.php
that's not recommended or?
tom322
Forums Member
#14 | Posted: 17 Aug 2007 12:13
Reply 
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.
coco
Forums Member
#15 | Posted: 17 Aug 2007 12:18
Reply 
o.k. thanks!
 Page:  1  2  »» 
Your Reply
Bold Style  Italic Style  Image Link  URL Link 


» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
Online now: Guests - 47
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®