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 5 of 6:  « Previous  1  2  3  4  5  6  Next »

Author cyberlp23
Partaker
#61 | Posted: 29 Nov 2011 11:16 
Hello,

I tried to implement this hack.

It's very weird because it works perfectly on Chrome and IE : I go to the index page without being logged in, and it doesn't display the content of the forum, just the login/pass form. Which is exactly what I want.

But on FF (latest version), when I also go to the index page without being logged in, it doesn't display the login form, and instead shows an error message: "Access denied", with no possibility to log in anywhere.

Also, on FF the index.php page automatically forwards to: index.php?action=vtopic&forum=1
whereas in Chrome and IE, it stays at index.php.

Hints anyone?

Thanks for helping.

Author Paul
Lead Developer 
#62 | Posted: 29 Nov 2011 18:06 
Whatever I could say - this hack 100% doesn't depend on the client browser.

It's a server-side solution, and something is happening on the server side. For example, you are logged in other browsers, but logged out in FF, that's why you get this error.

There also may be some trouble with .htaccess rules.

It also very depends on your configuration and settings. Applying hacks from this forum, you actually take responsibilities for your codes.

I'm not sure at all, why did you decide to apply something from this thread? Are default options not enough? What are you trying to achieve? - may be we could start from that.

Author cyberlp23
Partaker
#63 | Posted: 29 Nov 2011 18:16 
Well what I'm trying to do is the following:

I have 2 forums, the 1st one is public, but the other one should be restricted to registered users only. And by restricted I mean both read & post.

(Also, is there a way to go further and define a group of users for which the 2nd forum is not restricted to? I guess the answer is that I have to enter manually every single ID in the setup array?)

Author Paul
Lead Developer 
#64 | Posted: 29 Nov 2011 18:48 
Does it mean the following:
- Forum #1 - is available to view to everybody, even guests, and available to post for guests;
- Forum#2 - is available only to registered members, incl. only members can view and post.
Correct?

You may take attention at the $clForums / $clForumsUsers option from the Manual. If you would like to define a strict group of users for the certain closed/restricted forum, these settings are for you.

Author cyberlp23
Partaker
#65 | Posted: 29 Nov 2011 19:27 
Yes this is correct.

But if I understand correctly the $clForums option, you have to define beforehand the ID of the users which will have access to the restricted forum, don't I? Is there a way, from the list of registered users from the admin panel, to select some and include them in the group of users that will be allowed to view & post in the Forum#2 ?

Author Paul
Lead Developer 
#66 | Posted: 29 Nov 2011 20:41 
There is no way to do it from the admin panel.

Actually, we need to clarify what would you like to achieve :)
If we are about closed forum for ALL registered members, that means, you don't have to specify members manually. Just every registered member will have access to this forum, if he's logged in. In this case, you may try to look up for the solution here.

Author cyberlp23
Partaker
#67 | Posted: 29 Nov 2011 21:11 
Ok.
So if this doesn't concern ALL the registered members, but just some of them, there's no way unless to develop a customized solution?

Also, I tried the code you mentionned, but it's the same as earlier: it works fine with Chrome and IE, but doesn't work for FF. I can't figure out why, since I'm logged off the forum in all browsers.

Author Paul
Lead Developer 
#68 | Posted: 30 Nov 2011 11:44 
Clear the cookies completely in FF and try again. If such thing happens, it has its reason to happen. The bug is not in the code.

Regarding members - just describe, how do you see adding members to such lists. It could be done manually in bb_specials.php, and so far, for me seems the $clForums setting is ideal for you. It will require more time and funds to program the solution, which allows to add them by a mouse click, but it's worth only if you plan to add hundreds/thousands of members. When we speak about ten users, it's much more profitable just to open a plain code file and put some digits in there. It takes less than a minute.

Author cyberlp23
Partaker
#69 | Posted: 3 Dec 2011 18:24 
Yes I tried on an other computer and it works fine. It was probably a cookie problem.

As for the members part, you're right, I'll probably do that.

Thanks for helping.

Author Stryker
Guest
#70 | Posted: 2 Sep 2013 14:41 
Paul:
/* Hack - hiding registered users only forums from guests */
if($user_id==0){
foreach($regUsrForums as $key){
if(!in_array($key, $clForums)) { $clForums[]=$key; $clForumsUsers[$key]=array(); }
}
}
/* --Hack - hiding registered users only forums from guests */
I added this hack and forums for registered users are not visible to not logged in users. Great so far. But guests (not logged in registered users) do not see the loginform, when all my 2 forums are set to registered Users forums ( $regUsrForums=array(1,2); ).
Any idea how to fix this?

Author Paul
Lead Developer 
#71 | Posted: 2 Sep 2013 15:01 
"do not see the loginform?"
It seems you are trying to apply this hack to all forums which are made closed, and here is what you see: nothing. It's logical. With this hack, you need to leave at least one forum opened to guests.

If you want to make ALL of your forums for member-only, take a look at $allForumsReg option of setup_options.php (this thread is actually about it).

Author Stryker
Guest
#72 | Posted: 2 Sep 2013 18:57 
Thanks for the fast reply. I have already $allForumsReg=TRUE, but that makes the forums still readable for guests. That was why I pasted your hack into my lang/eng,php

I want all forums to be writable and readable only for registered users. Unregistered users should only see the login and register formular.

Hope it is now clear what I want to achieve. I understood that this is also what this thread is also about.

Author Paul
Lead Developer 
#73 | Posted: 3 Sep 2013 12:21 
So what miniBB version are you using then? What kind of first page layout is installed?

Author Stryker
Guest
#74 | Posted: 3 Sep 2013 17:25 
Paul:
So what miniBB version are you using then? What kind of first page layout is installed?
Latest version (downloaded on monday), including SEO URL (possibility 3) and your file upload plugin.

Author tom322
Active Member
#75 | Posted: 3 Sep 2013 18:11 
Stryker:
Thanks for the fast reply. I have already $allForumsReg=TRUE, but that makes the forums still readable for guests
Because that's exactly what it should do. $allForumsReg is for REGISTERING process, not reading process.

Page  Page 5 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
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑