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 2 of 6:  « Previous  1  2  3  4  5  6  Next »  
Author Team
8-)
#16 | Posted: 12 Aug 2005 10:20 
setup_options.php:

$allForumsReg=TRUE;

If you want to make all forums for registered only users by one touch; else FALSE. (c) F*Manual

Author Anonymous
Guest
#17 | Posted: 25 Aug 2005 15:39 
I have a question regarding this. Setting forums to Reg Users Only means that only registered users can "post" to the forum. But, any visitors can "read" the forum threads. Is there any way to make it so that only registered users can "read" the posts, as well. I notice that posts on the forum have been read by upwards of 100 people, but nobody signs up to post anything. Maybe if they had to sign up in order to "read" posts, too, more people would sign up?

Author Team
8-)
#18 | Posted: 25 Aug 2005 17:07 
Try to paste this at the end of your language file (before closing ?> for sure!):

/* Hack - hiding all forums from not logged users */
if($forum!=0 and $user_id==0) {
if(!in_array($forum, $clForums)) $clForums[]=$forum;
if(!isset($clForumsUsers[$forum])) $clForumsUsers[$forum]=array();
}
elseif($user_id==0){
if($rf=db_simpleSelect(0,$Tf,'forum_id')){
do{
if(!in_array($rf[0], $clForums)) $clForums[]=$rf[0];
if(!isset($clForumsUsers[$rf[0]])) $clForumsUsers[$rf[0]]=array();
}
while($rf=db_simpleSelect(1));
}
}
/* --Hack - hiding all threads from not logged users */

but remember -
1) When hiding reading of forums from public, you are also killing content for the search crawlers, which index your pages;
2) This solution will display the list of forums and topics on the first page. But Guests will be not able to get inside.

Author Anonymous
Guest
#19 | Posted: 26 Aug 2005 15:15 
Thanks! Forgot about the search engines ... DAMN! Oh well ... :)

Author jretzer
Registered
#20 | Posted: 17 May 2006 13:36 
I've had an open forum for a while, but am tired of spammers, so I've decided to require registration ...

I've already got a bunch of people registered ... what happens to their accounts when I turn on allforumsreg ... do they have to re-register?

What about if I turn on closeregister ... do they have to validate, or are the ones already there already validated?

Also ... I'm not clear ... does allforumsreg just require registration to post, or does it block reading, too.

Author Paul
Lead Developer
#21 | Posted: 17 May 2006 15:31 | Edited by: Paul 
do they have to re-register
No.

the ones already there already validated
Yes.

does allforumsreg just require registration to post, or does it block reading, too
It does only require registration to post.

Author Malachim
Registered
#22 | Posted: 17 May 2006 19:56 
18 May 2006 12:47 - Attached on mergeing:
question? [$regUsrForums]

I really wanna remove the ablity for non members to see the forums I add to the $regUsrForums array...
Is that possible?
Malachim

Author Malachim
Registered
#23 | Posted: 17 May 2006 19:58 
I can't even locate the $regUsrForums command in any of the other .php files...
I think I'm going soft...

Author marsbar
Associated Member
#24 | Posted: 18 May 2006 00:45 | Edited by: marsbar 
Malachim wrote: I really wanna remove the ablity for non members to see the forums I add to the $regUsrForums array...

To disallow non members to access your forum/forums (i.e. no access: no read, no write), you have 2 options:

1) password protect your entire miniBB forum - see $protectWholeForum in setup_options.php
[Instructions can be found in miniBB Manual - 3. customization - config: 2nd step - scroll down to $protectWholeForum]

or

2) set your forum as a private forum
[Instructions can be found in miniBB Manual - 4. Administrative options - 2. Hidden admin forums options - Private forums]

Malachim wrote: I can't even locate the $regUsrForums command in any of the other .php files...

Study the miniBB Manual carefully. :-) $regUsrForums can be found in setup_options.php, but please note that changing $regUsrForums will only set your forum to read-only for non members (i.e. non members will still be able to read posts), which I am not sure is the result you want.

All the best -
mb

Author Ivan
Advanced Member
#25 | Posted: 18 May 2006 09:25 
I don't know, may be it's not bad to add one "luxury" option - $allForumsPrivate

Author Ivan
Advanced Member
#26 | Posted: 18 May 2006 10:05 
I was only wandered - why in the language file and not in bb_plugins.php?

Author Paul
Lead Developer
#27 | Posted: 18 May 2006 10:31 
Because the solution is based actually on $clForums array. It's set in bb_specials.php by default, and this file is included BEFORE bb_plugins.php, and BEFORE language pack. So language pack is the only place to override/add something into closed forums array on the fly, meeting certain conditions.

Author Ivan
Advanced Member
#28 | Posted: 18 May 2006 10:53 | Edited by: Ivan 
I understand now, thanks :)

And last, what if including the said code at the end of bb_specials.php itself? Nothing special, I only think for a place which to be with the codes, not with the languages :)

Author Paul
Lead Developer
#29 | Posted: 18 May 2006 12:27 
Sorry, when writing this explanation, I've took an older version of miniBB, which I support.

The order is another in the newer version, of course. bb_specials.php file is included FIRST, 'cause language variables sometimes depend on user ID and his access into special areas. Thus each user can choose his own language, if there are many installed. That's why language pack is included AFTER bb_specials, but BEFORE bb_plugins.php, which can use some variables from the pack.

Hope it's clear now :-) We add any forum to $clForums, if $user_id = 0 (anonymous), and he is visiting something where $forum variable is specified; so this forum is automatically added as closed for him.

Author ripper
Registered
#30 | Posted: 18 May 2006 18:04 | Edited by: ripper 
Could you tell me what is wrong?

I want to make all forums for registered users only, but when i do this:

$allForumsReg=TRUE;

nothing hapens. Unregistered users can post anyway.

I am using newest version of miniBB.

Page  Page 2 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
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB